Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

All load scripts

The In addition to the specific variables listed on the sections below, the following variables are available in all load scripts:

Environment variableDescription
WSL
_LOAD_FULLNAMEThe fully-qualified load table name
_META_AUTHCFGAdditional user defined attributes as JSON, scripts can load attributes from this variable.
WSL_META_AUTHTKN_[1|2|3]

Additional Profile authentication token fields from the associated Metadata Connection, normally used directly in connection strings with the token format $AUTHTKN_[1|2|3]$ but can be accessed in scripts via this variable.

WSL_META_DBIDThe Database ID property of the meta-repository connection.
WSL_
LOAD
META_
TABLE
DBThe
unqualified load table name
name of the database for the meta-repository connection.
WSL_
LOAD
META_SCHEMAThe meta-repository schema
for the load table.  
name, with a trailing dot.


 
WSL_META_USERThe user id for the meta-repository connection.
WSL_
LOAD
META_
DB
PWDThe
name of the database
password for the
load table
meta-repository connection.
WSL_WORKDIR
  • Windows: The work directory defined in the Windows connection.
  • UNIX/Linux: The work directory defined in the UNIX/Linux or Hadoop connection.
WSL_SEQUENCEA unique sequence number for the load or export task.
WSL_SCH_RESTAPI_URLThe server URL for the scheduler connection.
WSL_SCH_RESTAPI_USERThe api user id for the scheduler connection.
WSL_SCH_RESTAPI_PWDThe password for the scheduler connection
WSL_JOB_KEYID of the Job which started the script, '0' for interactive execution.
WSL_JOB_NAMEName of the Job which started the script, 'Develop' for interactive execution.
WSL_TASK_KEYID for the Task within the Job, or Object ID for interactive execution.
WSL_TASK_NAMEName of the Task within the Job, or Object Name for interactive execution.


Additional environment variables for load scripts

The following variables are available in all load scripts:

TEMP_DB
Environment variableDescription
WSL_LOAD_FULLNAMEThe fully-qualified load table name.
WSL_LOAD_TABLEThe unqualified load table name.
WSL_LOAD_SCHEMAThe schema for the load table.  
WSL_LOAD_DBThe name of the database for the load table.
WSL_TEMP_DB

The name of the staging database for the load (Teradata only). 

  • PDW: The name of the staging database for the load. Others: Not Used.
WSL_TGT_AUTHCFGAdditional user defined attributes as JSON, scripts can load attributes from this variable.
WSL_TGT_AUTHTKN_1

Encrypted field “Token 1” can be replaced in connection strings by specifying the token: $AUTHTKN_1$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_TGT_AUTHTKN_2

Encrypted field “Token 2” can be replaced in connection strings by specifying the token: $AUTHTKN_2$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_TGT_AUTHTKN_3

Encrypted field “Token 3” can be replaced in connection strings by specifying the token: $AUTHTKN_3$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_TGT_DBIDThe Database ID property of the load table's storage connection.
WSL_TGT_USERThe user id for the load table's storage connection.
WSL_TGT_PWDThe password for the load table's storage connection.
WSL_TGT_CONSTRINGThe ODBC connection string with RED tokens expanded.
WSL_TGT_AUTHCFGAdditional Profile authentication attributes (JSON format), from the associated Target Connection. Extract attributes by parsing the JSON, if required.
WSL_TGT_AUTHTKN_[1|2|3]

Additional Profile authentication token fields from the associated Target Connection, normally used directly in connection strings with the token format $AUTHTKN_[1|2|3]$ but can be accessed in scripts via this variable.

WSL_PARAMnnnAny 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 will be created.

All load scripts from Database or ODBC connections

...

Environment variableDescription
WSL_SRC_AUTHCFGAdditional user defined attributes as JSON, scripts can load attributes from this variable.
WSL_SRC_DSNThe ODBC data source name (DSN) for the source connection.
WSL_SRC_SERVERThe server for the source connection.
WSL_SRC_DBPORTThe database port for the source connection.
WSL_SRC_DBIDThe Database ID property of the source connection.
WSL_SRC_DBThe name of the database for the source connection.
WSL_SRC_AUTHTKN_[1

Encrypted field “Token 1” can be replaced in connection strings by specifying the token: $AUTHTKN_1$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_SRC_AUTHTKN_2

Encrypted field “Token 2” can be replaced in connection strings by specifying the token: $AUTHTKN_2$. It is intended to contain tokens, passwords or secrets related to authentication.

|2|3]

Additional Profile authentication token fields from the associated Source Connection, normally used directly in connection strings with the token format $AUTHTKN_[1|2|3]$ but can be accessed in scripts via this variable

WSL_SRC_AUTHTKN_3

Encrypted field “Token 3” can be replaced in connection strings by specifying the token: $AUTHTKN_3$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_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:

OSIf no trailing dot is wantedIf a trailing dot is wanted
Windows !WSL_SRC_SCHEMA:.=! !WSL_SRC_SCHEMA:.=!.
UNIX/ Linux ${SRC_SCHEMA%.} ${SRC_SCHEMA%.}.


WSL_SRC_USERThe user id for the source connection.
WSL_SRC_PWDThe password for the source connection.

All Additional environment variables for export scripts

The following variables are available in all export scripts:

Environment variableDescription
WSL_EXP_NAMEThe export object name.
WSL_EXP_FULLNAMEThe fully-qualified export table name.
WSL_EXP_TABLEThe unqualified export table name.
WSL_EXP_SCHEMAThe schema for the export table.
WSL_EXP_DBThe name of the database for the export table.
WSL_TEMP_DB
  • Others: Not used.
WSL_SRC_DSNThe ODBC data source name (DSN) for the export table's storage connection.
WSL_SRC_SERVERThe server for the export table's storage connection.
WSL_SRC_DBPORTThe database port for the export table's storage connection.
WSL_SRC_DBID
  • The Database ID property of the export table's storage connection.
WSL_SRC_USERThe user id for the export table's storage connection.
WSL_SRC_PWDThe 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:

Environment variableDescriptionWSL_META_AUTHCFGAdditional user defined attributes as JSON, scripts can load attributes from this variable.WSL_META_AUTHTKN_1

Encrypted field “Token 1” can be replaced in connection strings by specifying the token: $AUTHTKN_1$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_META_AUTHTKN_2

Encrypted field “Token 2” can be replaced in connection strings by specifying the token: $AUTHTKN_2$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_META_AUTHTKN_3

Encrypted field “Token 3” can be replaced in connection strings by specifying the token: $AUTHTKN_3$. It is intended to contain tokens, passwords or secrets related to authentication.

WSL_META_DBIDThe Database ID property of the meta-repository connection. WSL_META_DBThe name of the database for the meta-repository connection.WSL_META_SCHEMAThe meta-repository schema name, with a trailing dot.  WSL_META_USERThe user id for the meta-repository connection. WSL_META_PWDThe password for the meta-repository connection. WSL_WORKDIR
  • Windows: The work directory defined in the Windows connection.
  • UNIX/Linux: The work directory defined in the UNIX/Linux or Hadoop connection.
WSL_SEQUENCEA unique sequence number for the load or export task. WSL_PARAMnnnAny 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.WSL_SCH_RESTAPI_URLThe server URL for the scheduler connection.WSL_SCH_RESTAPI_USERThe api user id for the scheduler connection.WSL_SCH_RESTAPI_PWDThe password for the scheduler connectionWSL_JOB_KEYID of the Job which started the script, '0' for interactive execution.WSL_JOB_NAMEName of the Job which started the script, 'Develop' for interactive execution.WSL_TASK_KEYID for the Task within the Job, or Object ID for interactive execution.WSL_TASK_NAMEName of the Task within the Job, or Object Name for interactive execution
.


Azkaban Environment Variables

...