About Openflow Connector for Oracle

Note

The connector is subject to the Snowflake Connector Terms.

This topic describes the basic concepts of Openflow Connector for Oracle, its workflow, and limitations.

About the Openflow Connector for Oracle

The Openflow Connector for Oracle connects an Oracle database instance to Snowflake and replicates data from selected tables in near real-time or on a specified schedule. The connector also creates a log of all data changes, which is available along with the current state of the replicated tables.

Use cases

Use this connector if you’re looking to do the following:

  • Replicate Oracle database tables into Snowflake for comprehensive, centralized reporting.

Openflow requirements

  • The runtime size must be at least Medium. Use a bigger runtime when replicating large data volumes, especially when row sizes are large.

  • The connector does not support multi-node Openflow runtimes. Configure the runtime for this connector with Min nodes and Max nodes set to 1.

Supported Oracle versions

  • Only Oracle database versions 12cR2 and later are supported.

  • On-premises servers

  • Oracle Exadata

  • OCI VM/Bare Metal

  • AWS Custom RDS for Oracle

  • AWS Standard Single-tenant RDS for Oracle

Limitations

  • AWS Standard Multi-tenant RDS for Oracle is not supported.

  • Oracle Autonomous Databases (ATP/ADW) are not supported.

  • Oracle SaaS offerings such as Oracle Fusion Cloud Applications and NetSuite are not supported.

  • The connector requires Openflow deployment version 0.55.0 or later for BYOC.

  • Openflow deployed as part of Snowflake deployment is not supported in PrPr.

  • The Openflow runtime must be created after the required Openflow deployment version is installed.

  • Only Oracle database versions 12cR2 and later are supported.

  • Only database tables containing primary keys can be replicated.

  • The connector works within a single database/container (PDB or CDB). To replicate tables from multiple containers, you must configure separate connector instances for each container.

  • The connector does not support re-adding a column after it is dropped.

How the connector works

The following sections describe how the connector works in various scenarios, including replication, changes in schema, and data retention.

How tables are replicated

The tables are replicated in the following stages:

  1. Schema introspection: The connector discovers the columns in the source table, including the column names and types, then validates them against Snowflake’s and the connector’s Limitations. Validation failures cause this stage to fail, and the cycle completes. After successful completion of this stage, the connector creates an empty destination table.

  2. Snapshot load: The connector copies all data available in the source table into the destination table. If this stage fails, then no more data is replicated. After successful completion, the data from the source table is available in the destination table.

  3. Incremental load: The connector tracks changes in the source table and applies those changes to the destination table. This process continues until the table is removed from replication. Failure at this stage permanently stops replication of the source table, until the issue is resolved.

Table replication status

Interim failures, such as connection errors, do not prevent table replication. However, permanent failures, such as unsupported data types, prevent table replication.

To troubleshoot replication issues or verify that a table has been successfully removed from the replication flow, check the Table State Store:

  1. In the Openflow runtime canvas, right-click a processor group and choose Controller Services. A table listing controller services displays.

  2. Locate the row labeled Table State Store, click the More Three vertical dots indicating more options button on the right side of the row, and then choose View State.

A list of tables and their current states displays. Type in the search box to filter the list by table name. The possible states are:

  • NEW: The table is scheduled for replication but replication hasn’t started.

  • SNAPSHOT_REPLICATION: The connector is copying existing data. This status displays until all records are stored in the destination table.

  • INCREMENTAL_REPLICATION: The connector is actively replicating changes. This status displays after snapshot replication ends and continues to display indefinitely until a table is either removed from replication or replication fails.

  • FAILED: Replication has permanently stopped due to an error.

Note

The Openflow runtime canvas doesn’t display table status changes — only the current table status. However, table status changes are recorded in logs when they occur. Look for the following log message:

Replication state for table <database_name>.<schema_name>.<table_name> changed from <old_state> to <new_state>
Copy

If a permanent failure prevents table replication, remove the table from replication. After you address the problem that caused the failure, you can add the table back to replication. For more information, see Restart table replication.

This topic describes how the Openflow Connector for Oracle handles data retention, including deleted rows, dropped columns, and journal tables. It also describes how Oracle data types are mapped to Snowflake data types.

Understanding data retention

The connector follows a data retention philosophy where customer data is never automatically deleted. You maintain full ownership and control over your replicated data, and the connector preserves historical information rather than permanently removing it.

This approach has the following implications:

  • Rows deleted from the source table are soft-deleted in the destination table rather than physically removed.

  • Columns dropped from the source table are renamed in the destination table rather than dropped.

  • Journal tables are retained indefinitely and are not automatically cleaned up.

Destination table metadata columns

Each destination table includes the following metadata columns that track replication information:

Column name

Type

Description

_SNOWFLAKE_INSERTED_AT

TIMESTAMP_NTZ

The timestamp when the row was originally inserted into the destination table.

_SNOWFLAKE_UPDATED_AT

TIMESTAMP_NTZ

The timestamp when the row was last updated in the destination table.

_SNOWFLAKE_DELETED

BOOLEAN

Indicates whether the row was deleted from the source table. When true, the row has been soft-deleted and no longer exists in the source.

Soft-deleted rows

When a row is deleted from the source table, the connector does not physically remove it from the destination table. Instead, the row is marked as deleted by setting the _SNOWFLAKE_DELETED metadata column to true.

This approach allows you to:

  • Retain historical data for auditing or compliance purposes.

  • Query deleted records when needed.

  • Decide when and how to permanently remove data based on your requirements.

To query only active (non-deleted) rows, filter on the _SNOWFLAKE_DELETED column:

SELECT * FROM my_table WHERE _SNOWFLAKE_DELETED = FALSE;
Copy

To query deleted rows:

SELECT * FROM my_table WHERE _SNOWFLAKE_DELETED = TRUE;
Copy

Dropped columns

When a column is dropped from the source table, the connector does not drop the corresponding column from the destination table. Instead, the column is renamed by appending the __SNOWFLAKE_DELETED suffix to preserve historical values.

For example, if a column named EMAIL is dropped from the source table, it is renamed to EMAIL__SNOWFLAKE_DELETED in the destination table. Rows that existed before the column was dropped retain their original values, while rows added after the drop have NULL in this column.

You can still query historical values from the renamed column:

SELECT EMAIL__SNOWFLAKE_DELETED FROM my_table;
Copy

Renamed columns

Due to limitations in CDC (Change Data Capture) mechanisms, the connector cannot distinguish between a column being renamed and a column being dropped followed by a new column being added. As a result, when you rename a column in the source table, the connector treats this as two separate operations: dropping the original column and adding a new column with the new name.

For example, if you rename a column from A to B in the source table, the destination table will contain:

  • A__SNOWFLAKE_DELETED: Contains values from before the rename. Rows added after the rename have NULL in this column.

  • B: Contains values from after the rename. Rows that existed before the rename have NULL in this column.

Querying renamed columns

To retrieve data from both the original and renamed columns as a single unified column, use a COALESCE or CASE expression:

SELECT
    COALESCE(B, A__SNOWFLAKE_DELETED) AS A_RENAMED_TO_B
FROM my_table;
Copy

Alternatively, using a CASE expression:

SELECT
    CASE
        WHEN B IS NOT NULL THEN B
        ELSE A__SNOWFLAKE_DELETED
    END AS A_RENAMED_TO_B
FROM my_table;
Copy

Creating a view for renamed columns

Rather than manually modifying the destination table, you can create a view that presents the renamed column as a single unified column. This approach is recommended because it preserves the original data and avoids potential issues with ongoing replication.

CREATE VIEW my_table_unified AS
SELECT
    *,
    COALESCE(B, A__SNOWFLAKE_DELETED) AS A_RENAMED_TO_B
FROM my_table;
Copy

Important

Manually modifying the destination table structure (such as dropping or renaming columns) is not recommended, as it may interfere with ongoing replication and cause data inconsistencies.

Journal tables

During incremental replication, changes from the source database are first written to journal tables before being merged into the destination tables. The connector does not automatically remove data from journal tables, as this data may be useful for auditing, debugging, or reprocessing purposes.

Journal tables are created in the same schema as their corresponding destination tables and follow this naming convention:

<TABLE_NAME>_JOURNAL_<timestamp>_<number>

Where:

  • <TABLE_NAME> is the name of the destination table.

  • <timestamp> is the creation timestamp in Unix epoch format (seconds since January 1, 1970), ensuring uniqueness.

  • <number> starts at 1 and increments whenever the destination table schema changes, either due to schema changes in the source table or modifications to column filters.

For example, if your destination table is SALES.ORDERS, the journal table might be named SALES.ORDERS_JOURNAL_1705320000_1.

Important

Do not drop journal tables while replication is in progress. Removing an active journal table may cause data loss or replication failures. Only drop journal tables after the corresponding source table has been fully removed from replication.

Managing journal table storage

If you need to manage storage costs by removing old journal data, you can create a Snowflake task that periodically cleans up journal tables for tables that are no longer being replicated.

Before implementing journal cleanup, verify that:

  • The corresponding source tables have been fully removed from replication.

  • You no longer need the journal data for auditing or processing purposes.

For information on creating and managing tasks for automated cleanup, see Introduction to tasks.

Next steps

Review Openflow Connector for Oracle: Data mapping to understand how the connector maps data types to Snowflake data types. Review Set up tasks for the Openflow Connector for Oracle to set up the connector.