How to create activity table table in Snowflake connector Staging?

In the Snowflake Staging connector pattern, the Activity Log table (and its companion “items” table) exists to surface Reltio’s tenant activity history in Snowflake so you can query it like any other dataset. Concretely, its purpose is to.

  • Hold the activity history and metadata for your tenant—“all activities,” with a separate table for the items within an activity—so you can query activity metadata directly in Snowflake. 

  • Provide an audit trail of who did what and when (Reltio tracks all modifying API requests and other actions), enabling filtering by user, time window, and other criteria—now available to analytics via Snowflake. 

  • Serve investigations and governance use cases (e.g., reconciling merges or other lifecycle events) where detailed provenance is needed; Reltio guidance notes Activity Log as a reliable source for event detail when deeper context is required. 

  • Enable export-and-ingest pipelines: Reltio’s Export Service can write Activity Log data (JSON/CSV) to your cloud storage; the staging pipeline (external stage → Snowpipe → stream → task → view) then ingests it to Snowflake for reporting.

 

In short: the Activity Log tables in Snowflake staging give you a queryable, historical audit layer for Reltio activity—powered by export-to-storage and Snowflake ingestion—so compliance, troubleshooting, and lineage questions can be answered with SQL.

In the Snowflake Staging (external storage) connector, syncToDataPipeline only synchronizes the documented object types—entities, relationships, interactions, matches, merges (and links)—not Activities. So it does not update the Activity Log table in the Staging pattern. 

If you need Activities in Snowflake with Staging, the official path is to export Activity Log data to your cloud storage and then ingest it with your stage/pipe/stream/task flow.

The documented way to land it is to export Activity Log to your cloud storage (CSV/JSON) using the Exporting Activity Log Data API, then load it just like any other file set (external stage → pipe → stream → task → view).

Create the Snowflake database, schema, and (optionally) warehouse

Use Snowflake basics per Reltio’s setup section. 

-- Database & schema
CREATE DATABASE IF NOT EXISTS RELTIO_DB;
CREATE SCHEMA IF NOT EXISTS RELTIO_DB.RELTIO_RAW;

-- (Optional) Warehouse for tasks
CREATE WAREHOUSE IF NOT EXISTS RELTIO_WH
  WAREHOUSE_SIZE = 'XSMALL'
  AUTO_SUSPEND = 60
  AUTO_RESUME = TRUE;

 

JSON file format (referenced by Snowpipe)

Create the JSON file format that Snowpipe will use.
 

-- adjust names to your DB/SCHEMA
CREATE OR REPLACE FILE FORMAT RELTIO_JSON_FF
  TYPE = JSON
  STRIP_OUTER_ARRAY = TRUE;

 

External stage (AWS / Azure / GCP)

Create ONE external stage that points to the Reltio-delivered cloud path for your <env>/<tenantId>. Pick your cloud block.
 

AWS (S3)

CREATE OR REPLACE STAGE RELTIO_STAGE
  URL='s3://<bucket>/<env>/<tenantId>/'
  STORAGE_INTEGRATION = <S3_INTEGRATION>;

Azure (Blob)

CREATE OR REPLACE STAGE RELTIO_STAGE
  URL='azure://<account>.blob.core.windows.net/<container>/<env>/<tenantId>/'
  STORAGE_INTEGRATION = <AZURE_INTEGRATION>;

GCP (GCS)

CREATE OR REPLACE STAGE RELTIO_STAGE
  URL='gcs://<bucket>/<env>/<tenantId>/'
  STORAGE_INTEGRATION = <GCS_INTEGRATION>;

If you haven’t wired notification integrations yet (required for AUTO_INGEST Snowpipe), use Reltio’s cloud-specific guides: AWS S3 event notifications / Azure Event Grid / GCP Pub/Sub

 

Landing table (raw JSON)

Per Reltio, the landing table stores raw JSON from the stage.
 

CREATE OR REPLACE TABLE LANDING_ACTIVITIES (
  DATA VARIANT
);

 

Snowpipe (auto-ingest from the external stage)

Create a Snowpipe to copy files into the landing table. If your stage uses object-type folders, you may add a PATTERN in the FROM @RELTIO_STAGE select to scope to Activity Log files; otherwise keep it broad.
 

CREATE OR REPLACE PIPE PIPE_ACTIVITIES
  AUTO_INGEST = TRUE
AS
COPY INTO LANDING_ACTIVITIES
FROM ( SELECT $1 FROM @RELTIO_STAGE )
FILE_FORMAT = (FORMAT_NAME = RELTIO_JSON_FF);

 

Stream on the landing table.

Streams let tasks react to new rows as they arrive via Snowpipe.
 

CREATE OR REPLACE STREAM STR_LANDING_ACTIVITIES
ON TABLE LANDING_ACTIVITIES;

 

Staging table for Activity Log (semi-structured)

Reltio staging setup uses object-type staging tables that your tasks load into.
 

CREATE OR REPLACE TABLE ACTIVITIES_STAGING (
  DATA VARIANT
);

 

Task 

Processing tasks move data from the streamed landing into staging—the standard pattern in the staging pipeline. R

CREATE OR REPLACE TASK RELTIO_DB.RELTIO_STG.TASK_LOAD_ACTIVITIES
  WAREHOUSE = RELTIO_WH
  SCHEDULE = 'USING CRON 0 * * * * America/New_York'
  WHEN SYSTEM$STREAM_HAS_DATA('RELTIO_DB.RELTIO_STG.STR_LANDING_ACTIVITIES')
AS
INSERT INTO RELTIO_DB.RELTIO_STG.ACTIVITIES_STAGING (DATA)
SELECT DATA
FROM RELTIO_DB.RELTIO_STG.STR_LANDING_ACTIVITIES;

ALTER TASK RELTIO_DB.RELTIO_STG.TASK_LOAD_ACTIVITIES RESUME;

 

Views that match the Activity Log datasets for Snowflake

Reltio’s Activity Log Snowflake datasets page defines the official fields. The starter views below project the documented top-level fields and the nested items dataset viaFLATTEN, while staying faithful to that page. Extend as needed, using any additional columns from the same doc. 

-- Top-level Activity Log dataset
CREATE OR REPLACE VIEW RELTIO_DB.RELTIO_STG.ACTIVITY_LOG_VW AS
SELECT
  DATA:"activityID"::STRING        AS activityID,
  DATA:"activityDescription"::STRING AS activityDescription,
  TRY_TO_TIMESTAMP(DATA:"activityTimestamp") AS activityTimestamp,
  DATA:"activitySource"::STRING    AS activitySource,
  DATA                             AS _raw
FROM RELTIO_DB.RELTIO_STG.ACTIVITIES_STAGING;

-- Items dataset (one row per item within an activity)
CREATE OR REPLACE VIEW RELTIO_DB.RELTIO_STG.ACTIVITY_LOG_ITEMS_VW AS
SELECT
  a.DATA:"activityID"::STRING      AS activityID,
  i.value:"id"::STRING             AS itemId,
  i.value:"objectUri"::STRING      AS objectUri,
  -- Add more item fields from the Activity Log Snowflake datasets page if you use them
  i.value                          AS item_raw
FROM RELTIO_DB.RELTIO_STG.ACTIVITIES_STAGING a,
LATERAL FLATTEN( input => a.DATA:"items" ) i;

Reltio’s export can also produce CSV; the official CSV spec for Exported Activities is documented here. If you choose CSV, create a CSV file format and a landing table with the corresponding columns from that spec, then adjust the COPY INTO clause accordingly. (Reltio’s doc also recommends JSON for efficiency.) 

Validate & sync

After objects are in place and your cloud notifications are wired to Snowpipe, use the Synchronize/Validate pages to verify the event flow (even though you’re feeding this pipeline via exports rather than event streaming, the checklist covers Snowflake-side prerequisites).

 

Replace these placeholders

  • <YOUR_WH> — Snowflake warehouse for the task

  • <bucket>/<env>/<tenantId> or Azure/GCP equivalents — the Reltio-provisioned path for your staging pipeline

  • <S3_INTEGRATION>, <AZURE_INTEGRATION>, <GCS_INTEGRATION> — your Snowflake storage integration names

 

How do these steps map to Reltio “Staging.” 

  • The architecture explicitly uses external cloud storage + Snowpipe

  • Reltio’s staging setup is built from landing table → streams → processing tasks → staging tables → views; the SQL above follows those exact building blocks. 

  • Activity Log fielding is documented in Activity Log datasets for Snowflake, which you should use to finish the view’s column list. 

The Export Service is an on-demand job that writes Activity Log files (JSON/CSV) to your cloud storage when you call it—it does not continuously push new activities after initial setup. To keep Snowflake current in the Staging pattern, you should schedule recurring exports (via Console or the Export API) and let your Snowpipe/streams/tasks pick up the new files each time.

Reference: 

https://docs.reltio.com/en/applications/data-integrations/data-pipelines-at-a-glance/reltio-data-pipeline-for-snowflake-at-a-glance/snowflake-pipeline-datasets/datasets-for-the-snowflake-data-schema/activity-log-datasets-for-snowflake

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.