Environment Variables
Pandium has three types of environment variables that are presented to a script at run-time.
Here is an example of accessing the
PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT
environment variable in various languages.Ruby
Python
JavaScript (Node)
ENV["PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT"]
import os
os.environ['PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT']
process.env.PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT
The values of the the configurations specified in the
Schema
section of the Pandium.YAML as selected by user of the Tenant. They will be injected with the prefix of PAN_CFG_
Connector secrets like access tokens and api keys are inject into the script environment prefixed with
PAN_SEC_
These are variables that provide information that has been gather, during connecting of a Tenant, and during previous runs of the script. They are all prefixed with
PAN_CTX_
and are injected at runtime into the scripts Environment. Below see all the available variables.name | desc | notes |
PAN_CTX_INTEGRATION_ID | The Pandium ID of the Integration who is running currently. | an integer unique to your account |
PAN_CTX_INTEGRATION_NAME | The name of the Integration who is running currently | |
PAN_CTX_LAST_RUN_START_TIME | A datetime that represents that last time a Run was started. i.e. 2021-07-24 20:04:21 +0000 UTC | Will appear in environment only after first run. |
PAN_CTX_LAST_RUN_COMPLETION_TIME | A datetime that represents that last time a Run was started. i.e. 2021-07-24 20:07:21 +0000 UTC | Will appear in environment only after first run. |
PAN_CTX_LAST_RUN_PHASE | An enum of one of the following values Succeeded , Failed , Timeout? | Will appear in environment only after first run. |
PAN_CTX_LAST_SUCCESSFUL_RUN_START_TIME | A datetime that represents that last time a Run was started. i.e. 2021-07-24 20:04:21 +0000 UTC | Will appear in environment only after successful first run. |
PAN_CTX_LAST_SUCCESSFUL_RUN_COMPLETION_TIME | A datetime that represents that last time a Run was started. i.e. 2021-07-24 20:07:21 +0000 UTC | Will appear in environment only after successful first run |
PAN_CTX_LAST_SUCCESSFUL_RUN_PHASE | An enum of one of the following value Succeeded | Will appear in environment only after successful first run |
PAN_CTX_LAST_SUCCESSFUL_RUN_STD_OUT | The JSON encoded string that was optionally printed to stdout during last successful Run. | This property is available on next run only if it was JSON encoded string. |
PAN_CTX_RUN_MODE | An enum of one of the following values init, normal, or webhook | |
PAN_CTX_RUN_TRIGGERS | List of objects that contain the payload data for run triggers | Can view the mode, source, and payload data as well as headers it was sent with |
PAN_CTX_TENANT_ID | The Pandium ID of the Tenant who is running currently. | An integer unique to your account |
PAN_CTX_TENANT_NAME | The name of the Tenant who is running currently. | |
PAN_CTX_ENV | The environment the sync is running in, i.e.(dev/staging/prod) | |
Last modified 8d ago