# Internal tables

Omnata exposes read-only views of some of its internal tables for the convenience of customers.

You can find these views in the OMNATA\_SYNC\_ENGINE.DATA\_VIEWS database/schema.

### CONNECTION

This table stores connections that have been fully configured.

It has the following columns:

#### CONNECTION\_ID

The unique ID number for the connection, used as a stable identifier internally.

#### CONNECTION\_NAME

The name of the connection.

#### CONNECTION\_METHOD

The authentication method used to connect to the external application. This value is defined by the plugin and may impact which connection parameters are present.

#### CONNECTION\_SLUG

A unique identifier for the connection, used externally as a human-readable stable identifier. Note that this value is allowed to change.

#### IS\_PRODUCTION\_ENVIRONMENT

Whether the connection is to a production environment. This is a choice made by the user during connection configuration and impacts scheduling and branching functionality.

#### PLUGIN\_FQN

The fully qualified name of the plugin that this connection is for.

#### EXTERNAL\_ACCESS\_INTEGRATION\_NAME

The name of the connection's external access integration object. This value may change if the connection is edited.

#### OAUTH\_SECRET\_NAME

The name of the Snowflake Secret object that contains the OAuth secret for this connection, if OAuth is used. This value may change if the connection is edited.

#### OTHER\_SECRETS\_NAME

The name of the Snowflake Secret object that contains other secrets for this connection. This value may change if the connection is edited.

#### NETWORK\_RULE\_NAME

The name of the Snowflake Network rule object that contains the permitted addresses for this connection (addresses are determined by the plugin code using parameter values). This value may change if the connection is edited.

#### OAUTH\_SECURITY\_INTEGRATION\_NAME

The name of the Snowflake security integration object for this connection, if OAuth is used. This value may change if the connection is edited.

### OUTBOUND\_SYNC\_RECORD\_STATE

#### OUTBOUND\_SYNC\_RECORD\_STATE\_ID

The unique ID number for the outbound sync record state, used as a stable identifier internally.

#### SYNC\_ID

The ID of the sync that this record belongs to.

#### SYNC\_BRANCH\_ID

The ID of the branch that this record belongs to, or null if it belongs to the main sync.

#### IDENTIFIER

The unique identifier for the record, which is the value from the source table's ID column.

#### APP\_IDENTIFIER

The identifier for the record in the external application, if set during a previous sync operation.

#### TRANSFORMED\_RECORD

The transformed record, which is the result of applying the record transformer to the source table's records.

#### RECORD\_STATE

The last observed state of the record in the source table.

See [docs page](https://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/how-it-works/terminology#record-states) for details.

#### APPLY\_STATE

The state of the apply operation (indicates success or otherwise of the sync action).

See [docs page](https://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/how-it-works/terminology#record-apply-states) for details.

#### FAILURE\_COUNT

The number of times the record has failed to apply

#### SYNC\_ACTION

The name of the Sync Action to take in the external system, based on the sync strategy and the source record state. This can be a standard action (like 'Create', or a custom action). It is up to the plugin to know how to handle all of the possible Sync Actions it supports.

#### RECORD\_STATE\_DATETIME

The datetime when the record state was last updated.

#### APPLY\_STATE\_DATETIME

The datetime when the apply state was last updated.

#### LAST\_RUN\_ID

The ID of the last sync run that processed this record.

#### LAST\_RUN\_APPLY\_REASON

The reason for the last apply operation.

See [docs page](https://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/how-it-works/terminology#record-apply-reasons) for details.

#### LAST\_RESULT

The result of the last apply operation. This is a dictionary that can contain any information about the result of the apply operation. It is intended to be understood by a human troubleshooting a sync error.

### SYNC

Represents a configuration and schedule to sync between Snowflake and another application.

#### SYNC\_ID

The unique ID number for the sync, used as a stable identifier internally

#### SYNC\_NAME

The name of the sync.

#### SYNC\_SLUG

A unique identifier for the sync, used externally as a human-readable stable identifier.

#### CONFIGURATION\_MODE

The configuration mode of the sync, either 'simple' or 'advanced'. Advanced mode is presented in the UI as "branching mode".

#### RUN\_STATE

Also known as Activity State, this describes the syncs state in terms of activity (Pending, Running, Waiting, Paused).

#### HEALTH\_STATE

Describes the Sync's state from a success perspective (Health, Failed, Incomplete, etc).

Note that if a sync run is currently in progress, this will reflect the health state at the end of the previous run.

#### CONNECTION\_ID

The ID of the connection to use for the sync. If null, it means the Sync was created as a branch using a non-production connection.

#### PLUGIN\_FQN

The fully qualified name of the plugin to use for the sync.

#### SYNC\_DIRECTION

The direction of the sync, either 'inbound' or 'outbound'.

#### SYNC\_PARAMETERS

The parameters for the sync as defined during configuration.

#### SYNC\_SCHEDULE

The schedule for the sync, the structure of this varies depending on the scheduler used.

#### OUTBOUND\_SYNC\_STRATEGY

The strategy to use for outbound syncs. This object describes the strategy and also the associated sync actions.

#### OUTBOUND\_SOURCE\_DATABASE

The name of the source database for the outbound sync, if the sync is outbound.

#### OUTBOUND\_SOURCE\_SCHEMA

The name of the source schema for the outbound sync, if the sync is outbound.

#### OUTBOUND\_SOURCE\_TABLE

The name of the source table for the outbound sync, if the sync is outbound.

#### OUTBOUND\_SOURCE\_ID\_COLUMN

The name of the source ID column for the outbound sync, if the sync is outbound.

#### OUTBOUND\_FIELD\_MAPPINGS

Maps source columns to target fields, if the sync is a record-style outbound sync.

#### INBOUND\_STREAMS\_CONFIGURATION

The configuration for the inbound streams, if the sync is an inbound sync.

#### INBOUND\_LATEST\_STREAMS\_STATE

The latest state for each stream, if the sync is an inbound sync. Used to manage incremental syncing over time.

#### INBOUND\_LATEST\_STREAMS\_SCHEMA

The latest json-schema for each stream, if the sync is an inbound sync. Used to build normalized views over the raw data.

#### LATEST\_RUN\_START

The datetime when the latest run started.

#### LOGGING\_LEVEL

The logging level for the sync, determines how much information is logged in the event table.

This column is deprecated and may be removed in a future release.

#### INBOUND\_STORAGE\_CONFIGURATION

The storage configuration for sync, if the sync is an inbound sync. This object determines where to store the inbound raw tables and normalized views.

### SYNC\_BRANCH

Represents a branch of a sync, if configuration mode is 'advanced'. Sync branches are used to test changes in a non-production environment or limited subset of production, before merging them into the main sync.

#### SYNC\_BRANCH\_ID

The unique ID number for the sync branch, used as a stable identifier internally.

#### SYNC\_ID

The ID of the sync that this branch belongs to

#### BRANCH\_NAME

The name of the branch

#### OUTBOUND\_RECORD\_STATE\_BEHAVIOUR

Determines how the outbound record state is initially populated.

* START\_EMPTY - All records will be re-synced. You would do this if you wanted to deliberately re-populate an empty environment.
* FORK - The sync will continue where it left off in production, including updating/deleting already sync'd records. You would do this if your environment contained an up-to-date copy of production data.
* FORK\_AND\_IGNORE - The sync will continue where it left off in production, but updates/deletes to existing records will be ignored. You would do this if your environment is empty or does not contain the same data as production, but you don't want to fully re-populate it. For sync strategies which only action new records (usually event-based or messaging apps), this will behave identically to 'Fork current state'.
* SHARE - The branch sync will run in concert with the main sync, so that changes applied in the branch will not be reapplied in the main sync, and vice versa. You would do this if you had no other place to send test records to, and need to test in production. If you select this option, you must use a branch record filter to limit the records synced in the branch.

#### OUTBOUND\_BRANCH\_RECORD\_FILTER

If provided, means that only the records with these identifiers will be included in the sync. These records will also be excluded from the main sync while ever the branch is active

#### INBOUND\_RECORDS\_BEHAVIOUR

Determines how the inbound records raw table is initially populated.

* START\_EMPTY - The inbound raw tables will start empty
* FORK - The inbound raw tables will be copied from the main sync

#### INBOUND\_STREAM\_STATE\_BEHAVIOUR

Determines how the inbound stream state is initially populated

* START\_EMPTY - The stream states will start empty
* FORK - The stream states will be copied from the main sync

#### REOPEN\_BEHAVIOUR

Determines how the branch records and state are initialised when it is reopened.

* CONTINUE - The branch records/state will continue on from last time it was used
* REAPPLY - The branch records/state will be reapplied from the main sync, as per defined behaviour

#### RUN\_STATE

Also known as Activity State, this describes the syncs state in terms of activity (Pending, Running, Waiting, Paused)

#### HEALTH\_STATE

Describes the Sync's state from a success perspective (Health, Failed, Incomplete, etc)

#### CONNECTION\_ID

The ID of the connection to use for the sync branch. This must be a non-production connection.

#### SYNC\_DIRECTION

The direction of the sync, either 'inbound' or 'outbound'. This field is not used, as syncs cannot change direction after creation.

#### SYNC\_PARAMETERS

The parameters for the sync as defined during configuration.

#### OUTBOUND\_SYNC\_STRATEGY

The strategy to use for outbound syncs. This object describes the strategy and also the associated sync actions. Currently this cannot be changed from the main sync setting, but may be supported in future

#### OUTBOUND\_SOURCE\_DATABASE

The name of the source database for the outbound sync branch, if the sync is outbound.

#### OUTBOUND\_SOURCE\_SCHEMA

The name of the source schema for the outbound sync branch, if the sync is outbound.

#### OUTBOUND\_SOURCE\_TABLE

The name of the source table for the outbound sync branch, if the sync is outbound.

#### OUTBOUND\_SOURCE\_ID\_COLUMN

The name of the source ID column for the outbound sync branch, if the sync is outbound.

#### OUTBOUND\_FIELD\_MAPPINGS

Maps source columns to target fields, if the sync is a record-style outbound sync.

#### INBOUND\_STREAMS\_CONFIGURATION

The configuration for the inbound streams, if the sync is an inbound sync.

#### INBOUND\_LATEST\_STREAMS\_STATE

The latest state for each stream, if the sync is an inbound sync. Used to manage incremental syncing over time, but only in the branch.

#### INBOUND\_LATEST\_STREAMS\_SCHEMA

The latest json-schema for each stream, if the sync is an inbound sync. Used to build normalized views over the raw data.

#### BRANCH\_STATE

The state of the branch, either 'draft' or 'activated', 'merged' or 'abandoned'.

#### LAST\_OPEN\_DATETIME

The datetime when the branch was last opened.

#### LAST\_CLOSE\_DATETIME

The datetime when the branch was last closed.

#### LATEST\_RUN\_START

The datetime when the latest run started.

#### INBOUND\_STORAGE\_CONFIGURATION

The storage configuration for sync, if the sync is an inbound sync. This object determines where to store the inbound raw tables and normalized views.

### SYNC\_RECORD\_STATE\_HISTORY

A long term audit table which tracks all inbound and outbound record changes over time. This table is subject to retention policies.

#### SYNC\_RECORD\_STATE\_HISTORY\_ID

The unique ID number for the sync record state history, used as a stable identifier internally.

#### SYNC\_ID

The ID of the sync that this record belongs to.

#### SYNC\_BRANCH\_ID

The ID of the branch that this record belongs to, or null if it belongs to the main sync.

#### CONNECTION\_ID

The ID of the connection that this record belongs to.

#### SYNC\_RUN\_ID

The ID of the sync run that this record belongs to.

#### IDENTIFIER

The unique identifier of the record.

#### EVENT\_DATETIME

The datetime of the event.

#### RECORD

The record content.

#### OUTBOUND\_SYNC\_ACTION

The action taken, if this is an outbound sync.

#### OUTBOUND\_RECORD\_STATE

The state of the source record, if this is an outbound sync.

#### OUTBOUND\_APPLY\_STATE

The apply state, if this is an outbound sync.

#### OUTBOUND\_APPLY\_REASON

The reason the record was included in the sync, if this is an outbound sync.

#### INBOUND\_STREAM\_NAME

The name of the inbound stream, if this is an inbound sync.

#### INBOUND\_IS\_DELETED

Whether the record was deleted, if this is an inbound sync.

#### OUTBOUND\_TRANSFORMED\_RECORD

The transformed record, if this is an outbound sync.

#### OUTBOUND\_RESULT

The result of the record being sync'd, if this is an outbound sync.

### SYNC\_RUN

Represents a Sync Run, which is a single execution of a sync triggered by some scheduler.

#### SYNC\_RUN\_ID

The unique ID number for the sync run, used as a stable identifier internally.

#### SYNC\_ID

The ID of the sync that this run belongs to.

#### SYNC\_BRANCH\_ID

The ID of the branch that this run belongs to, or null if it belongs to the main sync.

#### RUN\_START\_DATETIME

The datetime when the sync run started.

#### RUN\_PREPROCESSING\_START\_DATETIME

The datetime when the sync run preprocessing started.

#### RUN\_PLUGIN\_START\_DATETIME

The datetime when the sync engine invoked the plugin in order to perform sync operations.

#### RUN\_POSTPROCESSING\_START\_DATETIME

The datetime when the sync run postprocessing started.

#### RUN\_END\_DATETIME

The datetime when the sync run ended.

#### RUN\_DEADLINE\_DATETIME

The datetime when the sync run must be completed by, before cancellation occurs.

#### HEALTH\_STATE

The health state of the sync run.

#### INBOUND\_TOTAL\_COUNT

The total number of records in the sync run, if this is an inbound sync. This is calculated after the storage behaviour is applied, so may be less than the number of records retrieved from the remote system.

#### INBOUND\_NEW\_COUNT

The number of records in the sync run which were newly seen, if this is an inbound sync.

#### INBOUND\_CHANGED\_COUNT

The number of records in the sync run which were changed from their previous value, if this is an inbound sync.

#### INBOUND\_DELETED\_COUNT

The number of records in the sync run which were deleted, if this is an inbound sync.

#### INBOUND\_STREAM\_TOTAL\_COUNTS

The total number of records per stream, if this is an inbound sync. This is calculated after the storage behaviour is applied, so may be less than the number of records retrieved from the remote system.

#### INBOUND\_STREAM\_NEW\_COUNTS

The number of records per stream which were newly seen, if this is an inbound sync.

#### INBOUND\_STREAM\_CHANGED\_COUNTS

The number of records per stream which were changed from their previous value, if this is an inbound sync.

#### INBOUND\_STREAM\_DELETED\_COUNTS

The number of records per stream which were deleted, if this is an inbound sync.

#### INBOUND\_COMPLETED\_STREAMS

The names of the streams which have completed, if this is an inbound sync.

#### INBOUND\_SUCCESSFUL\_STREAMS

The names of the streams which were successful, if this is an inbound sync.

#### INBOUND\_ERRORED\_STREAMS

The names of the streams which errored, if this is an inbound sync.

#### INBOUND\_ABANDONED\_STREAMS

The names of the streams which were abandoned, if this is an inbound sync.

#### INBOUND\_CANCELLED\_STREAMS

The names of the streams which were cancelled, if this is an inbound sync.

#### OUTBOUND\_INCLUDED\_RECORDS

The records which were included in the sync, if this is an outbound sync and a record filter applies.

#### OUTBOUND\_EXCLUDED\_RECORDS

The records which were excluded from the sync, if this is an outbound sync and a record filter applies.

#### OUTBOUND\_TOTAL\_COUNT

The total number of records in the sync run, if this is an outbound sync.

#### OUTBOUND\_APPLY\_REASON\_COUNTS

The number of records in the sync run by apply reason, if this is an outbound sync.

#### OUTBOUND\_APPLY\_STATE\_COUNTS

The number of records in the sync run by apply state, if this is an outbound sync.

#### CONNECTION\_ID

The ID of the connection to use for the sync.

#### OUTBOUND\_SOURCE\_DATABASE

The name of the source database, if this is an outbound sync. Some schedulers, such as dbt, may directly set this value when they initiate a run.

#### OUTBOUND\_SOURCE\_SCHEMA

The name of the source schema, if this is an outbound sync. Some schedulers, such as dbt, may directly set this value when they initiate a run.

#### OUTBOUND\_SOURCE\_TABLE

The name of the source table, if this is an outbound sync. Some schedulers, such as dbt, may directly set this value when they initiate a run.

#### OUTBOUND\_SOURCE\_ID\_COLUMN

The name of the ID column in the source table, if this is an outbound sync.

#### OUTBOUND\_SYNC\_STRATEGY

The strategy to use for outbound syncs. This object describes the strategy and also the associated sync actions.

#### CANCELLED\_DATETIME

The datetime when the sync run was cancelled, or null if it wasn't cancelled.

#### GLOBAL\_ERROR

The global error message, if the sync run failed in a catastrophic way and per-record or per-stream errors are not available.

#### INBOUND\_GLOBAL\_ERROR\_BY\_STREAM

The error message for each failed stream, if this is an inbound sync.

#### INBOUND\_STREAMS\_STATE\_START

The initial state for each stream, if this is an inbound sync.

#### INBOUND\_STREAMS\_STATE\_END

The final state for each stream, if this is an inbound sync.

#### INBOUND\_STREAMS\_STATE\_ACTIVE

The active state for each stream, if this is an inbound sync.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/how-it-works/internal-tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
