The following environment variables are available for all script loads and script exports, both Windows and UNIX/Linux.

All load scripts

The following variables are available in all load scripts:

Windows variable

UNIX/Linux variable

Description

WSL_LOAD_FULLNAME

LOAD_FULLNAME

The fully-qualified load table name.

WSL_LOAD_TABLE

LOAD_TABLE

The unqualified load table name.

WSL_LOAD_SCHEMA

LOAD_SCHEMA

The schema for the load table.

Note

  • A trailing dot is appended for SQL Server or Oracle due to historical usage.
  • A trailing dot is not appended for any other database type due to historical usage.

However, it is better not to assume the trailing dot is or isn't appended by using the variable like this, when it is not empty:

OS

If no trailing dot is wanted

If a trailing dot is wanted

Windows

!WSL_LOAD_SCHEMA:.=!

!WSL_LOAD_SCHEM

UNIX/ Linux

${LOAD_SCHEMA%.}

${LOAD_SCHEMA%.}.

WSL_LOAD_DB

LOAD_DB

The name of the database for the load table.

WSL_TEMP_DB

TEMP_DB

  • Teradata: The name of the database for load temporary tables.
  • PDW: The name of the staging database for the load. Others: Not Used.

WSL_TGT_DSN

TGT_DSN

The ODBC data source name (DSN) for the load table's storage connection.

WSL_TGT_SERVER

TGT_SERVER

The server for the load table's storage connection.

WSL_TGT_DBPORT

TGT_DBPORT

The database port for the load table's storage connection.

WSL_TGT_DBID

TGT_DBID

The Database ID property of the load table's storage connection. For Teradata this is the Teradata Director Program ID (TDPID).For Oracle this is the Oracle SID or TNS Name.

WSL_TGT_USER

TGT_USER

The user id for the load table's storage connection.

WSL_TGT_PWD

TGT_PWD

The password for the load table's storage connection.

 
All load scripts from Database or ODBC connections
In addition to the variables in the previous table, the following variables are available in all load scripts from Database or ODBC connections:

Windows variable

UNIX/Linux variable

Description

WSL_SRC_DSN

SRC_DSN

The ODBC data source name (DSN) for the source connection.

WSL_SRC_SERVER

SRC_SERVER

The server for the source connection.

WSL_SRC_DBPORT

SRC_DBPORT

The database port for the source connection.

WSL_SRC_DBID

SRC_DBID

The Database ID property of the source connection. For Teradata this is the Teradata Director Program ID (TDPID).For Oracle this is the Oracle SID or TNS Name.

WSL_SRC_DB

SRC_DB

The name of the database for the source connection.

WSL_SRC_SCHEMA

SRC_SCHEMA

The Source Schema property of the load.

Note

The property is fetched without modification, so there may or may not be a trailing dot depending on how it is configured. However, it is better not to assume the trailing dot is or isn't appended by using the variable like this, when it is not empty:

OS

If no trailing dot is wanted

If a trailing dot is wanted

Windows

!WSL_SRC_SCHEMA:.=!

!WSL_SRC_SCHEMA:.=!.

UNIX/ Linux

${SRC_SCHEMA%.}

${SRC_SCHEMA%.}.

WSL_SRC_USER

SRC_USER

The user id for the source connection.

WSL_SRC_PWD

SRC_PWD

The password for the source connection.


All export scripts

The following variables are available in all export scripts:

Windows variable

UNIX/Linux variable

Description

WSL_EXP_NAME

EXP_NAME

The export object name.

WSL_EXP_FULLNAME

EXP_FULLNAME

The fully-qualified export table name.

WSL_EXP_TABLE

EXP_TABLE

The unqualified export table name.

Note

For Windows script exports from PDW, this variable is initialized with the fully-qualified export table name, due to historical usage.
To enable this variable to be uniformly described and used as the unqualified export table name, an additional variable WSL_EXP_SIMPLENAME is created.This allows the following command to be explicitly added to the top of the script by the script author, to be executed before all other processing:

if defined WSL_EXP_SIMPLENAME (SET
WSL_EXP_TABLE=!WSL_EXP_SIMPLENAME!) else
SET WSL_EXP_TABLE=

After such a command is executed, the variable WSL_EXP_TABLE will contain the unqualified export table name.


WSL_EXP_SCHEMA

EXP_SCHEMA

The schema for the export table.

Note

A trailing dot is appended for SQL Server or Oracle due to historical usage. A trailing dot is not appended for any other database type due to historical usage. However, it is better not to assume the trailing dot is or isn't appended by using the variable like this, when it is not empty:

OS

If no trailing dot is wanted

If a trailing dot is wanted

Windows

!WSL_EXP_SCHEMA:.=!

!WSL_EXP_SCHEMA:.=!.

UNIX/ Linux

${EXP_SCHEMA%.}

${EXP_SCHEMA%.}.


WSL_EXP_DB

EXP_DB

The name of the database for the export table.

WSL_TEMP_DB

TEMP_DB

  • Teradata: The name of the database for export temporary tables.
  • Others: Not used.

WSL_SRC_DSN

SRC_DSN

The ODBC data source name (DSN) for the export table's storage connection.

WSL_SRC_SERVER

SRC_SERVER

The server for the export table's storage connection.

WSL_SRC_DBPORT

SRC_DBPORT

The database port for the export table's storage connection.

WSL_SRC_DBID

SRC_DBID

  • The Database ID property of the export table's storage connection.
  • For Teradata this is the Teradata Director Program ID (TDPID).For Oracle this is the Oracle SID or TNS Name.

WSL_SRC_USER

SRC_USER

The user id for the export table's storage connection.

WSL_SRC_PWD

SRC_PWD

The password for the export table's storage connection.

 
All scripts
In addition to the specific variables in the previous tables, the following variables are available in all scripts:

Windows variable

UNIX/Linux variable

Description

WSL_META_DSN

META_DSN

The ODBC data source name (DSN) for the meta-repository connection.

WSL_META_SERVER

META_SERVER

The server for the meta-repository connection.

WSL_META_DBID

META_DBID

The Database ID property of the meta-repository connection. For Teradata this is the Teradata Director Program ID (TDPID).For Oracle this is the Oracle SID or TNS Name.

WSL_META_DB

META_DB

The name of the database for the meta-repository connection.

WSL_META_SCHEMA

META_SCHEMA

The meta-repository table qualifier, with a trailing dot.

  • For SQL Server and DB2 this is the schema for the meta-repository.
  • For Teradata and Oracle this is not actually a schema name.

Note

A trailing dot is appended due to historical usage. However, it is better not to assume the trailing dot is or isn't appended by using the variable like this, when it is not empty:

OS

If no trailing dot is wanted

If a trailing dot is wanted

Windows

!WSL_META_SCHEMA:.=!

!WSL_META_SCHEMA:.=!.

UNIX/ Linux

${META_SCHEMA%.}

${META_SCHEMA%.}.

WSL_META_USER

META_USER

The user id for the meta-repository connection.

WSL_META_PWD

META_PWD

The password for the meta-repository connection.

WSL_WORKDIR

WORKDIR

  • Windows: The work directory defined in the Windows connection.
  • UNIX/Linux: The work directory defined in the UNIX/Linux or Hadoop connection.

WSL_SEQUENCE

SEQ

A unique sequence number for the load or export task.

WSL_PARAMnnn

PARAMnnn

Any parameters that start with the load table or export object name. Example: A table called load_abc has a parameter called load_abc_server defined. In this case, a variable called WSL_PARAM_SERVER (Windows) or PARAM_SERVER (UNIX/Linux) will be created.


  • No labels