From Data Pipelines to Data Products: Open Data Sharing Meets Snowflake Openflow

Chand Syed

Snowflake RBAC Management with Streamlit

1. Executive Summary

  • Enterprises no longer need only faster pipelines; they need dependable data products that multiple teams and partners can use without rebuilding the same integrations.
  • Snowflake Openflow addresses the movement of data from operational and external systems into governed analytical environments. Sharing capabilities address how approved consumers access the resulting products.
  • Open data sharing is a design goal, not a synonym for every Snowflake sharing mechanism. Native Secure Data Sharing and interoperable Iceberg-based access solve different consumer needs.
  • The strongest architecture defines ownership, freshness, schema contracts, security, and consumer access before adding connectors or publishing datasets.
  • This article follows a practical architecture, implementation examples, validation plan, and real-world use cases.

2. Background

For years, data engineering was measured by whether records reached a warehouse on schedule. That remains essential, but it is no longer sufficient. A customer-order feed is useful only when analysts know what each field means, finance can trust its totals, and downstream teams can consume it through an approved interface. This is the shift from a pipeline deliverable to a data product.

Snowflake Openflow provides a managed integration approach built around connectors and data flows. Its role is to help bring data into the platform; it does not independently guarantee business definitions, access policies, or a stable consumer contract. Those responsibilities belong to the product design and governance layer.

Openflow is built on Apache NiFi concepts: a flow routes records through processors, connections and controller services. Depending on the supported connector and deployment, teams can configure source credentials, ingestion behavior, error handling and destinations. Its value is operational consistency, not a promise that every source or transformation is supported identically.

Openflow flow design in practice begins with source and destination capabilities. A connector may offer initial snapshots, incremental polling or change-data capture (CDC), but the supported mode, ordering guarantees, delete handling and schema evolution vary by connector. Define a source cursor or CDC position, restart behavior, retry policy and target record grain before the first production run.

Apache NiFi concepts help explain Openflow observability: processors perform work; connections buffer FlowFiles; controller services manage reusable configuration; and failure relationships route rejected data for inspection. Back pressure protects downstream systems when queues grow, while provenance and bulletins help investigate failures where supported. Configure credentials through approved secret-management mechanisms rather than embedding passwords in processor properties or code.

A useful operating distinction is between the flow runtime (moving and routing records), the Snowflake landing layer (persisting them), and the data product (a governed, documented contract). Keeping those boundaries explicit makes troubleshooting and ownership easier.

Architecture principle: Ingest once where practical, validate at the product boundary, and publish through the access mechanism that fits the consumer—not simply the mechanism that is easiest for the producer.

When is Openflow the right choice? Use it when a supported connector and managed flow lifecycle reduce custom extraction and retry logic. Existing batch COPY INTO jobs or streaming ingestion may remain appropriate when they already meet the source, latency and operating requirements. Evaluate connector support, deployment constraints and total cost rather than replacing every pipeline by default.

Choosing a sharing route: native Secure Data Sharing is best suited to approved Snowflake-account consumers without copying shared data into their accounts. An Iceberg-based open-format route is useful when compatible non-Snowflake engines need access through a supported catalog and storage model. These are complementary architectures, not interchangeable SQL commands.


3. Problem

3.1 Symptoms

  • Teams build separate extracts for analytics, reporting, and external partners.
  • Source schema changes break downstream transformations without warning.
  • Consumers receive tables but lack documented ownership, freshness, and quality expectations.
  • Broad sharing privileges expose more columns or rows than a consumer needs.

3.2 Impact

The result is duplicated movement, inconsistent metrics, longer onboarding, and governance risk. A product-oriented approach moves attention from “did the load finish?” to “can the consumer reliably use the approved dataset?”


4. Requirements & Assumptions

4.1 Data & SLA

  • Inventory source systems, connector support, expected volumes, and initial versus incremental load requirements.
  • Agree on update frequency, acceptable latency, reconciliation rules, and retention.
  • Specify primary keys, nullability, schema-change handling, and product versioning.

4.2 Security & Compliance

  • Apply least-privilege roles and expose curated views or approved products rather than raw landing data.
  • Evaluate row access, masking, and contractual restrictions before external sharing.
  • Distinguish account-to-account Snowflake sharing from open-format or cross-engine interoperability.

4.3 Tooling & Constraints

Openflow connector coverage, deployment model, supported source operations, and regional availability must be checked for the target Snowflake account. Apache Iceberg interoperability also depends on the chosen catalog, storage, and engine support; an Iceberg table is not automatically accessible to every consumer.

For each Openflow flow, record the connector version, deployment mode, source permissions, target table, expected load mode, back-pressure settings, failure routing and recovery procedure. Check supported features for the selected connector; the SQL in this article manages Snowflake objects after ingestion rather than creating an Openflow flow.

A production readiness checklist should include connectivity, TLS and network egress, credential rotation, least-privilege source reads, source rate limits, initial-load windows, CDC retention, idempotent retries, dead-letter routing, source-to-target reconciliation, environment promotion and rollback. For file feeds, also define file naming, duplicate-file behavior, partial-upload detection and archive policy.

Openflow Gen 2 may expose SQL-managed deployment, runtime and connector objects, while other deployments rely on their respective management interfaces. The exact DDL and connector properties are deployment- and release-specific; the portable examples below intentionally use verified Snowflake SQL for the landing and product layers rather than inventing universal Openflow connector commands.


5. Recommended Architecture

5.1 High-Level Flow

Operational applications, files, and external services feed supported Openflow connectors. Landing tables preserve traceability; curated transformations standardize identifiers and quality checks. Product views or tables establish a documented contract. Authorized consumers then use Snowflake-native sharing or a separately designed interoperable access path.

5.2 Architecture Diagram

Snowflake Openflow data product architecture

5.3 Two Complementary Sharing Patterns

Pattern A — Snowflake Secure Data Sharing: publish approved database objects to another Snowflake account without copying the shared data into the consumer account. It is a strong fit when both parties operate in Snowflake and provider-side governance is clearly defined.

Pattern B — open-format interoperability: design Iceberg-backed datasets and catalog access so compatible engines can work with the same governed data assets. This is not the same command path as creating a Snowflake share; storage permissions, catalog support, and engine compatibility require separate planning.

Open format is about portable table data and metadata, not merely exporting a CSV. Apache Iceberg organizes data files through snapshots and manifests and relies on a compatible catalog for table discovery. Consumers need a supported catalog integration, storage authorization, and compatible read/write semantics; open format does not mean unrestricted access.

For a practical retail example, publish a curated sales dataset as an Iceberg table only after deciding who owns its catalog and storage, which engine may write to it, and how snapshot retention and schema evolution will be managed. The Snowflake Secure Data Sharing commands below do not grant external engines Iceberg access.

Snowflake Secure Data Sharing and open-format interoperability

6. Implementation

Openflow should be configured and deployed using the connector and runtime options documented for the target account. After a controlled initial load, this example follows the data from a landing table through a curated product to two governed consumer interfaces. Section 13 provides the connector configuration sequence; the SQL here begins at the Snowflake destination.

Select the ingestion strategy before publishing: an initial snapshot or polling feed can populate RAW.ORDERS; for a supported CDC source, Section 14 provides a stateful ORDER_EVENTS path. These are alternative source-to-product routes, not two independent feeds to combine without reconciliation.

In both routes, use a stable key, source watermark or event sequence, failure routing, and an agreed recovery procedure. A successful connector status alone does not prove a complete, current business dataset.

6.1 Setup

Retail example: a supported Openflow flow writes orders to the Snowflake landing layer. The following foundation supports snapshot/polling feeds; for CDC, the event-specific landing and state logic is provided in Section 14. Environment-specific connector configuration is not executed by these SQL statements.

CREATE DATABASE IF NOT EXISTS COMMERCE_DATA;
CREATE SCHEMA IF NOT EXISTS COMMERCE_DATA.RAW;
CREATE SCHEMA IF NOT EXISTS COMMERCE_DATA.PRODUCTS;

-- Target of a configured Openflow snapshot/polling feed.
CREATE TABLE IF NOT EXISTS COMMERCE_DATA.RAW.ORDERS (
    ORDER_ID NUMBER,
    CUSTOMER_ID NUMBER,
    ORDER_DATE DATE,
    AMOUNT NUMBER(12, 2),
    UPDATED_AT TIMESTAMP_NTZ
);

For reproducible troubleshooting, add a separate operational audit table. Populate it from a trusted orchestration or monitoring process after each completed ingestion window; Openflow does not automatically populate this custom table.

CREATE TABLE IF NOT EXISTS
    COMMERCE_DATA.RAW.INGEST_AUDIT (
        FLOW_NAME VARCHAR,
        RUN_ID VARCHAR,
        STARTED_AT TIMESTAMP_NTZ,
        FINISHED_AT TIMESTAMP_NTZ,
        SOURCE_ROWS NUMBER,
        LANDED_ROWS NUMBER,
        REJECTED_ROWS NUMBER,
        STATUS VARCHAR
    );

The custom ingestion audit table is populated by trusted orchestration after each completed source window; Openflow does not populate it automatically. Compare counts only when source, landing, and rejection metrics share the same event window and deduplication rules. CDC event counts are not interchangeable with current business-row counts.

SELECT
    FLOW_NAME,
    RUN_ID,
    STATUS,
    SOURCE_ROWS,
    LANDED_ROWS,
    REJECTED_ROWS,
    SOURCE_ROWS - LANDED_ROWS
        - COALESCE(REJECTED_ROWS, 0) AS UNEXPLAINED_ROWS
FROM COMMERCE_DATA.RAW.INGEST_AUDIT
ORDER BY FINISHED_AT DESC
LIMIT 20;

Before enabling a flow, establish a landing-table contract and verify it from Snowflake. The following SQL is a destination-side readiness check, not an Openflow connector deployment command.

SHOW TABLES LIKE 'ORDERS'
    IN SCHEMA COMMERCE_DATA.RAW;
DESCRIBE TABLE COMMERCE_DATA.RAW.ORDERS;

An Openflow ingestion run should be judged by record arrival, freshness and errors rather than by connector status alone. Once records arrive, a simple landing-level check can surface stale updates and unexpected null keys.

SELECT
    COUNT(*) AS ROWS_LOADED,
    MAX(UPDATED_AT) AS LATEST_SOURCE_UPDATE,
    COUNT_IF(ORDER_ID IS NULL) AS NULL_ORDER_IDS,
    COUNT_IF(ORDER_DATE IS NULL) AS NULL_ORDER_DATES
FROM COMMERCE_DATA.RAW.ORDERS;

Before curating orders, verify the landing contract and look for duplicated source keys. The following checks make schema drift and repeated events visible before they reach the shared product.

SELECT
    COLUMN_NAME,
    DATA_TYPE,
    IS_NULLABLE
FROM COMMERCE_DATA.INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'RAW'
  AND TABLE_NAME = 'ORDERS'
ORDER BY ORDINAL_POSITION;
SELECT
    ORDER_ID,
    COUNT(*) AS RECORD_COPIES
FROM COMMERCE_DATA.RAW.ORDERS
WHERE ORDER_ID IS NOT NULL
GROUP BY ORDER_ID
HAVING COUNT(*) > 1
ORDER BY RECORD_COPIES DESC;

A useful ingestion contract also checks invalid amounts, impossible dates and delayed records before promotion. These checks flag anomalies for investigation; whether negative amounts are valid depends on the business treatment of refunds.

SELECT
    COUNT_IF(ORDER_DATE > CURRENT_DATE()) AS FUTURE_DATES,
    COUNT_IF(AMOUNT IS NULL) AS MISSING_AMOUNTS,
    COUNT_IF(UPDATED_AT IS NULL) AS MISSING_CURSORS
FROM COMMERCE_DATA.RAW.ORDERS;

6.2 Core Build Steps

The publication contract defines one row per order date. The snapshot/polling path below retains only the latest valid record per ORDER_ID before aggregation; counting distinct orders without deduplicating the SUM could otherwise double-count replayed updates. The alternate CDC state path in Section 14 can replace this source view once its initial snapshot is reconciled.

If the source emits updates or retries, select the latest valid record per order before building daily aggregates. This example uses UPDATED_AT as the version ordering key; a production design should define a deterministic tie-breaker for equal timestamps.

CREATE OR REPLACE SECURE VIEW
    COMMERCE_DATA.PRODUCTS.LATEST_ORDERS AS
SELECT
    ORDER_ID,
    CUSTOMER_ID,
    ORDER_DATE,
    AMOUNT,
    UPDATED_AT
FROM COMMERCE_DATA.RAW.ORDERS
WHERE ORDER_ID IS NOT NULL
  AND ORDER_DATE IS NOT NULL
  AND AMOUNT IS NOT NULL
QUALIFY ROW_NUMBER() OVER (
    PARTITION BY ORDER_ID
    ORDER BY
        UPDATED_AT DESC NULLS LAST,
        ORDER_DATE DESC,
        AMOUNT DESC,
        CUSTOMER_ID DESC
) = 1;
CREATE OR REPLACE SECURE VIEW
    COMMERCE_DATA.PRODUCTS.DAILY_SALES AS
SELECT
    ORDER_DATE,
    COUNT(*) AS ORDER_COUNT,
    SUM(AMOUNT) AS TOTAL_SALES
FROM COMMERCE_DATA.PRODUCTS.LATEST_ORDERS
GROUP BY ORDER_DATE;

The curated view is intentionally stable even when source connectors evolve. For large datasets, consider incremental materialization using streams, tasks or dynamic tables after confirming their suitability and cost. A secure view provides a governed interface, but its underlying object dependencies and share grants must still be reviewed.

SELECT
    ORDER_DATE,
    ORDER_COUNT,
    TOTAL_SALES
FROM COMMERCE_DATA.PRODUCTS.DAILY_SALES
WHERE ORDER_DATE >= DATEADD('day', -7, CURRENT_DATE())
ORDER BY ORDER_DATE DESC;

A data-product contract should document the grain (one row per ORDER_DATE), time zone, refresh objective, handling of cancellations/refunds, owner, allowed consumers, retention, and backward-compatibility rules. Add a versioned view when a breaking change cannot be avoided.

For a Snowflake-to-Snowflake partner, the producer can grant access to the curated product using Secure Data Sharing. Replace the account identifier with the approved consumer account and review object ownership and sharing eligibility first.

CREATE SHARE IF NOT EXISTS RETAIL_PARTNER_SHARE;

GRANT USAGE ON DATABASE COMMERCE_DATA
    TO SHARE RETAIL_PARTNER_SHARE;
GRANT USAGE ON SCHEMA COMMERCE_DATA.PRODUCTS
    TO SHARE RETAIL_PARTNER_SHARE;
GRANT SELECT ON VIEW
    COMMERCE_DATA.PRODUCTS.DAILY_SALES
    TO SHARE RETAIL_PARTNER_SHARE;

-- Add approved consumer account after access review.
-- ALTER SHARE RETAIL_PARTNER_SHARE
--     ADD ACCOUNTS = <org.account>;

Note: The example publishes a SECURE VIEW. Confirm underlying-object privileges, share eligibility, and the applicable grants in the deployment account before enabling partner access.

Snowflake Secure Data Sharing and Iceberg interoperation address different consumers. The share commands above grant an eligible Snowflake account access to the secure product view; they do not expose an Iceberg catalog or object-storage credentials.

The open-format route is built in Section 16 using an approved external volume and Snowflake-managed Iceberg table. Format selection and snapshot/manifest concepts appear in Section 15. Catalog visibility and external consumer permissions must be verified separately.

For cross-engine publication, agree on table ownership, writer authority, external storage access, catalog integration, and the identity of the target query engine. Test the actual reader before declaring the data product published.

The Snowflake-managed Iceberg CTAS appears once in Section 16. A CTAS creates an initial snapshot; it is not a continuously synchronized copy of DAILY_SALES.

Iceberg maintenance includes monitoring snapshot retention, metadata growth, small files, compaction, and orphan-file cleanup. Those operations are distinct from Openflow ingestion.

A cross-engine acceptance test must read the target Iceberg table through its configured catalog and storage identities, then compare counts, amounts, and snapshot freshness against the governed Snowflake product.

6.3 Configuration Defaults

  • Separate ingestion service roles, transformation roles, and consumer roles.
  • Use explicit data contracts and change notices for fields used by partners.
  • Prefer curated secure views for Snowflake shares and design Iceberg interoperability as a separate tested access path.

7. Validation & Testing

7.1 Functional Validation

Functional validation has two distinct layers. First, the query below checks the published product against its deduplicated transformation input; it returns only mismatches. Second, an independently obtained source baseline must be compared at the same source watermark. A comparison between two derived views alone is not independent source parity.

-- Zero rows means the curated view matches its input.
WITH EXPECTED AS (
    SELECT
        ORDER_DATE,
        COUNT(*) AS ORDER_COUNT,
        SUM(AMOUNT) AS TOTAL_SALES
    FROM COMMERCE_DATA.PRODUCTS.LATEST_ORDERS
    GROUP BY ORDER_DATE
),
PUBLISHED AS (
    SELECT
        ORDER_DATE,
        ORDER_COUNT,
        TOTAL_SALES
    FROM COMMERCE_DATA.PRODUCTS.DAILY_SALES
)
SELECT
    COALESCE(e.ORDER_DATE, p.ORDER_DATE) AS ORDER_DATE,
    e.ORDER_COUNT AS EXPECTED_COUNT,
    p.ORDER_COUNT AS PUBLISHED_COUNT,
    e.TOTAL_SALES AS EXPECTED_SALES,
    p.TOTAL_SALES AS PUBLISHED_SALES
FROM EXPECTED AS e
FULL OUTER JOIN PUBLISHED AS p
    ON e.ORDER_DATE IS NOT DISTINCT FROM p.ORDER_DATE
WHERE e.ORDER_DATE IS NULL
   OR p.ORDER_DATE IS NULL
   OR e.ORDER_COUNT IS DISTINCT FROM p.ORDER_COUNT
   OR e.TOTAL_SALES IS DISTINCT FROM p.TOTAL_SALES
ORDER BY ORDER_DATE;

Reject null ORDER_DATE values at the product boundary and investigate them in the landing layer. This query uses a null-safe comparison for completeness; the published view itself excludes null order dates. Schema contract enforcement is covered in Section 17.

Independent reconciliation requires a source-produced baseline for a consistent snapshot or CDC watermark. A separate system or controlled reconciliation process should populate SOURCE_DAILY_BASELINE; Openflow does not create that audit baseline automatically.

-- Source-side baseline: populate independently at a
-- single agreed extraction / CDC watermark.
CREATE TABLE IF NOT EXISTS
    COMMERCE_DATA.RAW.SOURCE_DAILY_BASELINE (
        SOURCE_WATERMARK VARCHAR,
        ORDER_DATE DATE,
        SOURCE_ORDER_COUNT NUMBER,
        SOURCE_TOTAL_SALES NUMBER(18, 2)
    );

The acceptance query below uses an agreed watermark after the source and product have been brought to the same logical point in time. Differences should be resolved before external publication; do not run it against an unrelated later product snapshot.

Before running the following comparison, load the independent source baseline at the approved watermark and pause or logically pin downstream data at that same watermark. The query is a verification example, not a mechanism for fetching source data automatically.

-- Set to an actual reconciled source watermark.
SET RECON_WATERMARK = 'approved_source_watermark';

WITH BASELINE AS (
    SELECT
        ORDER_DATE,
        SOURCE_ORDER_COUNT,
        SOURCE_TOTAL_SALES
    FROM COMMERCE_DATA.RAW.SOURCE_DAILY_BASELINE
    WHERE SOURCE_WATERMARK = $RECON_WATERMARK
),
PRODUCT AS (
    SELECT
        ORDER_DATE,
        ORDER_COUNT,
        TOTAL_SALES
    FROM COMMERCE_DATA.PRODUCTS.DAILY_SALES
)
SELECT
    COALESCE(b.ORDER_DATE, p.ORDER_DATE) AS ORDER_DATE,
    b.SOURCE_ORDER_COUNT,
    p.ORDER_COUNT,
    b.SOURCE_TOTAL_SALES,
    p.TOTAL_SALES
FROM BASELINE AS b
FULL OUTER JOIN PRODUCT AS p
    ON b.ORDER_DATE IS NOT DISTINCT FROM p.ORDER_DATE
WHERE b.ORDER_DATE IS NULL
   OR p.ORDER_DATE IS NULL
   OR b.SOURCE_ORDER_COUNT IS DISTINCT FROM p.ORDER_COUNT
   OR b.SOURCE_TOTAL_SALES IS DISTINCT FROM p.TOTAL_SALES;

7.2 Acceptance Criteria

Confirm agreed freshness, count and amount parity, policy enforcement, successful partner access, and a documented response to schema drift. A successful connector run alone does not satisfy product acceptance.

Confirm connector completion, rejected-record handling, source watermark parity, date-level business totals, schema contract compatibility, secure-share access, and Iceberg catalog visibility. A green Openflow runtime is necessary but not sufficient.


8. Security & Access

Data products should be designed for the smallest useful audience. Publish only required columns, test restricted rows and masked values using actual consumer roles, and review whether shared objects expose sensitive information through joins or indirect identifiers.

Security extends across three planes: the Openflow runtime needs only the source and destination permissions it uses; Snowflake transformations need access to raw inputs; and consumer roles or shares should see only approved product objects. Test every policy using a consumer identity rather than an administrator role.

If the product contains sensitive attributes, apply and test masking or row access policies in the appropriate Snowflake security model before publication. For cross-engine Iceberg readers, do not assume Snowflake role-based policies automatically apply outside Snowflake; enforce access through the external catalog, storage and engine as appropriate.


9. Performance & Cost

9.1 Performance Considerations

Assess the entire journey: source extraction, ingestion backlog, transformation duration, and consumer query patterns. Avoid unnecessary full refreshes and choose product granularity based on actual demand.

Openflow capacity planning should consider source API limits, flow queues, back pressure, retry behavior, and destination throughput. For Iceberg, also account for file sizes, snapshot retention, catalog operations, and external-engine reads. Measure these costs independently instead of assuming an open format removes processing or governance overhead.

9.2 Cost Drivers

  • Openflow ingestion and associated service consumption.
  • Snowflake compute for validation, transformations, and consumer workloads.
  • Storage and external catalog or engine costs for interoperable formats.

9.3 Cost Controls

Track costs per data product, establish ownership for unused feeds, and review incremental-load and warehouse settings against measured demand.

A practical cost review combines ingestion-flow metrics with Snowflake query history. This account-usage example highlights expensive downstream queries; access to ACCOUNT_USAGE and its reporting latency depend on the organization’s permissions and configuration.

SELECT
    QUERY_TYPE,
    COUNT(*) AS QUERY_COUNT,
    ROUND(SUM(TOTAL_ELAPSED_TIME) / 1000, 1)
        AS ELAPSED_SECONDS
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE START_TIME >= DATEADD(
    'day', -7, CURRENT_TIMESTAMP()
)
  AND DATABASE_NAME = 'COMMERCE_DATA'
GROUP BY QUERY_TYPE
ORDER BY ELAPSED_SECONDS DESC;

Cost attribution should separately consider Openflow ingestion, Snowflake compute, external storage, catalog operations and consumer workloads. The query above summarizes downstream query execution time; it is not a complete monetary cost calculation.


10. Operations & Monitoring

10.1 What to Monitor

  • Connector failures, ingestion lag, and source-to-target row reconciliation.

Openflow operations should distinguish transient source failures from persistent mapping errors. Monitor processor bulletins, queued FlowFiles, retries, dead-letter/error paths, and the timestamp of the last successful record; use the capabilities exposed by the chosen deployment.

  • Schema additions, removals, type changes, and contract violations.
  • Share access changes, unusual queries, product usage, and consumption cost.

10.2 Alerting

Alert on missed freshness objectives, failed data-quality gates, or changes that could invalidate a consumer contract—not simply on every successful batch.

10.3 Runbook (Top Issues)

  • Missing records → inspect source extraction window, connector state, and load history.
  • Broken downstream query → compare source schema changes against the published product contract.
  • Partner cannot access product → inspect share grants, secure-view dependencies, and account eligibility.

For daily operations, review ingestion freshness with an explicit time window and investigate lag alongside Openflow’s flow status, queue growth, retries and failure destinations. A healthy SQL count does not prove that the source connector has processed every eligible event.

Suggested runbook thresholds are illustrative: alert if a flow misses its agreed ingestion window, a dead-letter queue grows continuously, source/target counts exceed the defined tolerance, or a published contract changes unexpectedly. Thresholds should be agreed per connector and product SLA.

SELECT FLOW_NAME, RUN_ID, FINISHED_AT, STATUS,
       DATEDIFF('minute',FINISHED_AT,CURRENT_TIMESTAMP())
         AS MINUTES_SINCE_FINISH,
       COALESCE(REJECTED_ROWS,0) AS REJECTED_ROWS
FROM COMMERCE_DATA.RAW.INGEST_AUDIT
WHERE STATUS <> 'SUCCESS'
   OR COALESCE(REJECTED_ROWS,0) > 0
ORDER BY FINISHED_AT DESC;

For Iceberg operations, investigate missing snapshots, catalog visibility delays, unauthorized object-storage reads, unexpected file counts and writer conflicts separately from Openflow ingestion. The two systems have different failure domains even when they support the same data product.


11. Common Pitfalls

  • Calling any shared table an open data product without defining a consumer contract.
  • Assuming Openflow ingestion removes the need for quality tests or transformation logic.
  • Treating Secure Data Sharing and Iceberg interoperability as interchangeable.
  • Publishing raw personal data before validating row-level and column-level controls.

12. Variations / Use Cases

Retail partner reporting: A retailer ingests order and inventory feeds, validates daily sales, and shares a curated product with an approved Snowflake-based distributor. The partner receives consistent metrics without a bespoke nightly export.

Manufacturing supply visibility: Plant events and ERP reference data become a governed operations product. A supplier can receive an approved subset while internal teams retain richer operational detail.

Cross-engine analytics: An organization with Snowflake and other analytical engines evaluates Iceberg-based data products and catalog interoperability. The priority is one governed definition, with access tested for each engine rather than assumed.

Additional examples include CDC-based supplier order status, customer-support event consolidation and multi-engine historical analysis. In each case, define which source changes are incremental, who can replay failures, and who owns the published table snapshot before scaling.

Data product use cases and governed consumption

13. Openflow Deployment and Connector Configuration

Openflow is a managed data-movement capability built on Apache NiFi. Configuration is connector- and deployment-specific: a flow can contain source processors, queues, controller services, record transformations, failure paths and Snowflake destinations. Do not assume that the example SQL in this article deploys an Openflow connector. For Gen 2, consult the current SQL-managed deployment and connector documentation for the exact supported DDL in your account.

13.1 Practical configuration sequence

Begin by selecting a supported source connector and confirming region, runtime type, network connectivity, source privileges, Snowflake target permissions, and supported snapshot/CDC semantics. Provision secrets using the approved mechanism. Configure the source endpoint and initial-load scope, destination database/schema/table, primary key, event timestamp, and mapping rules. Test source connectivity and the destination write path separately.

Next configure operational behavior: bounded queues and back pressure; retry strategy for transient failures; a distinct failure/dead-letter route for malformed records; and a replay policy that avoids duplicate business outcomes. Record the connector version, owner, escalation contact and restart procedure. Promote the flow through development, test and production with environment-specific credentials rather than copying secrets.

13.2 Connector design checklist

For database CDC: validate snapshot consistency, CDC retention, transaction ordering, update/delete semantics and cursor recovery. For REST APIs: handle pagination, rate limits, 429 responses, token renewal and idempotent page replay. For file feeds: detect partial uploads, duplicate filenames, unexpected delimiters, encoding changes and poison files. Each connector has a different contract; only enable behaviors that its documentation explicitly supports.

13.3 Flow-level versus destination-level evidence

Flow-level evidence includes processor state, bulletins, queue depth, failed relationships and source cursor position. Destination-level evidence includes loaded counts, rejected counts, freshness, duplicate business keys and reconciliation against source snapshots. Capture both. A running flow with growing queues is not healthy; a nonempty landing table does not prove the current extraction window completed.

13.4 Worked Connector Configuration Contract

Example: a supported relational-source connector ingests order changes into a Snowflake landing table. In the Openflow management interface, select the documented connector template, choose the runtime/deployment, bind a read-only source credential, and configure the Snowflake destination identity. Set initial snapshot scope, primary-key mapping, and incremental mode only if supported by that connector version. The flow must explicitly route successful records, retriable errors, and invalid records to separate outcomes.

Illustrative Openflow configuration contract (not executable DDL): source = retail.orders; mode = supported initial snapshot followed by CDC; key = order_id; ordering = source commit sequence; target = COMMERCE_DATA.RAW.ORDER_EVENTS; retry = bounded backoff; rejected records = quarantine; freshness alert = cursor lag above the product SLO. Exact property names and runtime support depend on the connector and release.


14. Change Data Capture, Replay and Idempotency

For CDC sources, the connector must land operation type and a monotonic per-order sequence in ORDER_EVENTS. Keep ORDER_STATE as the latest event state, including delete tombstones, so replayed older inserts cannot resurrect deleted orders. The following CDC path is an alternative to the RAW.ORDERS snapshot/polling path described in Section 6.

CREATE TABLE IF NOT EXISTS
    COMMERCE_DATA.RAW.ORDER_EVENTS (
        ORDER_ID NUMBER,
        CUSTOMER_ID NUMBER,
        ORDER_DATE DATE,
        AMOUNT NUMBER(12, 2),
        UPDATED_AT TIMESTAMP_NTZ,
        OPERATION VARCHAR,
        EVENT_SEQUENCE NUMBER
    );

14.1 Stateful CDC: Preventing Deleted-Record Resurrection

A physical delete can allow a stale insert to recreate a previously deleted record. Instead, store the highest processed event sequence and a deletion flag. The following simplified Snowflake MERGE assumes an initial snapshot and a single state row per order; in production, validate sequence uniqueness, checkpointing, and concurrent writes.

-- Persistent tombstones prevent stale event resurrection.
CREATE TABLE IF NOT EXISTS COMMERCE_DATA.RAW.ORDER_STATE (
    ORDER_ID NUMBER,
    CUSTOMER_ID NUMBER,
    ORDER_DATE DATE,
    AMOUNT NUMBER(12, 2),
    UPDATED_AT TIMESTAMP_NTZ,
    EVENT_SEQUENCE NUMBER,
    IS_DELETED BOOLEAN
);

MERGE INTO COMMERCE_DATA.RAW.ORDER_STATE AS t
USING (
    SELECT
        ORDER_ID,
        CUSTOMER_ID,
        ORDER_DATE,
        AMOUNT,
        UPDATED_AT,
        EVENT_SEQUENCE,
        OPERATION
    FROM COMMERCE_DATA.RAW.ORDER_EVENTS
    WHERE ORDER_ID IS NOT NULL
      AND EVENT_SEQUENCE IS NOT NULL
      AND OPERATION IN ('I', 'U', 'D')
    QUALIFY ROW_NUMBER() OVER (
        PARTITION BY ORDER_ID
        ORDER BY EVENT_SEQUENCE DESC, UPDATED_AT DESC
    ) = 1
) AS s
ON t.ORDER_ID = s.ORDER_ID
WHEN MATCHED
    AND s.EVENT_SEQUENCE > t.EVENT_SEQUENCE
    THEN UPDATE SET
        CUSTOMER_ID = s.CUSTOMER_ID,
        ORDER_DATE = s.ORDER_DATE,
        AMOUNT = s.AMOUNT,
        UPDATED_AT = s.UPDATED_AT,
        EVENT_SEQUENCE = s.EVENT_SEQUENCE,
        IS_DELETED = (s.OPERATION = 'D')
WHEN NOT MATCHED THEN INSERT (
    ORDER_ID, CUSTOMER_ID, ORDER_DATE, AMOUNT,
    UPDATED_AT, EVENT_SEQUENCE, IS_DELETED
) VALUES (
    s.ORDER_ID, s.CUSTOMER_ID, s.ORDER_DATE, s.AMOUNT,
    s.UPDATED_AT, s.EVENT_SEQUENCE,
    (s.OPERATION = 'D')
);

After applying and reconciling a supported CDC feed, replace the LATEST_ORDERS secure view with the state-backed definition below. DAILY_SALES then automatically reads the same current-order contract. This source switch is optional: select either the Section 6 snapshot/polling path or this CDC path, and do not switch without completing a controlled initial load.

-- CDC path only: activate after initial state reconciliation.
CREATE OR REPLACE SECURE VIEW
    COMMERCE_DATA.PRODUCTS.LATEST_ORDERS AS
SELECT
    ORDER_ID,
    CUSTOMER_ID,
    ORDER_DATE,
    AMOUNT,
    UPDATED_AT
FROM COMMERCE_DATA.RAW.ORDER_STATE
WHERE IS_DELETED = FALSE
  AND ORDER_ID IS NOT NULL
  AND ORDER_DATE IS NOT NULL
  AND AMOUNT IS NOT NULL;

14.2 Failure Handling and Replay Tests

Test three distinct failures before go-live: (1) temporary source outage—retry with bounded backoff without losing the source checkpoint; (2) malformed event—quarantine the original payload and record a reason without blocking valid records; (3) Snowflake permission or capacity failure—stop advancing the checkpoint until the destination acknowledges durable processing. During recovery, replay a controlled event range and prove business-level idempotency through duplicate and parity checks.

-- Replayed source events.
SELECT
    ORDER_ID,
    EVENT_SEQUENCE,
    COUNT(*) AS COPIES
FROM COMMERCE_DATA.RAW.ORDER_EVENTS
GROUP BY ORDER_ID, EVENT_SEQUENCE
HAVING COUNT(*) > 1
ORDER BY COPIES DESC;

-- Invalid or unsequenced events.
SELECT COUNT(*) AS INVALID_EVENTS
FROM COMMERCE_DATA.RAW.ORDER_EVENTS
WHERE ORDER_ID IS NULL
   OR EVENT_SEQUENCE IS NULL
   OR OPERATION IS NULL
   OR OPERATION NOT IN ('I', 'U', 'D');

15. Open Formats: Parquet, Iceberg, Delta and Hudi

Parquet is a columnar file format; it does not independently provide a transactional table catalog or snapshot protocol. Apache Iceberg adds table metadata, manifests, snapshots, schema/partition evolution and optimistic commit behavior on top of data files. Delta Lake and Apache Hudi are separate open table formats with their own transaction metadata and engine ecosystems. Their availability in a specific Snowflake workflow must be checked; they are not interchangeable CREATE ICEBERG TABLE syntaxes.

Use Iceberg when the target architecture needs a supported open table contract and catalog-driven interoperability. Use native Snowflake tables and Secure Data Sharing when approved consumers operate within Snowflake and no external catalog path is required. A single product can offer both interfaces, but freshness and authorization must be tested independently.

15.1 Iceberg metadata and lifecycle

A catalog resolves a table identifier to its current metadata. Metadata files point to snapshots, which reference manifest lists and manifests describing data files. Readers select a consistent snapshot instead of scanning arbitrary files. Plan for snapshot retention, metadata growth, compaction, orphan-file cleanup and write conflicts. Avoid presenting object storage alone as a governed sharing mechanism.


16. Iceberg Provisioning and Open Catalog Interoperability

Provision a supported external volume with the appropriate cloud-storage identity and location. Validate storage integration and ownership, then create a Snowflake-managed Iceberg table using syntax supported by the account. The following example assumes an administrator has already created APPROVED_ICEBERG_VOLUME. It deliberately does not include fictitious cloud IAM credentials.

DESC EXTERNAL VOLUME APPROVED_ICEBERG_VOLUME;
SHOW ICEBERG TABLES IN SCHEMA COMMERCE_DATA.PRODUCTS;
-- Run once in a prepared environment. Prerequisite:
-- an administrator-created external volume.
CREATE ICEBERG TABLE
    COMMERCE_DATA.PRODUCTS.DAILY_SALES_ICEBERG
    CATALOG = 'SNOWFLAKE'
    EXTERNAL_VOLUME = 'APPROVED_ICEBERG_VOLUME'
    BASE_LOCATION = 'commerce/daily_sales_v2/'
AS
SELECT
    ORDER_DATE,
    ORDER_COUNT,
    TOTAL_SALES
FROM COMMERCE_DATA.PRODUCTS.DAILY_SALES;

This CTAS creates an initial snapshot. It must not be described as a live mirror of DAILY_SALES. A supported publication process must advance the table, measure lag, and test that the authorized external catalog and engine see the resulting snapshots. Re-creating a table is not a substitute for a controlled refresh strategy.

16.1 External-reader acceptance test

Register or expose the table through a supported catalog such as the organization’s approved Iceberg REST catalog / Snowflake Open Catalog integration, as appropriate to the deployment. Authorize the reader identity for both catalog metadata and object storage. From the actual external engine, list the table, read a known snapshot, verify schema, compare row counts and totals, and test a subsequent snapshot. Do not assume Snowflake masking or row policies carry over to a different engine.

16.2 Incremental Iceberg Publication and Parity

Snowflake-managed Iceberg CTAS establishes only the initial table snapshot. Subsequent updates require an explicit, scheduled DML publication process. The MERGE below upserts changed/new dates; removals and restatements of deleted dates require a separate, tested deletion policy. Do not treat the example as an automatically synchronized table.

-- Illustrative scheduled publication; supports inserts/updates.
MERGE INTO
    COMMERCE_DATA.PRODUCTS.DAILY_SALES_ICEBERG AS t
USING (
    SELECT
        ORDER_DATE,
        ORDER_COUNT,
        TOTAL_SALES
    FROM COMMERCE_DATA.PRODUCTS.DAILY_SALES
) AS s
ON t.ORDER_DATE = s.ORDER_DATE
WHEN MATCHED THEN UPDATE SET
    ORDER_COUNT = s.ORDER_COUNT,
    TOTAL_SALES = s.TOTAL_SALES
WHEN NOT MATCHED THEN INSERT (
    ORDER_DATE,
    ORDER_COUNT,
    TOTAL_SALES
) VALUES (
    s.ORDER_DATE,
    s.ORDER_COUNT,
    s.TOTAL_SALES
);
-- Compare published view with the Iceberg snapshot.
WITH PRODUCT AS (
    SELECT
        COUNT(*) AS DAY_COUNT,
        SUM(TOTAL_SALES) AS SALES
    FROM COMMERCE_DATA.PRODUCTS.DAILY_SALES
),
ICEBERG AS (
    SELECT
        COUNT(*) AS DAY_COUNT,
        SUM(TOTAL_SALES) AS SALES
    FROM COMMERCE_DATA.PRODUCTS.DAILY_SALES_ICEBERG
)
SELECT
    p.DAY_COUNT AS PRODUCT_DAYS,
    i.DAY_COUNT AS ICEBERG_DAYS,
    p.SALES AS PRODUCT_SALES,
    i.SALES AS ICEBERG_SALES,
    (p.DAY_COUNT = i.DAY_COUNT
        AND p.SALES IS NOT DISTINCT FROM i.SALES)
        AS PARITY_PASSED
FROM PRODUCT AS p
CROSS JOIN ICEBERG AS i;

Validate counts and totals after each publication, then verify the new snapshot from the authorized external engine. Snowflake SQL confirms the producer-side state but cannot alone prove access through an external Iceberg catalog.


17. Schema Evolution, Contracts and Compatibility

Schema drift can be additive, breaking or semantic. An added nullable column may be safe to land but should not automatically appear in the published view. A removed key or incompatible type must fail validation. A semantic change such as a currency switch may leave column types unchanged, so metadata checks alone are insufficient.

CREATE TABLE IF NOT EXISTS
    COMMERCE_DATA.PRODUCTS.CONTRACT_COLUMNS (
        PRODUCT_NAME VARCHAR,
        COLUMN_NAME VARCHAR,
        EXPECTED_TYPE VARCHAR,
        REQUIRED BOOLEAN
    );
-- Seed the contract without duplicating repeated runs.
MERGE INTO COMMERCE_DATA.PRODUCTS.CONTRACT_COLUMNS AS t
USING (
    SELECT
        COLUMN1 AS PRODUCT_NAME,
        COLUMN2 AS COLUMN_NAME,
        COLUMN3 AS EXPECTED_TYPE,
        COLUMN4 AS REQUIRED
    FROM VALUES
        ('DAILY_SALES', 'ORDER_DATE', 'DATE', TRUE),
        ('DAILY_SALES', 'ORDER_COUNT', 'NUMBER', TRUE),
        ('DAILY_SALES', 'TOTAL_SALES', 'NUMBER', TRUE)
) AS s
ON t.PRODUCT_NAME = s.PRODUCT_NAME
AND t.COLUMN_NAME = s.COLUMN_NAME
WHEN MATCHED THEN UPDATE SET
    EXPECTED_TYPE = s.EXPECTED_TYPE,
    REQUIRED = s.REQUIRED
WHEN NOT MATCHED THEN INSERT (
    PRODUCT_NAME, COLUMN_NAME, EXPECTED_TYPE, REQUIRED
) VALUES (
    s.PRODUCT_NAME, s.COLUMN_NAME,
    s.EXPECTED_TYPE, s.REQUIRED
);
-- Zero rows means required fields/types match.
SELECT
    c.COLUMN_NAME,
    c.EXPECTED_TYPE,
    a.DATA_TYPE AS ACTUAL_TYPE,
    CASE
        WHEN a.COLUMN_NAME IS NULL THEN 'MISSING'
        ELSE 'TYPE_MISMATCH'
    END AS ISSUE
FROM COMMERCE_DATA.PRODUCTS.CONTRACT_COLUMNS AS c
LEFT JOIN COMMERCE_DATA.INFORMATION_SCHEMA.COLUMNS AS a
    ON a.TABLE_SCHEMA = 'PRODUCTS'
   AND a.TABLE_NAME = 'DAILY_SALES'
   AND a.COLUMN_NAME = c.COLUMN_NAME
WHERE c.PRODUCT_NAME = 'DAILY_SALES'
  AND c.REQUIRED = TRUE
  AND (
      a.COLUMN_NAME IS NULL
      OR UPPER(a.DATA_TYPE) <> UPPER(c.EXPECTED_TYPE)
  );

The contract query above reports missing columns and incompatible data-type families; zero rows indicates a pass for this simplified contract. Production contracts should also compare numeric precision/scale and business semantics, and version breaking changes before consumer promotion.


18. Governance, Security and Consumer Boundaries

Treat ingestion, transformation, publication and consumption as distinct security boundaries. Openflow service identities should have source read and destination write permissions only; transformation roles should operate on approved landing tables; consumer roles should access curated products. Apply row access and masking policies where supported and test using consumer identities.

Secure Data Sharing publishes an approved secure view to eligible Snowflake consumers. Review secure-view dependencies, account eligibility, share grants and privacy requirements. For external Iceberg readers, separately authorize catalog and storage access and apply compatible controls in the external query engine. A cross-engine reader with direct file access may bypass policies enforced only by Snowflake SQL.


19. End-to-End Validation and Failure Injection

Validate the entire business journey, not merely a successful flow start. Test: (1) an initial snapshot; (2) a repeated event; (3) an updated order; (4) an out-of-order update; (5) a delete; (6) a source schema addition; (7) an invalid record; (8) a failed connector restart; and (9) a consumer access denial. Each test should have an expected landing result, curated result, audit record and operator response.

Define acceptance tolerances explicitly. For financial aggregates, exact parity may be appropriate after currency and refund rules are normalized. For CDC, the source and target must be compared at the same logical watermark. Include actual consumer-account and external-engine reads; provider-side SQL alone cannot prove sharing works.


20. Operating Model, Observability and Cost

An operational data product needs an owner, SLO, runbook, incident path and cost attribution. Monitor source cursor age, queue depth, processor failures, dead-letter volume, landing freshness, transformation latency, Iceberg snapshot publication lag and consumer query cost. Openflow runtime consumption, Snowflake warehouse compute, cloud object storage, catalog operations and external-engine compute are distinct cost drivers.

Set thresholds from measured source behavior rather than arbitrary universal values. A daily API feed may tolerate hours of lag, while operational CDC may require minutes. Runbooks should explain how to stop ingestion safely, inspect source checkpoints, replay a failed window, avoid duplicate application, republish a snapshot and confirm consumer recovery.

20.1 Operational SLOs and Recovery Ownership

Set an owner and alert threshold for source cursor age, queue growth, rejected records, snapshot publication lag, and consumer availability. The runbook should explain when to stop advancing a checkpoint, how to replay one event window safely, and how to verify recovery from the consumer side.

20.2 Technical Acceptance Checklist for the Retail Example

Before expanding beyond the pilot, confirm a supported Openflow connector/version, a tested snapshot/CDC checkpoint, retry/dead-letter paths, consistent source-level reconciliation, stable consumer contracts, secure-view privileges, Iceberg storage/catalog access, and a successful external read after a new snapshot. Record untested steps as prerequisites, not completed work.


21. Next Steps

Start with one source, one clearly owned data product, and one consumer. Document the business grain, refresh expectation, validation rules, and permitted access before scaling connector coverage. Once the product is trusted, extend the model to more sources and consumer interfaces.

At Boolean Data Systems, we view Openflow and open sharing as complementary parts of a broader discipline: reliable movement creates the foundation, while explicit contracts and governance turn the resulting datasets into reusable business assets. The measure of success is not how many pipelines run; it is how confidently others can use the data.


22. Resources & Further Reading

Official Snowflake documentation should be checked for feature availability and exact syntax in the deployment account:

Chand Syed

Chand Syed

Associate Data Engineer

Boolean Data Systems

Associate Data Engineer at Boolean Data Systems with experience in Snowflake, Matillion ETL, and cloud data pipelines. Skilled in building scalable ETL/ELT workflows, transforming data for analytics, and supporting modern cloud data architectures. Certified in Matillion ETL, Data Productivity, and Cloud Foundations.

About Boolean Data
Systems

Boolean Data Systems is a Snowflake Premier Partner that implements solutions on cloud platforms. We help enterprises make better business decisions with data and solve real-world business analytics and data challenges.

Global
Head Quarters

USA - Atlanta
3970 Old Milton Parkway,
Suite #200, Alpharetta, GA 30005
Ph. : 770-410-7770
Fax : 855-414-2865

Security & Compliance
SOC 2 Type 1 compliant
All rights reserved – Boolean Data Systems