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_STDOUTenvironment variable in various languages.
Ruby
Python
JavaScript (Node)
1
ENV["PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT"]
Copied!
1
import os
2
os.environ['PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT']
Copied!
1
process.env.PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT
Copied!

Configs

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_

Secrets

Connector secrets like access tokens and api keys are inject into the script environment prefixed with PAN_SEC_

Context

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_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 or normal
PAN_CTX_TENANT_NAME
The name of the Tenant who is running currently.
PAN_CTX_INTEGRATION_NAME
The name of the Integration who is running currently.
Last modified 2mo ago
Copy link