Interactive Queries

Viewing the status of Interactive Queries

CDP displays a table view where you can review the overall status of the last Interactive Queries (IQ) execution, job status, start time, end time, and configuration setting for the workflow of your tenant. This table view, called A1_Status, is created and auto-populated as part of your IQ workflow.

The columns available in the A1_Status table view are:

Column

Description

Data Type

Category

The source category of the workflow.

string

Source

The source of the workflow. For example, interactive-queries, sf-bi, or replication.

string

Type

The trigger source of the workflow. For example, Scheduled, Cohort.

string

Subtype

The campaign ID that triggered the workflow, when Type is Cohort.

string

Key

The key attribute to be tracked for the last run workflow.

string

Value

The value of the attribute for the last run workflow.

string

Data_Type

The datatype of the value.

string

Last_Modified

The time when the value was captured and saved.

timestamp

IQ users, including Snowflake data sharing users, can query the A1_Status table periodically to learn when new data is available in IQ. This information can be leveraged to schedule any downstream processes.

Key

Description

status

The status of the most recent IQ workflow execution. For example, SUCCESS or FAILED.

start_time

The time when the workflow execution started.

end_time

The time when the workflow execution ended.

configuration

The workflow configuration settings in the JSON format.

Note

The JSON value for the key configuration is an internal setting used for the ETL processes in the workflow. CDP displays the start_time and end_time in UTC.

For tenants using the BI workflow, which is upgraded to Snowflake architecture, in the A1_Status table:

  • CDP does not display the configuration settings.

  • The value in the Category field is pipeline.

  • The value in the Source field is sf-bi.

Sample interactive query to retrieve the status of a tenant using Snowflake database:

select * from a1_status
where category='pipeline' and source='sf-bi'

Snowflake data sharing

If Snowflake data sharing is enabled for your tenant, CDP replicates the data from the CDP Snowflake environment to your tenant environment.

Note

CDP only replicates the data if you want to share the data in different regions. For example, if your database is in us-east-1/qy61248 and you want to share it in east-us-2.azure.

The following is the sample interactive query to retrieve the latest refresh status of a tenant using Snowflake data sharing:

select * from a1_status WHERE
  category = 'pipeline'
  AND source = 'replication'
  AND subtype = 'secondary'
  AND key = 'sf_bi_last_completion_time'
  ORDER BY last_modified DESC
LIMIT 1

The last modified date is when the Snowflake data share was refreshed. CDP only refreshes the target tables. There is another task in the secondary account that triggers the replica refresh.

The time format of the last modified date is UTC.

Checking Snowflake data share recency

The data in the Snowflake data share refreshes after the main sf_bi is completed by a secondary replication process. The schedule varies as per the tenant. The replication process is scheduled to replicate the new data at:

  • First check: The end_time of sf-bi + buffer

  • Second check: +1 hour

  • Third check: +12 hours

If the sf_bi process is delayed, a final daily catch up replication runs at 2 UTC.