Resource definition and ingestion SQL reference

STATE.RESOURCE_INGESTION_DEFINITION

This table is used to persist the data about configured resources. The data consists mostly of semi-structured variants. The definition can be found in the file ingestion/resource_ingestion_definition.sql.

The table contains the following columns:

Column nameDescription
idId of Resource Ingestion Definition.
nameName of the Resource Ingestion Definition that can be shown on UI.
enabledInformation whether the ingestion is enabled.
parent_idId of parent’s Resource Ingestion Definition, it allows to create resource hierarchy which can be ingested
resource_idSet of properties that are needed to define a resource in a specific connector. They identify a resource in a source system. They are set by a user.
resource_metadataSet of additional properties that describe a resource. They can be fetched automatically or calculated by a connector. Optional.
ingestion_configurationsSet of configuration properties that describe how the resource should be ingested from the source system. Structure of this field is described in the next table.
updated_atUTC timestamp representing recent update.

The ingestion_configuration property should follow the below schema:

Field nameDescription
idId of Ingestion Configuration. Unique for given Resource Ingestion Definition
ingestion_strategyStrategy of given ingestion. Values: snapshot, incremental
custom_configurationSet of connector-specific ingestion properties
schedule_typeType of schedule. Values: interval, cron
schedule_definitionString defining a schedule. e.g. 30m, 4h, 1d for interval. Cron expression in case of cron.
destinationSet of properties that describe where ingested data for a given resource should be stored.

To interact with the RESOURCE_INGESTION_DEFINITION table the following Java objects are useful:

PUBLIC.INGESTION_DEFINITIONS

File: ingestion/ingestion_definitions_view.sql

This view available to ADMIN and VIEWER users returns the data from the STATE.RESOURCE_INGESTION_DEFINITION table. The returned data is simplified and contains only some of the columns:

  • id
  • resource_id
  • name
  • enabled

STATE.INGESTION_PROCESS

File: ingestion/ingestion_run.sql

This table is used to persist the data about process. It is not available to any role apart from the connector itself. It contains the following columns:

ColumnType
idSTRING
resource_ingestion_definition_idSTRING
ingestion_configuration_idSTRING
typeSTRING
statusSTRING
created_atTIMESTAMP_NTZ
finished_atTIMESTAMP_NTZ
updated_atTIMESTAMP_NTZ

The following Java classes are related to this table:

STATE.INGESTION_RUN

File: ingestion/ingestion_run.sql

A table used to store log data about past and current ingestion triggered by the scheduler. It is not available to any role apart from the connector itself.

It contains the following columns:

ColumnType
idSTRING
resource_ingestion_definition_idSTRING
ingestion_configuration_idSTRING
process_idSTRING
started_atTIMESTAMP_NTZ
completed_atTIMESTAMP_NTZ
statusSTRING
ingested_rowsNUMBER
metadataVARIANT

The following Java classes are related to this table: