Snowflake Integration
Connect Contracts.ai to Snowflake, select the data and columns to export, run a full export, and configure subsequent delta exports.
The Snowflake integration exports Contracts.ai data into your Snowflake database for reporting, analytics, and downstream data workflows. Configuration is organization-wide and includes the connection credentials, destination, exported data, columns, and export frequency.
You can run an initial Full export, then use Delta export to send new and changed records and remove records deleted from Contracts.ai.
You must have administrator permissions in Contracts.ai and sufficient access to the destination Snowflake account.
Before you begin
Prepare a dedicated Snowflake integration user with key-pair authentication. Your Snowflake administrator must assign the public key to that user. You will enter the matching private key in Contracts.ai. See Snowflake’s key-pair authentication guide.
Confirm that:
- The destination warehouse, database, and schema already exist.
- The integration user’s role has USAGE on the warehouse, database, and schema.
- The role has CREATE TABLE on the destination schema.
- The role can select, insert, update, and delete rows in the integration’s export tables.
- The role retains ownership or sufficient privileges to add columns to those tables.
Using the same dedicated role to create and maintain the export tables simplifies permission management. Snowflake documents these permissions in its access control reference.
Keep the private key and any passphrase available for setup. Contracts.ai supports PEM-formatted private keys, including encrypted keys supplied with their passphrase.
Open the Snowflake integration
- Open Admin.
- Go to the integrations or connections section.
- Select Snowflake.
The panel shows the connection settings, data and column selection, automatic export frequency, destination table prefix, and last successful export.
Enter the connection details
Complete the Connection section:
| Field | What to enter |
|---|---|
| Account | Your Snowflake account identifier, such as organization-account. Omit https:// and .snowflakecomputing.com. |
| Username | The Snowflake integration user’s login name. |
| Warehouse | The warehouse used to run exports. |
| Database | The existing destination database. |
| Schema | The existing destination schema. |
| Role | The integration role. Optional if the user’s default role has the required access. |
| Private key (PEM) | The complete private key, including its PEM header and footer. |
| Private key passphrase | The passphrase for an encrypted private key. Leave blank for an unencrypted key. |
Warehouse, database, schema, and role names must use standard unquoted identifiers. Names requiring quoted, case-sensitive identifiers are not supported by this integration.
After saving a private key, the panel indicates that a key is saved. Leave the private-key field blank when updating other settings to retain the existing key.
Select data to export
Under Data to export, select at least one data group.
| Data group | Included data |
|---|---|
| Contracts | Titles, dates, parties, status, contract types, tags, eligible contract fields, and custom attribute columns. |
| Counterparties | Counterparty records, corporate profile information, and linked contract counts. |
| Obligations | Obligation types, criticality, due dates, and completion status. |
| Risks | Contract risks and impact or likelihood scores. |
| Custom Attributes | Custom field values across contracts. |
| Departments | Organization department records. |
| Contract Relationships | Links between contracts, including relationship types and descriptions. |
| Users | Organization users and their role assignments. |
| RFP Bids | RFPs, bids, pipeline relationships, customer summaries, and overview metrics. |
Some groups produce multiple destination tables. The records available depend on your organization’s Contracts.ai data.
Select columns
Each selected table has an expandable columns section.
- Expand the table.
- Select the columns required for your reports.
- Repeat for the remaining tables.
All available columns are included by default. Every selected table must retain at least one selected column; saving an empty column selection returns a validation error.
Eligible custom attributes appear in the available contract columns. If you have customized a table’s column selection, review that selection when adding new fields.
Save and test the connection
After entering the connection details and selecting your data:
- Click Save & test connection.
- Wait for the connection test to finish.
- Confirm that Connection: Verified appears.
The test checks authentication and basic database access by creating, writing to, and reading from a temporary table. Exporting also requires the permissions described under Before you begin.
Both export buttons require a verified connection, Enable exports to be selected, and all configuration changes to be saved.
Run the first full export
- Confirm the destination, selected data, and columns.
- Select Enable exports.
- Click Save if you have unsaved changes.
- Confirm that the connection is verified.
- Click Full export.
The export is queued and continues in the background. You do not need to keep the panel open.
A full export replaces the rows in the selected integration tables with the current selected Contracts.ai data. Tables belonging to unselected data groups are left in Snowflake.
After completion, the panel displays Last successful export and the latest per-table results: total source rows, exported rows, and deleted rows.
Run subsequent delta exports
Click Delta export to synchronize changes since the destination’s current exported state.
| Source change | Delta export behavior |
|---|---|
| A new record is added | Inserts the record. |
| Selected values change | Updates the exported record. |
| A record is deleted | Removes the corresponding destination record. |
| Selected values remain unchanged | Does not resend the record. |
You can also start with a delta export: if the destination tables contain no previously exported records, it loads all selected rows automatically.
Delta detection reads the selected source data and compares row fingerprints with those stored in Snowflake. Only changed rows and deletion keys are uploaded. This means a delta can still take time for a large organization, even when relatively few records change.
Destination row changes are committed together. A failed run does not apply a partial set of row updates.
Configure automatic delta exports
Choose a frequency under Automatic delta exports:
| Frequency | Behavior |
|---|---|
| Manual only | Runs only when an administrator clicks an export button. |
| Hourly | Becomes eligible for another automatic delta export after one hour. |
| Daily | Becomes eligible after one day. |
| Weekly | Becomes eligible after seven days. |
| Monthly | Becomes eligible after 30 days. |
Select Enable exports, then click Save.
Automatic runs use delta exports. A newly configured connection may run at the next scheduling check, so run your initial full export before enabling a recurring schedule if you want to control the first load.
Scheduling checks run periodically. These options do not set a specific clock time or calendar date.
To pause exports while retaining the saved connection, clear Enable exports and click Save. This disables both manual and scheduled exports until re-enabled.
Understand the exported tables
Contracts.ai creates organization-specific tables in the configured database and schema. Their names begin with the prefix shown next to Tables in the panel, followed by the dataset table name.
For example:
CK_<organization-specific identifier>_CONTRACTS
Exported data columns use Snowflake VARIANT types to preserve their values. Cast columns to the types required by your reports or BI tools. Column names are lowercase and quoted, so reference them accordingly:
SELECT
"contract_id"::NUMBER AS contract_id,
"title"::VARCHAR AS title
FROM MY_DATABASE.MY_SCHEMA.CK_<IDENTIFIER>_CONTRACTS;
Replace the example destination and table name with your actual values.
The tables also contain _CK_KEY and _CK_HASH, which support record matching and delta detection. Keep these columns intact, and use separate views or tables for downstream transformations.
Change the configuration
Update the connection, data selection, columns, or schedule in the Snowflake panel.
- Make the changes.
- Click Save, or Save & test connection when changing connection details.
- Run Delta export or Full export to apply the updated selection.
Changing the account, username, warehouse, database, schema, role, or private key requires a new successful connection test.
Destination behavior depends on the change:
| Configuration change | What happens |
|---|---|
| Select an additional data group | Its tables are populated on the next export. |
| Select an additional column | The column is added if needed and populated on the next export. |
| Deselect a column | Its existing Snowflake column remains, but its values are cleared during the next successful export of that table. |
| Deselect a data group | Its existing tables and data remain in Snowflake and stop receiving updates. |
| Change the destination | Subsequent exports use the new destination; previous destination data remains. |
Manage obsolete tables and historical copies directly in Snowflake.
Rotate credentials or disconnect
To replace the private key, first configure the matching public key for the Snowflake user. Enter the new private key and its passphrase in Contracts.ai, then click Save & test connection. Snowflake’s key rotation guide explains how to manage the public-key transition.
Click Disconnect to remove the saved private key and passphrase and disable exports. Disconnecting does not delete exported Snowflake tables.
To reconnect, enter a private key, select Enable exports, and run Save & test connection.
Troubleshooting
Connection testing fails
Check the account identifier, username, warehouse, database, schema, and role. Confirm that the private key matches the public key assigned to the Snowflake user and that the passphrase is correct.
Ask your Snowflake administrator to verify the user’s role, object access, and any network policies that could prevent Contracts.ai from connecting.
Full export or Delta export is disabled
Confirm that the connection test succeeded, Enable exports is selected, and all changes are saved. The buttons are also disabled while a save, test, or export request is being submitted.
The connection test passes, but the export fails
The connection test uses a temporary table. Exporting may still fail if the role cannot create permanent tables or read, modify, or add columns to existing export tables.
Verify those permissions, then retry the export.
An export is taking longer than expected
Exports run in the background. Duration depends on source volume, selected tables, and Snowflake performance. Delta exports also read the selected source data to identify changes.
Check Last successful export and the latest results later. If an error appears, verify Snowflake access and retry.
Expected data or columns are missing
Confirm that the relevant group and columns are selected, save the configuration, and run an export. Check that you are querying the correct database, schema, and organization-specific table prefix.
For reporting tools, cast VARIANT columns to the required types.
A scheduled export did not run at the expected time
Confirm that a recurring frequency is saved, Enable exports is selected, and the connection is verified. Schedules are checked periodically and are based on elapsed time since the previous attempt, including failed attempts.
You can run a manual delta export while investigating.
Security recommendations
Use a dedicated Snowflake integration user and role with access limited to the intended destination. Export only the data groups and columns required for your reporting use case.
Restrict access to exported tables and reporting views through Snowflake permissions. Rotate keys according to your organization’s policies, and treat exported contract, user, counterparty, risk, and obligation data according to your security and retention requirements.
Did this answer your question?