Please refer this article to know the environment variables used in Post Hook Script.
The environment variables from the ingestion job are passed to the post hook script. In addition to these variables the following variables through which the table context for the post hook is available, can also be used.
|IW_TABLE_ID||The tableId of the table for which the script is running.|
|IW_HIVE_TABLE_NAME||The name of the table in the hive, for the table for which script is running.|
|IW_HIVE_SCHEMA||The schema in the hive, where the hive table was created|
|SOURCE_TABLE_NAME||The name of the table in the source database, from where the table was ingested.|
|SOURCE_SCHEMA||The schema in the source database, from where the table was ingested.|
|IW_TABLE_HDFS_PATH||The HDFS path of the table, where the data is stored.|
|IW_SOURCE_ID||The ID of the Infoworks source in which the job is running.|
|IW_TABLE_GROUP_ID||The ID for the group for which the job is running.|
|IW_TABLE_GROUP_NAME||The name for the group for which the job is running.|
|IW_SOURCE_NAME||The name for the source, which has the table.|
|IW_JOB_ID||The ID of the running job.|
|IW_JOB_TYPE||The job type of the job run.|
|IW_JOB_STATUS||The status of the job. The possible values are “successful” and “failed”.|