Context: StdOut

The last thing written to the stdout file descriptor during a run is passed to the next run if it is a JSON encoded string. Below is a list of examples of variables that can be used to accomplish tasks. This JSON encoded string can be used to keep state between runs or to power the data behind a dynamic config.

Below is an example of what a Context variable would look like to have information stored in your StdOut:

ENV["PAN_CTX_LAST_SUCESSFUL_RUN_STDOUT"]

Dynamic Sync 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)

A good way to use the saved state between runs via stdout is to continue running large syncs sequentially in a 'dynamic sync' process.

Below are some examples of writing to stdout in various languages

Console.WriteLine("Hello World")

Last updated