# Home

<h2 align="center">DataPancake Documentation</h2>

<p align="center">Learn how to use DataPancake to build semi-structured data pipelines with <em>zero technical debt</em>.</p>

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><h4>Getting Started</h4></td><td>Learn about DataPancake and build your first pipeline.</td><td><a href="/pages/reRLVQD0tAMVWPSbnMj2">/pages/reRLVQD0tAMVWPSbnMj2</a></td><td data-object-fit="cover"><a href="/files/Mv0TWCKndsLtonwLZpHw">/files/Mv0TWCKndsLtonwLZpHw</a></td></tr><tr><td><h4>How-To Guides</h4></td><td>Learn common DataPancake workflows, step by step.</td><td><a href="/pages/l41QsphXpQDZZimvrV8i">/pages/l41QsphXpQDZZimvrV8i</a></td><td><a href="/files/8W2Uak9cLQftoqunsila">/files/8W2Uak9cLQftoqunsila</a></td></tr><tr><td><h4>Reference Architecture</h4></td><td>Learn how DataPancake works as a Snowflake Native App</td><td><a href="/pages/JniMRxnhQ6EyhNGyqlNV">/pages/JniMRxnhQ6EyhNGyqlNV</a></td><td><a href="/files/rpvPdnLnNFW3titXf6bI">/files/rpvPdnLnNFW3titXf6bI</a></td></tr></tbody></table>

<h2 align="center">DataPancake Features</h2>

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><h4>Data Dictionary</h4></td><td>Create a robust Data Dictionary with AI</td><td><a href="/pages/EJ0oDDuuQjYHIXF9txBl">/pages/EJ0oDDuuQjYHIXF9txBl</a></td><td><a href="/files/pMS2JUev0GpcLUBB3LYS">/files/pMS2JUev0GpcLUBB3LYS</a></td></tr><tr><td><h4>Semantic Model Generator</h4></td><td>Generate accurate semantic models for Cortex Analyst</td><td></td><td><a href="/files/A9ZN0CQJmgBLbVaq03ZZ">/files/A9ZN0CQJmgBLbVaq03ZZ</a></td></tr><tr><td><h4>Bulk Updates</h4></td><td>10x your workflows with bulk spreadsheet updates</td><td></td><td><a href="/files/sF7IiiQq2zM3yHc3F650">/files/sF7IiiQq2zM3yHc3F650</a></td></tr></tbody></table>


# What is DataPancake?

{% embed url="<https://vimeo.com/1095116976/1af89f88a3?share=copy>" %}

DataPancake is a complete solution for semi-structured data. You can now Pancake your data™ - Flatten, normalize, enrich, and secure complex JSON/XML with a Cortex AI Data Dictionary Builder and a Cortex Analyst Semantic Model Generator - all securely inside of Snowflake.

***

### DataPancake's Core Features

<details>

<summary><span data-gb-custom-inline data-tag="emoji" data-code="1f50d">🔍</span> Schema Discovery</summary>

* Recursively scans 100% of your semi-structured data (JSON, XML, Avro, Parquet, and ORC) to discover all attributes including nested arrays, objects, and every polymorphic version of each attribute.
* Detects all 7 polymorphic data type variations (4 primitives, 2 types of arrays, and objects).
* Identifies escaped JSON within string fields.
* Scanning and discovery benefits from Snowflake's vertical scaling.
* Infers Snowflake destination data types including correct datetime formats for accurate type conversion.

</details>

<details>

<summary>🛠️ Pipeline Designer</summary>

* Enables users to customize how each pipeline SQL DDL will be generated.
* Configure foreign key relationships for nested arrays.
* Apply column-level transformation logic during the materialization process.
* Create virtual attributes for derived fields or semantic model metrics and filters.
* Configure row access and column masking policies integration.
* Configure semantic layer of views including additional column-level transformations.

</details>

<details>

<summary>✨ SQL Code Generation</summary>

* Generates SQL DDL code needed to create relational dynamic tables and policy-infused views in Snowflake based on your configured attribute metadata.
* Code-generated Snowflake Dynamic Table SQL DDL using DataPancake ITDCs (Immutable Typed Derived Columns) to create technical-debt-free pipelines.
* Reflects configured transformations, foreign keys, and virtual attributes allowing for post-normalized table joins.
* Code-generated views selecting data from normalized dynamic tables that incorporate row-access and column-masking security policies and additional column-level transformations.
* Code-generated streams, tasks, and tables to track dynamic table metadata including insert and last updated datetime.

</details>

<details>

<summary>🚨 Schema Drift Monitoring</summary>

* Continuously monitors and alerts you when your semi-structured data source schema changes.
* Detects schema drift in semi-structured data sources like JSON and XML.
* Flags changes in data types, structure, and new attributes.
* Alerts users to configure newly discovered attributes and regenerate pipeline code.
* Optionally generates updated pipeline SQL DDL upon schema change detection.

</details>

<details>

<summary>📚 Data Dictionary Builder</summary>

* Creates a comprehensive data dictionary that includes definitions, synonyms, and sample values for every attribute with integration to the Semantic Model Generator for Cortex Analyst.
* Uses your preferred LLM to generate definitions, synonyms, and sample values.
* Extends DataPancake’s system prompt with your own custom context for greater clarity and improved responses.
* Generates descriptions for the data source, nested arrays, and attributes.

</details>

<details>

<summary>🧠 Cortex Analyst Semantic Model Generator</summary>

* Generates Cortex Analyst–ready YAML files that define your complete semantic model.
* Automatically includes relationship metadata based on selected columns.
* Integrated with the Pipeline Designer and Data Dictionary Builder.
* Configures custom metrics, facts, and filters through virtual attributes, then adds verified queries and custom instructions.

</details>


# Understanding the Challenges of Semi-Structured Data

DataPancake is designed to convert semi-structured hierarchical data into relational data using a deep recursive scanning process, user configuration, and then the generating of SQL statements to create extracted and flattened out Dynamic Tables. Also known as, Pancaking your semi-structured data.

The following sections will give you a brief overview of the problems DataPancake is designed to solve, as well as information about the problems themselves to help you understand them in more depth.

Here are some of the problems that DataPancake directly addresses:

* Polymorphic Data (attributes using multiple data types)
* Stringified, Embedded or Escaped JSON Data (JSON Blob inside a string attribute)
* Schema Discovery (Deeply nested objects and arrays)
* Parsing & Querying Semi-Structured Data
* Schema Evolution/Drift

***

### 🔀 **Polymorphic Data**

**Polymorphic data** refers to attributes in a semi-structured document that have different structures which could consist of different attributes from one document to another or identical attributes that have different data types from one document to another. This can occur when documents are receiving raw data from multiple sources, or changes are made to the underlying schema and historical data is not updated. It can easily result in queries which miss large portions of raw data or impact downstream features and analytics.

The following are examples of polymorphic attributes found in a single JSON document. They are intended to provide a basic understanding of polymorphism in data, but are by no means exhaustive:

**Example #1:**

> *property\_type (string)*\
> *address (string)*

```
{
    "_id": "re-8594abcd-3217-4889-ef01-23b45cd6789f",
    "property_id": "PR-5689",
    "property_type": "Mixed-use",
    "address": "123 Main St"
}
```

> *property\_type (object)*\
> *address (object array)*

```
{
    "_id": "re-8594efgh-3217-4889-ef01-23b45cd6789f",
    "property_id": "PR-5690",
    "property_type": {"usage":"Commercial", "sq_ft":20000},
    "address": [{
        "street": "1234 High Tower Rd",
        "city": "Skyline",
        "state": "NY",
        "zip_code": "10101"
        }]
}
```

**Example #2:**

> *amenities (array that contains both primitive and object elements)*

```
"amenities": [
    "Gym",
    "Rooftop Deck",
    {
        "name": "Conference Rooms",
        "availability": "Reservable",
        "capacity": 20
    }
]
```

Issues like the examples above are very common with a flexible format like JSON. DataPancake is designed to help you avoid the issues which result from that flexibility, resulting in poor data quality.

***

### 🧶 **Embedded/Stringified/Escaped JSON**

JSON data can be stored as an escaped string inside an attribute with a string data type. This type of JSON is especially difficult to parse because the schema may be unknown and have its own level of depth and polymorphic state. There is no limit to the level of recursive escaped JSON contained inside a single string attribute.

**Example #1:**

```
{
"customerData": {
    "customers": [
    {
        "customerID": "C011",
        "loyaltyProgram": {
        "enrollmentDate": "{\"datetime_iso\": \"2021-06-01 00:00:00\"}",
        "membershipID": "M011",
        "membershipLevel": "Gold",
        "points": 5000,
        "rewards": "[{\"rewardID\": \"R017\", \"description\": \"10% off next purchase\", \"expirationDate\": \"{\\"datetime_iso\\": \\"2023-12-31 23:59:59\\"}\"}, 
                     {\"rewardID\": \"R018\", \"description\": \"Free shipping\", \"expirationDate\": \"{\\"datetime_us\\": \\"12/31/2023 11:59 PM\\"}\"}
                    ]"
        }
```

***

### 🔍 **Schema Discovery**

When parsing JSON data, it is frequently difficult to know with certainty that the entire schema has been fully documented. Schema-less structures can change at any time, and hierarchical structures like JSON have no limit to the depth of nested objects and arrays. The same things which make JSON a desirable storage format also create challenges for organizations hoping to leverage that data for applications and analytics.

***

### 🧮 **Parsing and Querying Semi-Structured Data**

Snowflake SQL provides excellent support for parsing and processing data, but complex JSON structures require equally complex queries if users want to unpack, unnest, flatten, and relate the data found in them. That level of data complexity and SQL can be difficult to test and troubleshoot. If attributes are not notated precisely, you will receive a null value, and can easily exclude data from your result set if you are not familiar enough with the underlying data to know the value should not be null.

***

### 🌪️ **Schema Evolution (or Schema Drift)**

The structure or schema of JSON can change easily and often accidentally, making it difficult to track and process the changes to upstream data sources. Schema drift can create sudden problems as downstream pipelines are impacted or even broken. This causes delays to reporting, analytics, and even product rollouts when features depend on data from the JSON source.

Applications that are built on document databases which use Snowflake as their analytics platform and repository, suffer as a result of these uncommunicated and often overlooked schema changes. Worse, if the schema has not changed but data has inadvertently become polymorphic due to data migration errors, these types of adverse impacts can occur without something as obvious as a broken dashboard to call attention to the issue.


# Install & Setup

This guide will walk you through installing the free version of DataPancake, upgrading it to the paid version, and completing necessary admin setup steps.

{% hint style="info" %}
**Account Admin** privileges are required for this process.
{% endhint %}

{% stepper %}
{% step %}

### Install & Upgrade DataPancake

1. [Install DataPancake](/guides/miscellaneous-guides/how-to-install-datapancake) from the Snowflake marketplace
2. [Upgrade DataPancake from the free trial](/guides/miscellaneous-guides/how-to-upgrade-datapancake-from-the-free-trial) to use all of its features\
   *Note: While DataPancake is free to install, core features such as pipeline designing and generating code can only be done from the upgraded (purchased) version.*
   {% endstep %}

{% step %}

### Setup DataPancake

1. Build a script to [grant account level privileges to DataPancake](/guides/how-to-guides-script-builder/admin-guides/how-to-grant-account-level-privileges-to-datapancake).
2. [Configure available warehouses for DataPancake](/guides/how-to-guides-script-builder/admin-guides/how-to-configure-available-warehouses-in-datapancake)
3. [Grant role access as needed to DataPancake](/guides/how-to-guides-script-builder/admin-guides/how-to-manage-access-to-datapancake)
   {% endstep %}
   {% endstepper %}

{% hint style="success" %}
DataPancake is now ready to use! Check out the "[Data Source Quick Start](/getting-started/data-source-quick-start)" to walk through creating your first simple data source.
{% endhint %}


# Data Source Quick Start

This quick start will help you implement your first DataPancake pipeline for semi-structured data.

{% hint style="info" %}
**Prerequisite:** Complete the [Install & Setup](/getting-started/install-and-setup) process
{% endhint %}

{% stepper %}
{% step %}

### Create, Scan, & Generate Code for your First Data Source

1. [Load your data into Snowflake](https://docs.snowflake.com/en/guides-overview-loading-data) or access your data via [iceberg tables](https://docs.snowflake.com/en/user-guide/tables-iceberg).
2. Use the [single data source script builder](/guides/how-to-guides-script-builder/data-source-guides/how-to-create-a-single-datapancake-data-source-script-builder) to create and scan your first data source.
3. Monitor the progress of the scan on the "Scans in Process" page. The scanning process will often take several minutes depending on the size of your data and the warehouse used.

{% hint style="success" %}
DataPancake recursively scans your *entire* data source unless you specifically limit the amount of data scanned.
{% endhint %}
{% endstep %}

{% step %}

### Deploy Dynamic Tables and Views (if generated)

1. Navigate to the "Generated SQL" page and select your data source.
2. Copy the generated SQL DDL.
3. In a new Snowflake worksheet or workspace, paste and execute all of the statements to deploy your dynamic tables and views (if generated).

{% hint style="success" %}
You're now ready to start selecting data from your deployed objects!
{% endhint %}
{% endstep %}
{% endstepper %}

## Next Steps

Schema Shaping

Pipline Design

Scan Configuration

Code Generation & Deployment Options

Data Dictionary Builder

Semantic Model Generator

JSON Tutorial<br>


# JSON Tutorial

This detailed tutorial will walk you through creating and configuring a JSON DataPancake pipeline using an example dataset.

{% hint style="info" %}
**How to use this tutorial:**

Reference the screenshots and code blocks for the input values you should use as you follow along.

You can open the linked guides in new tabs to easily return to this tutorial for the next steps in the process.
{% endhint %}

{% stepper %}
{% step %}

### **Deploy Data Objects & Load Data**

Create the table and [load the data](https://docs.snowflake.com/en/guides-overview-loading-data) which can be downloaded here:

{% file src="/files/lRp1oSE5rVD9kay13sYp" %}

Additionally, copy and deploy the [UDFs and security policies](/guides/miscellaneous-guides/json-tutorial-udfs-and-security-policies).

Note: The Enterprise version of DataPancake is required to use the security policies used in this tutorial.
{% endstep %}

{% step %}

### **Create the Data Source**

Use the [Script Builder to generate the initial source](/guides/how-to-guides-script-builder/data-source-guides/how-to-create-a-single-datapancake-data-source-script-builder).

Make sure to check "Start Scan", this will discover the raw schema and attributes.
{% endstep %}

{% step %}

### **Finalize the Schema & Rescan**

[Add schema transformations](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-modify-the-schema).

[Re-scan the data source](/guides/how-to-guides-ui/how-to-scan-the-data-source) with **reset attributes = true**.

Note: After manual metadata edits, reset attributes is no longer available.
{% endstep %}

{% step %}

### **Define Virtual Attributes**

[Create the new virtual attributes](/guides/how-to-guides-ui/pipeline-designer/how-to-create-virtual-attributes)

This is where you can add surrogate primary keys, create calculated fields, and add ordering attributes for dedupe logic.
{% endstep %}

{% step %}

### **Configure Column Materialization**

[Add column materialization rules](/guides/how-to-guides-ui/pipeline-designer/how-to-add-column-materialization-rules) in the dynamic table layer and the secure view layer.
{% endstep %}

{% step %}

### **Apply Column-Level Schema Transformations**

[Apply column-level schema transformations](/guides/how-to-guides-ui/pipeline-designer/how-to-apply-column-level-schema-transformations).

You can also normalize data types and formats, and perform schema consolidation at the field level.
{% endstep %}

{% step %}

### **Merge Polymorphic Versions**

[Merge string, float, and integer variants](/guides/how-to-guides-ui/pipeline-designer/how-to-merge-polymorphic-attribute-versions) into unified attributes.
{% endstep %}

{% step %}

### **Add Aliases**

[Add user-friendly alias names for columns and arrays](/guides/how-to-guides-ui/pipeline-designer/how-to-add-aliases) where needed.
{% endstep %}

{% step %}

### **Configure Array Relationships \[Coming Soon]**

Define parent/child relationships

Note: this is required for semantic model generation.
{% endstep %}

{% step %}

### **Add Security Policies**

[Configure security policies](/guides/how-to-guides-ui/pipeline-designer/how-to-configure-security-policies) such as row-level access rules, and attribute-level security tags.
{% endstep %}

{% step %}

### **Configure Foreign Keys**

Add relationships between flattened entities by [configuring foreign keys](/guides/how-to-guides-ui/pipeline-designer/how-to-configure-foreign-keys).
{% endstep %}

{% step %}

### **Apply Final Metadata Modifications \[Coming Soon]**

{% endstep %}

{% step %}

### **Generate Code**

[Generate the dynamic SQL statements](/guides/how-to-guides-ui/pipeline-designer/how-to-generate-dynamic-sql-statement-code) using your latest configurations.
{% endstep %}

{% step %}

### **Deploy and Validate**

Review and [deploy the generated code](/guides/how-to-guides-ui/how-to-deploy-and-validate-generated-code).

Make sure to perform data quality checks and validate security enforcement.
{% endstep %}
{% endstepper %}

### Pipeline Maintenance

Repeat steps 3 - 13 as many times as needed.


# How to Guides (UI)


# Creating & Configuring Data Sources


# How to Create a Data Source for Data Streamed from Kafka

Create a data source for data streamed from Kafka in DataPancake.

### 1. Grant DataPancake access to the database, schema, and table

Open a new Snowflake SQL file and run the necessary statements for the database, schema, and table which contain the Kafka data. For example:

<pre class="language-sql"><code class="lang-sql"><strong>GRANT USAGE ON DATABASE DB_NAME TO APPLICATION DATAPANCAKE;
</strong>GRANT USAGE ON SCHEMA DB_NAME.SCHEMA_NAME TO APPLICATION DATAPANCAKE;
GRANT REFERENCES, SELECT ON TABLE DB_NAME.SCHEMA_NAME.TABLE_NAME TO APPLICATION DATAPANCAKE;
</code></pre>

{% hint style="info" %}
**Imported databases (e.g. Confluent)**: If your Kafka data lives in an imported database, run:

`GRANT IMPORTED PRIVILEGES ON DATABASE DB_NAME TO APPLICATION DATAPANCAKE;`

Use `GRANT IMPORTED PRIVILEGES` on the imported database instead of granting individual privileges on database, schema, and table.

Need help? Read more about [Snowflake shared databases](https://docs.snowflake.com/en/user-guide/data-sharing-gs)
{% endhint %}

<figure><img src="/files/paWl12VmytIQ9sFvUdgM" alt=""><figcaption></figcaption></figure>

### 2. In DataPancake, navigate to the Data Sources page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/d0b65499-fa95-429a-bd15-f890cea3490a/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=75,198)

### 3. Enter a name for the new data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/0fcceceb-00af-43c4-b4e2-6bc4dee3cafa/ascreenshot.jpeg?tl_px=0,52\&br_px=1376,821\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=410,277)

### 4. Select the data source type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/f87f3bd3-69d1-4690-bd59-931fbb8dfaff/ascreenshot.jpeg?tl_px=0,210\&br_px=1376,979\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=441,277)

### 5. (Optional) Enter data source tags

These are simply used for filtering / searching. For example: `dev`, `prod`, `api`, `csv`

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/79fcc624-d149-48fb-9891-5e05eabb4b85/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=409,340)

### 6. Select "Kafka" for the source stream platform

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/445b6744-8645-4a35-b208-fc306a3a8d96/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=394,399)

### 7. (Optional) Deduplicate Messages

If checked, two dynamic tables will be produced for the root attributes in the semi-structured data source. The first dynamic table will be used to flatten the root attributes. The second dynamic table will be used to filter the flattened rows using a window function (configured in the next step) to produce the most recent message for each primary key.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/b0063838-fb18-419f-b3bf-facbe5eca25f/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=318,388)

### 8. Enter the Deduplication SQL Expression&#x20;

{% hint style="info" %}

### Required only if "Deduplicate Messages" is toggled on

{% endhint %}

The sql expression used to deduplicate the source stream messages based on a primary key and sort order to produce the most recent message. This value is required if the SQL Code Generation feature is selected and the Deduplicate Messages option is enabled.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/33aa1e90-7157-451f-94fa-94be41a4bd68/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=419,454)

### 9. Select the Object Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/39b0d764-a6e9-4863-9291-fc74fdb8f3ff/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=448,377)

### 10. Select the Column Data Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/932f1f67-7dd3-43f5-ab16-4157953ee436/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=485,345)

### 12. Select the Format Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/aa177a2b-31c9-4430-8a10-6f4bcec24882/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=423,451)

### 13. Select the Database

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/7cbeefd2-a485-41ac-b81b-bc34794b2759/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=662,311)

### 14. Select the Schema

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/d16937b4-9e9f-4d13-861b-695ef239d518/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=745,349)

### 15. Select the Object Name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/873f334d-cb10-4184-8dc1-2d52a1b8156f/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=734,419)

### 16. Enter the Column Name

This column name can be a sql expression that refers to a specific path of the semi-structured data source. See the example below.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/6e0517a2-343d-4c1b-b808-ef5334e5f9f5/ascreenshot.jpeg?tl_px=164,161\&br_px=1541,930\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=909,276)

### 17. Click 'Enable Feature Selection'

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/7fd2c224-9f3a-4f74-9333-6a4cf1b14067/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=705,440)

### 18. Select "SQL Code Generation"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/8a592d21-3302-4d0e-a934-ae0bb9f26560/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=751,303)

### 19. Select the Output Object Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/cb3722b0-abef-41aa-843e-825d0fcf2b49/ascreenshot.jpeg?tl_px=0,54\&br_px=1376,823\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=522,277)

### 20. Configure additional settings as needed

[How to configure materialization object & dynamic table settings](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-output-object-and-dynamic-table-settings)\
[How to configure the secure view](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer)\
How to configure schema consolidation (WIP)\
[How to configure schema filters](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-schema-filters)

### 21. Save the data source

The save button is near the bottom of the page.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/7e3bedb1-7015-4942-a840-3434d1b8db90/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=402,387)

### 22. Verify the save completed successfully.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/2c210d97-9275-4a9d-98d2-e005a7182d3b/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=928,104)


# How to Configure Materialization & Dynamic Table Settings

Configure Output Object Settings, Dynamic Table Settings, and Dynamic Table Metadata Settings for a data source.

## Output Object Settings

These settings are used to configure the type of output objects generated, whether to use case sensitivity in the code generation process, whether to include stream message metadata (if applicable), and the deployment location.

### 1. Ensure the Output Object Type is set to "Dynamic Table"

If this is for a one-time materilization process, you can choose "Table" instead.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/434267fd-def9-41ed-a1f3-612af143465f/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=487,114)

### 2. Enter the Root Output Object Name

Required only if you plan to generate dynamic tables for this data source.

This name will be used as the root dynamic table name and as a prefix for all other nested Dynamic Tables created for array attributes.

You do not need to include an underscore at the end of this name. An underscore will be added automatically for all nested Dynamic Tables.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/135cff45-319d-4ae1-a5b0-f3cb9ba91c57/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=486,185)

### 3. (Optional) Enter the Root Output Object Select Prefix Expression

This is a SQL expression added to the beginning of the select clause of the root dynamic table.

This expression is used to include one or more columns (not the source column to be flattened) from the source database object by adding the expression to the beginning of the root level dynamic table select clause.

For multiple columns use a comma separated list. Alias all columns in this list using the 'as' keyword.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/bd2212fa-2661-45bd-a551-3974cc4c012b/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=794,115)

### 4. (Optional) Enter the name of the database the Dynamic Tables will be deployed to.

If left blank, dynamic tables will be deployed to the same database the source database object resides in.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/86ecacdf-ccfe-4f75-9d54-67e1e98d080b/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=736,187)

### 5. (Optional) Enter the name of the schema the Dynamic Tables will be deployed to.

If left blank, dynamic tables will be deployed to the same schema the source database object resides in.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/cb6eccb0-8503-4f59-a22e-3707255f2bfa/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=899,257)

### 6. (Optional) Enable "Include Stream Message Metadata"

If enabled, the core Kafka message metadata will be extracted and included in the root and all nested dynamic table select clauses.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/d17562a5-76ad-4b07-be23-275237707de7/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=416,230)

### 7. (Optional) Enable "Use Case Sensitivity"

If enabled, all output column names will be enclosed with double quotes allowing for the accomodation of special characters in the attribute names.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/e01923ec-8ca3-48cb-b060-159ac8b83906/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=404,262)

***

## Dynamic Table Settings

Dynamic tables are a new type of object in Snowflake that can be used to automatically materialize data based on a schedule similar to how a materialization table, stream (on the source table), and a task with a cron schedule (used to merge CDC events from the stream into the materialized table) would work. For more information see <https://docs.snowflake.com/en/user-guide/dynamic-tables-intro.html>

### 1. Enter the Dynamic Table Warehouse Name

The name of warehouse that will be assigned to the dynamic tables which is a part of the CREATE dynamic table statement. This is the warehouse used to manage all of the data refreshes once the dynamic tables are deployed.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/4b09b28d-253c-43ec-9472-a64443106d4e/ascreenshot.jpeg?tl_px=0,15\&br_px=1376,784\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=398,277)

### 2. Enter the Dynamic Table Target Lag Unit Type

The frequency interval for the dynamic table refresh. This value will be included in the CREATE dynamic table statement.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/ce603188-b50f-4f57-b310-6bc27ca2cf73/ascreenshot.jpeg?tl_px=0,108\&br_px=1376,877\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=454,277)

### 3. Enter the Dynamic Table Target Lag Quantity

The frequency interval quantity for the dynamic table refresh. This value will be included in the CREATE dynamic table statement. The minimum is one minute.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/cfb44144-5b5f-4893-9311-9dc5d81a3d85/ascreenshot.jpeg?tl_px=0,179\&br_px=1376,948\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=372,277)

### 4. (Optional) Enter the Root Dynamic Table Optional Parameters

This value will be included in the CREATE dynamic table statement. See <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table> for available options.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/801c9976-9c73-49f5-973f-949748901e65/ascreenshot.jpeg?tl_px=9,223\&br_px=1385,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,322)

### 5. (Optional) Enter the Nested Dynamic Table Optional Parameters

Optional parameters for the flattened dynamic tables created from nested arrays. This value will be included in the CREATE dynamic table statement. See <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table> for available options.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/c7cd52e0-7581-4732-94c8-a1fbb5085cff/ascreenshot.jpeg?tl_px=14,223\&br_px=1390,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,442)

***

## Dynamic Table Metadata Settings

Metadata tables are used to track changes to dynamic table rows by storing the primary key, a unique UUID, the created at, last action (INSERT or UPDATE), and last updated date for each row in the root dynamic table.

### 1. (Optional) Toggle the Create Metadata for Dynamic Table Inserts

If enabled, SQL DDL code will be generated to create a new table to store the metadata for each row in the root dynamic table.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/5d385f63-9348-474b-b0f5-f2f30a754ba6/ascreenshot.jpeg?tl_px=164,28\&br_px=1541,797\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=627,277)

### 2. (Optional) Toggle the Create Metadata for Dynamic Table Updates

If enabled, the metadata will be created for row updates in additon to inserts.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/1cbc2b25-c287-4de2-a1b3-2861337f6be6/ascreenshot.jpeg?tl_px=164,96\&br_px=1541,865\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=628,277)

### 3. (Optional) Toggle the Create Metadata for Dynamic Table Deletes

If enabled, the metadata will be created for row deletes.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/6e6890ef-4300-4e9d-9e5a-070343193b67/ascreenshot.jpeg?tl_px=164,165\&br_px=1541,934\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=626,276)

### 4. (Optional) Enter the Task Deployment Database Name

The name of the database the metadata table sync task will be deployed to.

{% hint style="info" %}
If any of the 3 ‘Create Metadata’ toggles are toggled on and this is left blank, it will assume the same database name as the source table.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/c612e6f2-a3b9-42a9-8f99-3cc42a39070f/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=633,270)

### 5. (Optional) Enter the Task Deployment Schema Name

The name of the schema the metadata table sync task will be deployed to.

{% hint style="info" %}
If any of the 3 ‘Create Metadata’ toggles are toggled on and this is left blank, it will assume the same schema name as the source table.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/d82acbfd-5404-456c-9c76-2e2c57a3e7f4/ascreenshot.jpeg?tl_px=164,74\&br_px=1541,843\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=632,277)

### 6. Enter the Metadata Table Task Warehouse Name

{% hint style="warning" %}
If any of the 3 ‘Create Metadata’ toggles are enabled, this is **required**.
{% endhint %}

The name of warehouse that will be included in the CREATE Task statement used to create metadata based on changes to the root Dynamic Table.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/25dc782b-6483-4cba-90ff-1e72e2f6f506/ascreenshot.jpeg?tl_px=164,160\&br_px=1541,929\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=643,277)

### 7. Enter the Metadata Table Task Cron Schedule

{% hint style="warning" %}
If any of the 3 ‘Create Metadata’ toggles are enabled, this is **required**.
{% endhint %}

The metadata table task cron schedule used to schedule the metadata updates. The schedule should coincide with the target lag of the dynamic table to be as frequent or more frequent. Examples:

Hourly at 30 minutes after the hour

```python
30 * * * *
```

Daily at 3:00 am

```python
0 3 * * *
```

Weekly at 3:00 am every Monday

```python
0 3 * * MON
```

Monthly at 3:00 am on the 1st of each month

```python
0 3 1 * *
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/d4714201-8c4e-467c-ace8-b7a6d131ca56/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=645,296)

### 8. Enter the Metadata Table Task Schedule Time Zone

{% hint style="warning" %}
If any of the 3 ‘Create Metadata’ toggles are enabled, this is **required**.
{% endhint %}

A cron timezone is required in addition to the cron schedule.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/71ffa2e5-6d43-4b44-a0ce-2652a7c5b0f9/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=642,362)

***

## Next Steps

See [How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer)


# How to Configure the Secure View Layer

Configure the Semantic Layer Settings for a data source.

If configured, the secure semantic view layer and security policy settings will be used to generate CREATE VIEW statements to create a semantic layer that selects data from the generated dynamic tables. One view will be created for each dynamic table.

You can learn more about Snowflake's security policy capabilities here <https://docs.snowflake.com/en/user-guide/security-row-intro> and <https://docs.snowflake.com/en/user-guide/security-column-intro>.

### 1. Enter the Object Type

![](https://colony-recorder.s3.amazonaws.com/files/2026-02-23/5997b78d-e40b-4b4e-8712-05073292354b/ascreenshot_89aa09ba1ea443e7b9c0c4b3c457c9fe_text_export.jpeg)

### 2. Enter the Root Level Name

The name used for the root view for the semantic layer. This value will be used as a prefix for all nested array views.

This value is required if you choose a type of semantic layer object for this data source.

You do not need to include an underscore at the end of this name. An underscore will be added automatically for all nested output objects.

![](https://colony-recorder.s3.amazonaws.com/files/2026-02-23/0afe9122-d798-4e8b-8113-1d34fd4b5723/ascreenshot_6804ffa37a77453d92e2e47a9c5ff418_text_export.jpeg)

### 3. (Optional) Enter the Semantic Layer Deployment Database Name

The name of the database the semantic layer objects will be deployed to.

Explore [deployment options](/core-concepts/reference-architecture/generated-sql-ddl-deployment-options) to learn more.

![](https://colony-recorder.s3.amazonaws.com/files/2026-02-23/d979f37d-d3c2-4289-97e9-c653a35b6c54/ascreenshot_e8b5b281b8184c44b9c2e5ce45c059a2_text_export.jpeg)

### 4. (Optional) Enter the Semantic Layer Deployment Schema Name

The name of the schema the semantic layer objects will be deployed to.

Explore [deployment options](/core-concepts/reference-architecture/generated-sql-ddl-deployment-options) to learn more.

![](https://colony-recorder.s3.amazonaws.com/files/2026-02-23/275292bd-b97b-49f1-b424-2b8ed470343d/ascreenshot_2ed4c310eac54c22a330cc2725ddbeae_text_export.jpeg)

### 5. (Optional) Enter the Primary Row Access Policy Name

The name of the row access policy used for the root level semantic layer object.

![](https://colony-recorder.s3.amazonaws.com/files/2026-02-23/6f0a7bb2-d95f-47fe-b67a-fb5d83bee974/ascreenshot_a2d143dd28ec481096cef0fe3805341e_text_export.jpeg)

### 6. (Optional) Enter the Optional Parameters

Optional parameters for the root level semantic layer object. This value will be included in the CREATE statement.

Visit <https://docs.snowflake.com/en/sql-reference/sql/create-view#optional-parameters> to learn more.

![](https://colony-recorder.s3.amazonaws.com/files/2026-02-23/e8d11a0c-706a-4189-bc1b-e8bcd49a877b/ascreenshot_6da7cee96749485782a99274e8143cef_text_export.jpeg)


# How to Configure Schema Filters

Configure Schema Filters for a data source.

Schema filters are used to exclude parts of the schema from the code generation process.

If filtered, attributes discovered will have a record status of 'inactive' and can be changed back to active at any time. Additionally, the record status for an attribute can be modified in the Pipeline Designer.

{% hint style="warning" %}
You must create a data source *before* you can add Schema Filters.
{% endhint %}

### 1. Enter the name for a new schema filter

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/0c478b79-466b-4ab7-bef9-3ed8e4440e3c/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=344,286)

### 2. Enter the filter RegEx for a new schema filter

This regular expression is used to search the discovered paths so DataPancake can then set the attribute record status to 'inactive'.

{% hint style="info" %}
This can be done *before* or *after* schema discovery. If done after, rescanning is *not* required.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/e9b28433-9d69-4b9b-b3df-b6449638435d/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=637,281)

### 3. Click "Save Schema Filters"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/2a383fd8-216c-4768-9598-bf8a4bd90739/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=423,485)


# How to Configure a Data Source for a Single Semi-Structured Data Column in a Table or View

Configure a table or view data source for semi-structured data.

### 1. Navigate to the Data Sources page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/7040a1ce-0ce6-49ff-9cba-6922522871c9/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=88,197)

### 2. Enter the Data Source name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/6c65eaf3-3e83-4e45-8977-0ec74cb85a06/ascreenshot.jpeg?tl_px=0,188\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=521,276)

### 3. Select Semi-Structured for the Data Source Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/e9c42b67-305c-43da-9ba8-c3340b998c92/ascreenshot.jpeg?tl_px=0,168\&br_px=1376,937\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,277)

### 4. Enter any data source tags

These are DataPancake tags for DataPancake data sources, *not* Snowflake tags.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/8a1a7b22-a806-479e-92b3-8f88297123c9/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=456,305)

### 5. Select the Object type (Table, View, or Materialized View)

{% hint style="info" %}
See the documentation for [External Tables](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-an-external-table-data-source-json-only) or [Iceberg Tables](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-an-iceberg-data-source-json-only) for creating additional types of data sources.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/4cf463fe-bfe7-4c7a-887c-c237977ca3d6/ascreenshot.jpeg?tl_px=0,218\&br_px=1376,987\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=396,277)

### 6. Select the Column Data Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/e2a80c81-0391-4271-a0db-f8ef19d4f8cc/ascreenshot.jpeg?tl_px=0,191\&br_px=1376,960\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=414,277)

### 7. Select the Format Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/483b9839-813a-4573-99d4-fc68f78a640d/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=413,342)

### 8. Select the Database

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/1d675afd-7fee-4cf3-b41b-6d4829cbbc75/ascreenshot.jpeg?tl_px=164,140\&br_px=1541,909\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=716,277)

### 9. Select the Schema

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/01790b6c-1269-4194-80ac-998b67538dd9/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=770,307)

### 10. Select the Object Name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/cc49695c-d418-4de6-b07b-cb3682656dd9/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=737,312)

### 11. Enter the Column Name

Use uppercase, otherwise use "double quotes" to encapsulate the column name if it is case sensitive.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/a889d91e-8dda-4dd8-aafb-46ea6361176d/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=734,316)

### 12. (Optional) Enter Sample Schema Data

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/6d06e716-838c-4b87-be26-63dcffabd044/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=392,333)

### 13. Ensure all required fields are completed

The "Required Fields" section in the bottom of the left-hand sidebar will show exactly which fields must still be completed.

If code generation feature is enabled, see [How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer).

<figure><img src="/files/N5xRLoh4VcaXeYq1uJHM" alt=""><figcaption></figcaption></figure>

### 14. Save the data source (unless the code generation feature has been selected)

If the code generation feature is enabled, you must complete the [Output Object & Dynamic Table Settings](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-output-object-and-dynamic-table-settings) before you can save.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/bac895bf-9813-4ab3-bb1e-8cffc8f7cd25/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=420,521)

***

## Next Steps

[How to Modify Enabled Features for a Data Source](/guides/how-to-guides-ui/modify-enabled-features-for-a-data-source)

[How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer)

Pipeline Designer (WIP)

Data Dictionary Builder (WIP)

Semantic Model Generator (WIP)


# How to Configure a Data Source for a Structured Table or View

Configure a table or view data source for structured data.

### 1. Navigate to the Data Sources page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/45ad5735-447b-4bdc-b263-b7dcc1012aac/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=135,199)

### 2. Enter the data source name.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/00cd03cd-6ec7-49d8-bcd4-ae21a2e75060/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=425,265)

### 3. Select "Structured" for the Data Source Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/184967da-c332-4a73-890b-1034089e0b45/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=438,257)

### 4. Enter any data source tags

These are DataPancake tags for DataPancake data sources, *not* Snowflake tags.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/a46f995c-ea32-4c49-bd93-47b794c4f386/ascreenshot.jpeg?tl_px=0,23\&br_px=1376,792\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=422,277)

### 5. Select the Object type (Table, View, or Materialized View)

{% hint style="info" %}
See the documentation for [External Tables](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-an-external-table-data-source-json-only) or [Iceberg Tables](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-an-iceberg-data-source-json-only) for creating additional types of data sources.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/de59df1a-d5a1-43ac-8973-d13b25e55aae/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=404,387)

### 6. Select the Database

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/9887829c-b214-4652-a367-efe4db04b507/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=414,401)

### 7. Select the Schema

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/1f0e490d-102e-4e58-b801-4a2955a36432/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=426,506)

### 8. Select the Object Name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/69fa4063-cc88-4370-90a9-4259e354428a/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=439,503)

### 9. Ensure all required fields are completed

The "Required Fields" section in the bottom of the left-hand sidebar will show exactly which fields must still be completed.

If code generation feature is enabled, see [How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer).

<figure><img src="/files/N5xRLoh4VcaXeYq1uJHM" alt=""><figcaption></figcaption></figure>

### 10. Save the Data Source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/96ae9e24-9854-4139-92a9-6004bddb8e94/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=416,417)

***

## Next Steps

[How to Modify Enabled Features for a Data Source](/guides/how-to-guides-ui/modify-enabled-features-for-a-data-source)

[How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer)

Pipeline Designer (WIP)

Data Dictionary Builder (WIP)

Semantic Model Generator (WIP)


# How to Configure an External Table Data Source (JSON Only)

Configure an External Table data source.

### 1. Ensure Semi-Structured is selected for the Data Source Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/e9c42b67-305c-43da-9ba8-c3340b998c92/ascreenshot.jpeg?tl_px=0,168\&br_px=1376,937\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,277)

### 2. Select External Table for the Object Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/aa8bfabc-b975-4822-a0a4-4f9389679206/ascreenshot.jpeg?tl_px=0,15\&br_px=1376,784\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=453,277)

### 3. Select the Column Data Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/d906155d-e074-4b05-84f6-a7f1c5d72ddb/ascreenshot.jpeg?tl_px=0,138\&br_px=1376,907\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=405,276)

### 4. Select JSON for the Format Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/63f5990c-641f-4ef3-9f38-6c8e079702df/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=405,278)

### 4. Click "DEMO\_DATA"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/95f9a803-3641-4b24-8cec-3dffdba6117c/ascreenshot.jpeg?tl_px=164,70\&br_px=1541,839\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=665,277)

5\. Click "SAMPLE\_DATA"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/385db496-965e-4bf6-b3b2-8d24ef32d041/ascreenshot.jpeg?tl_px=164,179\&br_px=1541,948\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=663,277)

6\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/6d54e50b-261c-4229-8266-d1ab24fc9c8e/ascreenshot.jpeg?tl_px=164,104\&br_px=1541,873\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=685,277)

7\. Click the "Column Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/0fe82dfd-b397-487b-9084-a547b4fde5b0/ascreenshot.jpeg?tl_px=164,195\&br_px=1541,964\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=624,277)

### Ensure all required fields are completed

The "Required Fields" section in the bottom of the left-hand sidebar will show exactly which fields must still be completed.

If code generation feature is enabled, see [How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer).

<figure><img src="/files/N5xRLoh4VcaXeYq1uJHM" alt=""><figcaption></figcaption></figure>

### 10. Save the Data Source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/96ae9e24-9854-4139-92a9-6004bddb8e94/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=416,417)

***

## Next Steps

[How to Modify Enabled Features for a Data Source](/guides/how-to-guides-ui/modify-enabled-features-for-a-data-source)

[How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer)

Pipeline Designer (WIP)

Data Dictionary Builder (WIP)

Semantic Model Generator (WIP)


# How to Configure an Iceberg Data Source (JSON Only)

Configure an Iceberg data source.

### 1. Ensure Semi-Structured is selected for the Data Source Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/e9c42b67-305c-43da-9ba8-c3340b998c92/ascreenshot.jpeg?tl_px=0,168\&br_px=1376,937\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,277)

### 2. Select the Object Type of 'Iceberg Table'

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/aefd51fe-2e67-4cc3-b78d-a239708315ea/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=443,259)

### 3. Select "String" for the Column Data Type

{% hint style="info" %}
Only String Data Types are supported for Iceberg Tables
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/a392e40d-365e-4ee4-ad03-1c3bd9b7feaa/ascreenshot.jpeg?tl_px=0,104\&br_px=2698,1611\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=439,277)

### 4. Select "JSON" for the Format Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/b8645f8a-3c29-419c-a164-89ae76d25eeb/ascreenshot.jpeg?tl_px=0,262\&br_px=2698,1769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=446,277)

### 5. Select the Database

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/c517eced-643b-4d38-a959-fbf71bfee7d2/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=828,245)

### 6. Select the Schema

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/9139086a-fc8b-45aa-9b67-631a6628541e/ascreenshot.jpeg?tl_px=0,198\&br_px=2698,1705\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=843,277)

### 7. Select the Object Name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/8b0b59a4-c310-495b-ab85-7536622bd93a/ascreenshot.jpeg?tl_px=0,38\&br_px=2698,1545\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=877,277)

### 8. Enter the Column Name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/f5387211-4fc8-42f6-a346-68e3917b14cb/ascreenshot.jpeg?tl_px=0,194\&br_px=2698,1701\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=825,276)

### 9. Ensure all required fields are completed

The "Required Fields" section in the bottom of the left-hand sidebar will show exactly which fields must still be completed.

If code generation feature is enabled, see [How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer).

<figure><img src="/files/N5xRLoh4VcaXeYq1uJHM" alt=""><figcaption></figcaption></figure>

### 10. Save the Data Source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-19/87051b74-f142-4ebd-8171-849ea652dbab/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1927\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=429,277)

***

## Next Steps

[How to Modify Enabled Features for a Data Source](/guides/how-to-guides-ui/modify-enabled-features-for-a-data-source)

[How to Configure the Secure Semantic View Layer](/guides/how-to-guides-ui/creating-and-configuring-data-sources/how-to-configure-the-secure-semantic-view-layer)

Pipeline Designer (WIP)

Data Dictionary Builder (WIP)

Semantic Model Generator (WIP)


# How to Manage a Scan Configuration

Create or modify a scan configuration for a data source.

<h2 align="center">Configure Required Scan Configuration Settings</h2>

### 1. Navigate to the Scan Configurations Page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/6855b824-dc44-4506-9993-093c1390a350/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=134,229)

### 2. Select a data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/e43acb34-1c67-4d26-85b1-9deebb8623c8/ascreenshot.jpeg?tl_px=0,18\&br_px=1376,787\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=467,277)

### 3. Enter the Configuration Name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/873f6d4b-b298-486a-a960-2629470b070a/ascreenshot.jpeg?tl_px=22,0\&br_px=1399,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,172)

### 4. Select the Virtual Warehouse

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/8f11c5b0-d9c4-4a6d-a94f-5bb4b9630619/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=714,414)

### 5. Ensure the Warehouse is Connected

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/b880aa14-f776-4db6-80a6-0104dbf4e193/ascreenshot.jpeg?tl_px=0,1\&br_px=1376,770\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=451,277)

### 6. (Optional) Configure additional settings

[Base Configuration Settings](#optional-base-configuration-settings)

[Scan Schedule Settings](#optional-scan-schedule-settings)

[Data Source Settings](#optional-data-source-settings)

[Vertical Scale Settings](#optional-vertical-scale-settings)

[Source Stream Settings](#optional-source-stream-settings)

### 7. Save the scan configuration

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/06882023-1d27-4119-8b06-439335982411/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=344,514)

***

<h2 align="center">Optional Base Configuration Settings</h2>

### Set the Attribute Create Type

The default Discover create type uses scanned data to create attribute metadata.

The Schema create type uses the Data Source Object Schema Sample data to create the attribute metadata.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/a80d45d6-f212-4ac5-9bee-00d75fdf4182/ascreenshot.jpeg?tl_px=0,119\&br_px=1376,888\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=454,277)

### Update the Scan Configuration Status

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/e298cea1-5df6-49a9-869e-8317b4a499e5/ascreenshot.jpeg?tl_px=0,94\&br_px=1376,863\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=462,276)

### Enable Auto Code Generate

If enabled, DataPancake will automatically generate dynamic table SQL code if the data source's schema or polymorphic state changes.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/01ed1775-4960-46f2-b4a9-9517115a212d/ascreenshot.jpeg?tl_px=0,1\&br_px=1376,770\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=315,277)

***

<h2 align="center">(Optional) Scan Schedule Settings</h2>

### 1. Enable a Scan Schedule

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/2a73768b-3d47-4657-bd34-b0e40f2d2f1e/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=655,121)

### 2. Enter a Cron Schedule

A cron schedule is required if you enable scheduling. See the examples below for valid cron schedules:

Hourly at 30 minutes after the hour

```python
30 * * * *
```

Daily at 3:00 am

```python
0 3 * * *
```

Weekly at 3:00 am every Monday

```python
0 3 * * MON
```

Monthly at 3:00 am on the 1st of each month

```python
0 3 1 * *
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/23cda880-5941-445a-952e-71818bd00401/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=817,187)

### 3. Select a Cron Time Zone

A cron timezone is required in addition to the cron schedule if you enable scheduling.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/8e9f7cd2-3912-4a4b-bbf7-c5bd81375c06/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=780,283)

***

<h2 align="center">(Optional) Data Source Settings</h2>

### Enter a Record Limit

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/4618ecf2-704f-4a91-adf4-464f118f2855/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=489,209)

### Enter a Where Clause

The where clause can only be used with a single procedure call.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/73903adb-add3-40a7-9973-580d207c779a/ascreenshot.jpeg?tl_px=60,2\&br_px=1437,771\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

***

<h2 align="center">(Optional) Vertical Scale Settings</h2>

### Modify the Number of Threads

The number of threads will default to the maximum number of threads available to the virtual warehouse chosen.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/26942d58-3e63-447a-8d0e-934c6aca07e0/ascreenshot.jpeg?tl_px=0,115\&br_px=1376,884\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=484,277)

### Modify the Number of Procedure Calls

The number of scan procedure calls required to process the entire dataset.

Use multiple procedure calls when a single call cannot be completed in under sixty minutes which is the default timeout for the Snowpark Python Sandbox.

The where clause parameter is not available if the number of procedure calls is greater than 1.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/ce556e31-b88f-4606-a8c7-861cad8a679b/ascreenshot.jpeg?tl_px=0,207\&br_px=1376,976\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=500,277)

### Modify the Record Count Per Procedure Call

The record count per procedure is required when the number of procedure calls is greater than 1.

The record count chosen needs to be large enough to process all the rows in the data source but not too large as to create procedure calls with no rows to process based on the criteria you have provided and the number of calls entered.

Ex. 2,000,000 rows can successfully be divided into two calls with 1m records per call. But it cannot be divided into 2 calls with 500,000 rows per call or 3 calls with 2.5m rows per call.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/500061a7-5574-4bcc-aead-2c2d8360a121/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=489,329)

***

<h2 align="center">(Optional) Source Stream Settings</h2>

### Modify the Last Scanned Timestamp

The last timestamp scanned. This value will be used as part of the where clause when scanning data from this data source. To scan the entire datasource remove the timestamp if one exists.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/36f20587-4433-47a8-911b-769164f631ff/ascreenshot.jpeg?tl_px=164,123\&br_px=1541,892\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=816,277)

<h2 align="center"></h2>


# Page

## Configuring DATAPANCAKE Settings in Snowflake

[**Made by Ben Wolff with Scribe**](https://scribehow.com/shared/Configuring_DATAPANCAKE_Settings_in_Snowflake__LxS3wN8cQt27WKSfur30Fw)

1\. Navigate to <https://app.snowflake.com/ayieclp/tdaa_documentation/#/apps/application/DATAPANCAKE/schema/CORE/streamlit/DATAPANCAKE_HOME>

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/dd4d66ab-7fc9-4eb1-b847-d9fde18592c9/ascreenshot.jpeg?tl_px=82,111\&br_px=1458,881\&force_format=jpeg\&q=100\&width=1120.0)

2\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/dd4d66ab-7fc9-4eb1-b847-d9fde18592c9/ascreenshot.jpeg?tl_px=154,0\&br_px=1530,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,235)

3\. Click "udi\_json"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/41073085-8709-4dfb-9436-b80f92e9cec0/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=423,296)

4\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/d3689d15-12e3-4223-9371-3b1e5f7cf36c/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=338,156)

5\. Type "Full Scan Multi Call"

6\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/bde4f86a-2624-4664-8246-09c197e28c29/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=696,207)

7\. Click "DATAPANCAKE\_MEDIUM\_01"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/f4e3cff4-0ae9-4102-8162-eb95c2ffe17f/ascreenshot.jpeg?tl_px=164,2\&br_px=1541,771\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=707,277)

8\. Click the "Number of Procedure Calls\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/e65fc99f-52a0-4605-9376-a6b59275bf3f/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=340,364)

9\. Click the "Record Count Per Procedure Call\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/2b4fd644-a7f6-4298-8c56-4db2b8787c4b/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=395,436)

10\. Type "2500000"

11\. Click the "Order By\*\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/71d6ec1e-fcdd-4d55-b67d-51a18203f82c/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=436,502)

12\. Press \[\[cmd]] + \[\[v]]

13\. Click "Save"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/352303d5-d88b-4977-9596-d3aff131ece3/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=345,451)

14\. Switch to tab Pancake Regression Test Plan Template - Google Sheets"

15\. Click "json\_data:"\_id""

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/8775bd82-b6cf-4592-b347-e40a6ee7aa0c/ascreenshot.jpeg?tl_px=395,134\&br_px=3148,1673\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,276)

16\. Switch to tab DATAPANCAKE\_HOME - DATAPANCAKE - Snowflake"

17\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/dd6404d8-d365-4ccd-82b5-120d983c6605/ascreenshot.jpeg?tl_px=1,0\&br_px=1377,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,167)

18\. Type "Partial Scan Where Clause 1"

19\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/126f0763-13a2-4e1c-96f4-00a0d7ce829f/ascreenshot.jpeg?tl_px=17,0\&br_px=1393,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,175)

20\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/4fae890b-0d64-465e-8c82-8044659a0b47/ascreenshot.jpeg?tl_px=164,125\&br_px=1541,894\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=674,277)

21\. Click "DATAPANCAKE\_MEDIUM\_01"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/f21f68da-d3a6-4ea4-a428-94b153a0b02c/ascreenshot.jpeg?tl_px=164,210\&br_px=1541,979\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=796,277)

22\. Click the "Where Clause" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/25e48676-0fde-4693-932e-aa55b49d8937/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=432,230)

23\. Press \[\[cmd]] + \[\[v]]

24\. Click the "Where Clause" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/0cd6a29d-5259-4242-8010-6613655bbff4/ascreenshot.jpeg?tl_px=11,0\&br_px=1387,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,230)

25\. Click "Save"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/abd6b82a-51ce-459f-a069-4aa3077165ab/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=348,462)

26\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/0059eeb0-34d3-4af0-adb6-a071b8b589cc/ascreenshot.jpeg?tl_px=7,0\&br_px=1384,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,182)

27\. Type "Partial Scan Where Clause 2"

28\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/748b7b49-81ca-4f15-9706-6a225128dc0b/ascreenshot.jpeg?tl_px=68,0\&br_px=1445,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,182)

29\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/4f11a526-9cbe-4ebf-a4c1-4a421a13e06b/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=742,353)

30\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/a773bd35-2f7d-476b-b4b9-e0224d92dbd2/ascreenshot.jpeg?tl_px=164,153\&br_px=1541,922\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=787,276)

31\. Click "DATAPANCAKE\_MEDIUM\_01"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/b305f786-9a95-4035-b4bb-e152458aaf8d/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=849,292)

32\. Click the "Record Limit" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/d5bb02da-d2dd-4aeb-be37-30249e7761f7/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=370,212)

33\. Type "1000"

34\. Click the "Record Limit" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/4618ecf2-704f-4a91-adf4-464f118f2855/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=489,209)

35\. Click the "Where Clause" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/a2722aae-30c2-4c30-9946-92f9b7649597/ascreenshot.jpeg?tl_px=1,1\&br_px=1378,770\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

36\. Press \[\[cmd]] + \[\[v]]

37\. Click the "Where Clause" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/73903adb-add3-40a7-9973-580d207c779a/ascreenshot.jpeg?tl_px=60,2\&br_px=1437,771\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

38\. Click "Save"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/0bf76efd-7e8e-4519-b3af-1686045f5bb5/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=342,453)

39\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/5832f1dd-1ee4-4de1-b4f0-142aa3f28a60/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=475,146)

40\. Type "Partial Scan Order By Limit"

41\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/c7bf4cfa-1632-446f-a23b-48f319a12c8c/ascreenshot.jpeg?tl_px=33,0\&br_px=1409,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,150)

42\. Click the "Record Limit" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/36da1ac2-7d70-46f6-bdee-e075bfc5dfd8/ascreenshot.jpeg?tl_px=0,41\&br_px=1376,810\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=480,277)

43\. Click the "Order By\*\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/e33bada9-04b3-46f4-a2e2-5761bb51e163/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=467,449)

44\. Press \[\[cmd]] + \[\[v]]

45\. Click the "Order By\*\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/ff234c2d-cd8a-408a-b193-b4bac6f82697/ascreenshot.jpeg?tl_px=6,223\&br_px=1382,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,444)

46\. Click "Save"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/f2d3374c-351a-49af-a551-00c6f9ac9155/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=343,533)

47\. Click the "Configuration Name\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/53222634-d392-4f75-b1a3-469919ac7f06/ascreenshot.jpeg?tl_px=109,0\&br_px=1486,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,187)

48\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/b984c5c7-2e48-42ee-b0f9-57ee6f1abe7e/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=609,120)

49\. Click the "Cron Schedule\*\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/986f794d-433a-4f77-96d3-bd45a839e4ba/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=747,186)

50\. Press \[\[cmd]] + \[\[v]]

51\. Click the "Cron Schedule\*\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/23cda880-5941-445a-952e-71818bd00401/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=817,187)

52\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/aec2c1ae-5ec3-496d-af5d-845ba8eb8a7c/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=800,252)

53\. Click "America/New\_York"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/8e9f7cd2-3912-4a4b-bbf7-c5bd81375c06/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=780,283)

54\. Click "Save"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/1cc161f7-1f4b-4beb-bbf4-4fab58d218a3/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=347,451)

55\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/d24676aa-d6b9-4cd7-b711-64009fccf170/ascreenshot.jpeg?tl_px=0,85\&br_px=1376,854\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=311,277)

56\. Click the "Record Limit" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/bc29b31f-695f-49af-b078-c0e565c0aa7c/ascreenshot.jpeg?tl_px=0,195\&br_px=1376,964\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=335,277)

57\. Type "150"

58\. Click the "Record Limit" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-21/567719d9-89e7-4199-9c9d-64091e0bc3b1/ascreenshot.jpeg?tl_px=0,203\&br_px=1376,972\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=401,277)

[**Made with Scribe**](https://scribehow.com/shared/Configuring_DATAPANCAKE_Settings_in_Snowflake__LxS3wN8cQt27WKSfur30Fw)


# How to Configure Schema Consolidation

Configure Schema Consolidation for a data source.

Schema consolidations are used to reduce schemas into a smaller schema using regex expressions.

This is useful when you have multiple schemas that contain similar data and you want to simplify your data model.

For example, if you have a schema for each region, you could consolidate them into a single schema that contains all the data for all regions. This would make it easier to query the data and create reports.

### 1. Enter the Name for the new Conslidation

For example: `X|Gfs|Shipment`

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/6f51fa03-7bd4-4c33-9297-519553fb2526/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=387,203)

### 2. Enter the Search Regex for the new Conslidation

For example: `X|Gfs|Shipment|`

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/6c5f0582-354a-4de6-bcca-949e632d00b8/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=544,197)

### 3. Enter the Search Regex for the Conslidation

For example: `|\d+`

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/73f61919-d6ae-4004-bba6-c9c86b4f2cae/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=800,200)

### 4. Save the new Schema Consolidation

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/c8da21de-b4c4-424b-a448-cfe2d0fc7c18/ascreenshot.jpeg?tl_px=0,156\&br_px=1376,925\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=480,277)

[**Made with Scribe**](https://scribehow.com/shared/Consolidate_Schema_in_Snowflake_and_Google_Sheets__fjtDvspLT5qMkedYfJolfw)


# How to Configure Baseline Scan Settings

Configure Baseline Scan Settings for a data source.

### (Optional) Reset the Baseline Scan Settings from the Data Sources page

Reset the scan default settings to 0. This allow the next scan to recreate the base values used to determine estimated time and completion progress for future scan.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-13/597f82e8-a1f0-48e2-8dd4-9da71c8a3c7e/ascreenshot.jpeg?tl_px=0,156\&br_px=1376,925\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=421,277)


# How to Modify the Schema

### 1. Navigate to the Data Sources page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/70687be1-bc6b-46e1-ba6a-c12e9fde1845/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=93,238)

### 2. Select the data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/0646f064-84ea-463f-9088-dc410aa10156/ascreenshot.jpeg?tl_px=0,49\&br_px=1376,818\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=430,277)

### 3. Scroll down to the Schema Transformation section

Schema transformations are used to modify the source schema during the materialization process.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/5c810102-82a4-4148-a7eb-3fc335dbf410/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=340,167)

### 4. Click the + symbol in the bottom row to add a new schema transformation

To delete a row move your mouse to the leftmost column in the table to reveal a checkbox, check the box, and press the delete key.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/4e7b11b6-75cc-4fed-a69c-c25d8910a83f/ascreenshot.jpeg?tl_px=0,38\&br_px=1376,807\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=267,277)

### 5. Add the required schema transformation properties

For this guide we will add four transforms. See the table below the screenshots for exact values

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/c68b83f0-01fb-439d-b475-6500dd06e91f/ascreenshot.jpeg?tl_px=164,53\&br_px=1541,822\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=722,277)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/37bc5ea0-a876-4210-a190-537a8633a228/ascreenshot.jpeg?tl_px=164,81\&br_px=1541,850\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=593,277)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/4a04a08c-9850-4c24-a38a-62d1cb051194/ascreenshot.jpeg?tl_px=164,110\&br_px=1541,879\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=536,276)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/3427c7aa-5dcc-418a-8a6d-64a52e2f0cea/ascreenshot.jpeg?tl_px=164,148\&br_px=1540,917\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

| Name         | Transformation Type        | Search Attribute Path | Search Expression                                                                                             | Replace Expression | String List Type | String Delimiter Value |
| ------------ | -------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------ | ---------------- | ---------------------- |
| transform\_1 | consolidate schema         |                       | Y\|Cre\|Shipment\|                                                                                            | \|\d+              |                  |                        |
| transform\_2 | transform string to array  | special\_tags\_pipe   |                                                                                                               |                    | primitive        | \|                     |
| transform\_3 | transform string to array  | batch\_tags\_pipe     |                                                                                                               |                    | primitive        | \|                     |
| transform\_4 | transform objects to array | operation\_logs       | ^op\_\[a-z]+-\[0-9a-fA-F]{8}-\[0-9a-fA-F]{4}-\[1-5]\[0-9a-fA-F]{3}-\[89abAB]\[0-9a-fA-F]{3}-\[0-9a-fA-F]{12}$ | codeId             |                  |                        |

### 6. Save the Schema Transformations

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/0ff4330c-61f6-4a26-8f37-2cb0f938bb61/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=308,363)

### 7. Ensure the transformations/consolidations updated successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/46750836-97be-4a2f-9d7c-dbfc8bdee1a3/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=480,137)


# Modify Enabled Features for a Data Source

Enable or disable the Pipeline Designer, SQL Code Generation, Security Policy Integration, Data Dictionary Builder, and Semantic Model Generator as needed for each data source.

### 1. Navigate to the "Data Sources" page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/0a582795-83ee-48ce-8881-35f9f2255f32/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=65,200)

### 2. Select your data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/01e72b52-e738-4698-a798-8a87580b6eb5/ascreenshot.jpeg?tl_px=0,61\&br_px=1376,830\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=423,277)

### 3. Click "Enable Feature Selection"

{% hint style="success" %}
**DataPancake has a value-based pricing model for each feature selected:**

**Pay per attribute, per month used.**

All selected services will generate a unique billing event for the number of attributes contained in the object connected to this data source for each month used.

You are not charged for months where DataPancake is not utilized.

Visit our [pricing page](https://www.datapancake.com/pricing) for more details and our pricing calculator.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/9b0207db-e29d-495e-b774-c00890ae23f2/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=690,297)

### 4. Check the features you want to enable or disable

Some features depend on other features and will be automatically selected if required.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/d5f7bddc-5ff8-4bf6-99da-0a295d329ac6/ascreenshot.jpeg?tl_px=164,67\&br_px=1541,836\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=889,276)

### 5. Click the "Save Data Source" button

You will need to scroll down near the bottom of the page to find the save button.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/7e3bedb1-7015-4942-a840-3434d1b8db90/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=402,387)

### 6. Verify the save completed successfully.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-11/2c210d97-9275-4a9d-98d2-e005a7182d3b/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=928,104)


# How to Scan the Data Source

### 1. Navigate to the Scan Data page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/a50d62c7-d288-454d-aa34-49a703d6debc/ascreenshot.jpeg?tl_px=0,58\&br_px=1376,827\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=44,277)

### 2. Select the data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/c9560c73-110f-4984-8eb2-0bdec72fb6ba/ascreenshot.jpeg?tl_px=0,2\&br_px=1376,771\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=432,277)

### 3. Select the data source scan configuration

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/d672d371-6c6f-4f8a-b102-c45a8337c728/ascreenshot.jpeg?tl_px=55,75\&br_px=1432,844\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,276)

### 4. (Optional) Click "Reset Attributes"

This will delete all existing attributes and re-discover all attributes from the data source.

{% hint style="success" %}
Use this feature after adding schema transformations to apply the changes to the data source discovery
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/7499328a-4c13-41fc-a144-5c9477bf3e11/ascreenshot.jpeg?tl_px=0,59\&br_px=1376,828\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=234,276)

### 5. Start the Scan

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/e9cd6ace-5385-41a2-8875-2cfc8bb3acb0/ascreenshot.jpeg?tl_px=0,121\&br_px=1376,890\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=303,277)

### 6. Ensure the scan starts successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/930102d7-6d66-483b-b204-656c25996ca4/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=494,136)


# Pipeline Designer


# How to Create Virtual Attributes

### Select your data source on the Pipeline Designer page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/de884943-79f0-4f68-9103-5af06028ab32/ascreenshot.jpeg?tl_px=0,13\&br_px=1376,782\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=474,277)

### Open the Virtual Attributes section

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/8aea8bba-1403-4b11-ae84-879f701e81b6/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=386,438)

### Enter the name of the new virtual attribute

{% hint style="info" %}
By default, you will be in "Create New Attribute" mode. After you finish creating a virtual attribute, you can select an existing virtual attribute to edit in that top dropdown to make any updates as needed.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/d3311d0a-491f-4b8c-9720-bda1c105e25f/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=458,270)

### Add the description of the virtual attribute

This description will be used in the semantic model for the attribute.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/ea08ba08-6987-4ff7-833a-6c02fa94b8a6/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=380,261)

### Select the source data type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/5fb783c7-f97b-4ee4-bd86-2a946035e828/ascreenshot.jpeg?tl_px=0,102\&br_px=1376,871\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=377,276)

### Select the Snowflake data type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/090e55e0-da79-4a47-a604-4407d3116e33/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=432,341)

### (Optional) Select the W Question Category

You can select one of the W (What, Where, When, Who, Why) Question categories. This value will be used to determine which section of the semantic model to add the attribute to.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/2cd15a30-3552-4667-947c-f15a91c7c7fe/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=421,314)

### (Optional) Select the Object Array

The object array the virtual attribute will be inserted into. If left blank the virtual attribute will be inserted at the root level.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/ab84d4ad-4877-4a7b-b6d5-b0b0083872cc/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=366,379)

### Enter the SQL Expression

This SQL expression will be used for the Dynamic Table column definition.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/4b249237-d9a8-4ca9-b1b3-fbb1b0611e35/ascreenshot.jpeg?tl_px=62,187\&br_px=1438,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,450)

### Create the virtual attribute

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/efc48671-ad5e-4ed0-a3cf-1d0ee0129f14/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=291,546)

### Ensure the attribute was created successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/a16c0922-0260-410a-bae1-1cfaf56ecbbf/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=379,149)

### Add additional virtual attributes as needed

For the JSON Tutorial, add the customer\_email\_domain virtual attribute:

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-29/efe9991b-e6aa-46b1-beaf-40f0888ecb67/ascreenshot_9fb84171ec564d86a6c2f42591b99619_text_export.jpeg)


# How to Add Column Materialization Rules

### Select your data source on the Pipeline Designer page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/1fb6c73e-c319-48ec-976d-b3c847da7568/ascreenshot.jpeg?tl_px=30,41\&br_px=1407,810\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

### Navigate to the Transformation/Security tab

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/56e21b83-da52-4585-b83f-74403292a8cd/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=498,209)

### Search for the desired attribute in the editable grid

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/b5fa2416-606f-4013-bff4-0a92d5f9462d/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=859,262)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/0b0ec97f-e2ca-40c5-80a9-8e9130e455ba/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=604,384)

### Scroll horizontally to view more columns

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/7e0743a4-83ae-4220-ba45-c81936222ccb/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=481,397)

### Update the materialization transformation type to SQL Expression

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/7b389d58-fb31-408c-9104-b326ec67755e/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=675,479)

### Enter the materialization transformation expression

For the JSON Tutorial, please \[deploy the database tutorial objects], then for the expression use:

```
udf_std_part_number({attribute_name})
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/9a712024-c1d3-4271-a7c4-5223ee9aad1c/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=905,381)

### Enter the materialization transformation description

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/564e7c0c-983d-4ef0-b586-9046abca1258/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=795,384)

### Click save attributes to apply changes

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/beae771a-f655-4cdc-a28b-93f8ce58b23b/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=295,493)


# How to Apply Column-Level Schema Transformations

### Locate the attribute to update

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/9d556846-2f13-4943-922e-4c21b4aeca6a/ascreenshot.jpeg?tl_px=0,137\&br_px=1376,906\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=409,276)

### Add a schema consolidation search value

You may need to horizontally scroll in the editable grid.

For the JSON Tutorial, use:

```
Y|Cre|Shipment
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/4ebf8b1d-b5f3-4c67-b4e8-77090fd2f2e8/ascreenshot.jpeg?tl_px=164,126\&br_px=1541,895\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=538,277)

### Add a schema consolidation SQL expression

For the JSON tutorial, use:&#x20;

```
CONCAT('|',REGEXP_SUBSTR(OBJECT_KEYS(VARIANT_COL)::STRING, 'Y\|Cre\|Shipment\|(\d+)', 1, 1, 'e', 1))
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/8b3c27bd-61da-4eb0-a365-b4fd220c0203/ascreenshot.jpeg?tl_px=164,56\&br_px=1541,825\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=917,277)

### Add more schema consolidation search and expression values

For the JSON tutorial, apply the same values as above to the `Y|Cre|Shipment.shipment_status` attribute.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/ed2ffdca-9644-4fc9-9f47-86fa497ee1c0/ascreenshot.jpeg?tl_px=164,73\&br_px=1541,842\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=624,277)

### Click save to apply changes

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/d9e2edeb-fbc9-493f-b522-d2d9dd1eaeea/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=293,491)


# How to Merge Polymorphic Attribute Versions

This feature allows you to automatically merge all numeric attributes into either the float or string polymorphic version of the attribute by creating a sql expression and an alias.

{% hint style="success" %}
This is useful when you have multiple numeric attributes that represent the same data but in different data types (e.g., str, int, and float).
{% endhint %}

### On the Pipeline Designer, select your data source and click on the Transformation/Security tab

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/5f0f2409-ca75-481a-9a9b-7a74f4618fe2/ascreenshot.jpeg?tl_px=0,26\&br_px=1376,795\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=505,277)

### Open the merge polymorphic versions section

{% hint style="info" %}
**Note:** This operation sets `INCLUDE_IN_SEMANTIC_LAYER` to **TRUE** for the polymorphic version (string or float) that is being merged into, and to **FALSE** for all other polymorphic versions.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/78bb4f9e-09e2-4dc9-889e-0fae1f64014d/ascreenshot.jpeg?tl_px=0,91\&br_px=1376,860\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=409,277)

### Select string in the dropdown to merge numeric attributes into string polymorphic versions

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/33213ef9-1c77-4837-bb04-d7f48e0c7be0/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=413,441)

### Click "Merge Attributes"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/3a5782ab-accf-484b-83fd-15f7e820b56c/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=300,432)

### Select float in the dropdown to merge numeric attributes into the float polymorphic version

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/e95a9d2a-8293-4665-9be8-3572a003f0a3/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=414,402)

### Click "Merge Attributes"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-24/8c2a80a8-5f10-49e7-bceb-2acadfed4a74/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=296,430)


# How to Add Aliases

### Open the Transformation/Security tab in the Pipeline Designer page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/23e1211b-d5a6-477f-a67f-5c7a05e559a0/ascreenshot.jpeg?tl_px=0,0\&br_px=1447,809\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=548,170)

### Find the View Alias column and add alias names for the attributes

For the JSON Tutorial, add the following view alias to the `Y|Cre|Shipment.last_update` attribute:

```
shipment_last_update
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/a327671d-94aa-4394-b916-31af6d1bb4a4/ascreenshot.jpeg?tl_px=0,6\&br_px=1447,815\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=680,277)

Additionally, add the following view alias to the `Y|Cre|Shipment.shipment_status`attribute:

```
shipment_last_status
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/10a52bb9-3c38-41c7-89f8-94d77ac5fc09/ascreenshot.jpeg?tl_px=0,53\&br_px=1447,862\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=682,277)

### Save the Attributes

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/dcdc4fc6-fb0a-4852-a794-ce7abd73e8c6/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=285,495)

### Scroll to the Arrays section

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-26/ba416d68-3e65-4776-85cb-078f1ab3ccf4/ascreenshot.jpeg?tl_px=0,82\&br_px=1376,851\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=312,277)

### Enter dynamic table alias names for the desired array attributes

For the JSON tutorial, find the operation\_logs attribute and use this dynamic table alias name:

```
process_logs
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-14/80109db5-f99e-45a3-a924-be4178e2dfe0/ascreenshot.jpeg?tl_px=164,174\&br_px=1541,943\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=836,277)

Additionally, find the process\_steps attribute and use this dynamic table alias name:

```
process_steps
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-14/c601b6e9-6981-4d11-9f67-f2f20b1fe172/ascreenshot.jpeg?tl_px=164,189\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=839,294)

### Save the Arrays

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-14/c65c55c4-7847-4bb4-9f31-11ca1b346bad/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=378,358)

### Ensure the data source arrays saved

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/bbc94313-b29d-4ba4-bbed-c14ff798e592/ascreenshot.jpeg?tl_px=0,0\&br_px=1447,809\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=682,175)


# How to Configure Array Relationships \[Coming Soon]

### \[Coming Soon]


# How to Configure Security Policies

### Open the Transformation/Security tab in the Pipeline Designer

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/671e0b5b-118c-435c-99f6-e3178036a2a2/ascreenshot.jpeg?tl_px=0,13\&br_px=1447,822\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=544,277)

### Find the Attribute you want to update

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/79710be1-93ac-4272-9090-99cf347dbe65/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=412,338)

### Scroll horizontally and check the "Add to Row Access Policy" to add the attribute to the row access policy

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/72d825df-06bc-4eab-86ac-7c0a1f451916/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=642,334)

### Set the value for the Masking Policy Name

For the JSON Tutorial, set customer\_email to:

```
mp_customer_email
```

and set customer\_phone to:

```
mp_customer_phone
```

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/f71fdc1b-0a2d-44b5-981e-412bbfb3caea/ascreenshot.jpeg?tl_px=0,112\&br_px=1447,921\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=767,277)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/1b2b48a0-460b-4694-a647-7d6793ee7ccd/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=762,278)

### Save the attributes

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/e6849513-7026-4a57-916e-796526ea5f8c/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=341,524)


# How to Configure Foreign Keys

### Scroll to the Array Foreign Keys section in the Pipeline Designer

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/c5da86cc-5813-4554-8296-056466ae9275/ascreenshot.jpeg?tl_px=0,207\&br_px=1447,1016\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=483,277)

### Select an attribute to create foreign key(s)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/b2bbddc3-df27-40b1-9c96-290ee0999c95/ascreenshot.jpeg?tl_px=0,0\&br_px=1447,809\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=494,258)

### Enter a parent attribute name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/3cfb20e5-3ae7-42dd-904a-df2176a4cddb/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=470,321)

### (Optional) Enter a foreign key column alias

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/bf27746a-c3cc-4c04-82f0-543a4c0e4fad/ascreenshot.jpeg?tl_px=0,86\&br_px=1447,895\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=585,277)

### (Optional) Add the foreign key to the row access policy

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/b1744086-cc2e-4654-88e2-e2cb8a770698/ascreenshot.jpeg?tl_px=0,95\&br_px=1447,904\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=881,277)

### Save the foreign key(s)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-27/4d275e45-64d7-4979-90c2-daa448ef846c/ascreenshot.jpeg?tl_px=0,238\&br_px=1447,1048\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=374,426)

### Extra Steps for the JSON Tutorial

If you are following the JSON Tutorial, create the following foreign keys. It may help to use the [bulk update feature for foreign keys](/guides/how-to-guides-bulk-upsert-via-csv/usage/array-foreign-key-bulk-update).

<table><thead><tr><th width="391.5999755859375">ARRAY_NAME</th><th width="454">PARENT_ATTRIBUTE_NAME</th></tr></thead><tbody><tr><td>batch_labels_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>batch_tags_pipe_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>measurement_metric_value_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>operation_logs_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>process_steps_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>product_specifications_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>quality_notes_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>shipments_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>special_tags_pipe_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>suppliers_array_object</td><td>plant_code_work_order_id_pk</td></tr><tr><td>flags_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>nested_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>text_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>equipment_array_object</td><td>process_step_id_str</td></tr><tr><td>items_array_primitive</td><td>shipment_id_str</td></tr><tr><td>batch_labels_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>measurement_metric_value_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>product_specifications_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>quality_notes_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>flags_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>text_array_primitive</td><td>plant_code_work_order_id_pk</td></tr><tr><td>instruments_array_object</td><td>equipment_id_str</td></tr><tr><td>configuration_notes_array_primitive</td><td>equipment_id_str</td></tr><tr><td>calibration_config_array_primitive</td><td>instrument_id_str</td></tr><tr><td>measurements_array_object</td><td>instrument_id_str</td></tr><tr><td>qc_results_array_object</td><td>measurement_id_str</td></tr><tr><td>defect_codes_array_primitive</td><td>qc_id_str</td></tr><tr><td>details_array_primitive</td><td>qc_id_str</td></tr></tbody></table>


# How to Generate Dynamic SQL Statement Code

### Open the Pipeline Designer and select your datasource

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/a95b5d8c-e376-4799-9be5-c0002b95ec59/ascreenshot.jpeg?tl_px=0,51\&br_px=1376,820\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=354,276)

### Click the "Generate Data Source SQL" button in the sidebar

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/d82a1818-e01d-4db0-a737-32a96f803d78/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=103,348)

### Wait for the SQL to be generated

This process can take a few seconds to a few minutes depending on the complexity of your data source.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/cf60d292-3861-481d-9216-ec5262a25468/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=339,137)

### Ensure the SQL statements generate successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/30c5de0d-d160-4762-9922-b162188e130e/ascreenshot.jpeg?tl_px=148,0\&br_px=1524,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,143)


# Data Dictionary Builder


# How to Generate a Data Source Description

### Navigate to the Data Dictionary Builder

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/36550ea9-71d5-4daa-b9c8-d7a696f67c22/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=51,329)

### Select your data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/2f097247-a0a9-41cc-bf28-662d34c270ef/ascreenshot.jpeg?tl_px=159,33\&br_px=1536,802\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

### Select a Cortex AI model

See the [model availability by cloud provider](https://docs.snowflake.com/user-guide/snowflake-cortex/aisql#availability) for more information.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/74142349-97c9-4640-a87c-433bdc4f4a20/ascreenshot.jpeg?tl_px=0,149\&br_px=1376,918\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=331,276)

### (Optional) Modify the Data Source Description Word Limit

The maximum number of words to be generated by Cortex AI for the data source description.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/18f6da3b-bbf2-43f1-94f1-9b49c923dbbe/ascreenshot.jpeg?tl_px=0,103\&br_px=1376,872\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=509,277)

### (Optional) Modify the Array Description Word Limit

The maximum number of words to be generated by Cortex AI for the array description.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/6bb442e4-e492-4adc-a155-e65668344c01/ascreenshot.jpeg?tl_px=164,101\&br_px=1541,870\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=629,277)

### (Optional) Modify the Attribute Description Word Limit

The maximum number of words to be generated by Cortex AI for the attribute description.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/aab91165-c6a3-4620-ae43-0400d0787b07/ascreenshot.jpeg?tl_px=164,103\&br_px=1541,872\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=857,277)

### Open the Data Source Description editor

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/df50c034-246b-4b19-8e5a-591bb3da434b/ascreenshot.jpeg?tl_px=0,121\&br_px=1376,890\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=295,277)

### (Optional) Add a custom AI Prompt

This prompt will be added to the DataPancake system prompt.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/f3d6ef20-92cd-44cd-976c-ce05fd90780e/ascreenshot.jpeg?tl_px=0,92\&br_px=1376,861\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=491,277)

### Generate a description with Cortex AI

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/61c7d8de-fdfb-4dec-8521-8c509b3fb38d/ascreenshot.jpeg?tl_px=0,166\&br_px=1376,935\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=296,277)

### Review & modify the generated description

{% hint style="warning" %}
Please be aware of using special markdown characters such as ' or " in the AI prompt or description as they may interfere with the final prompt.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/7faaf494-f86d-44fa-8316-cfb3a023e917/ascreenshot.jpeg?tl_px=121,189\&br_px=1497,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,345)

### Save the description

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/a5a6a5f7-b002-4dc8-be58-351b1f764c52/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=313,498)

### Verify the description saved successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/17ecce4c-fc07-4c83-902d-b9e0366f63f2/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=866,146)


# How to Generate Array Descriptions & Synonyms

### In the Data Dictionary Builder's "Array Descriptions" section, select an array to edit

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/b1a305f1-ca03-47bd-b214-202039a1419f/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=523,487)

### Open the description & synonym editor

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/b9d08a18-8852-44b6-a70b-fa671b12c7c0/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=264,338)

### (Optional) Add a custom AI Prompt

This prompt will be added to the DataPancake system prompt.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/1e46742b-6eec-46f5-8eda-387cee83baf1/ascreenshot.jpeg?tl_px=0,139\&br_px=1376,908\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=401,277)

### Open the description & synonym editor

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/b9d08a18-8852-44b6-a70b-fa671b12c7c0/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=264,338)

### Generate the description with Cortex AI

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/7cb07d3c-78cc-42f3-bd0f-aa578ddb3e60/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=297,286)

### Review and modify the generated description

{% hint style="warning" %}
Please be aware of using special markdown characters such as ' or " in the AI prompt or description as they may interfere with the final prompt.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/646400f0-2688-4b91-9072-66d422ebdd5b/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=475,389)

### Generate synonyms with Cortex AI

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/c95e07a8-9242-4e9b-8ca1-d9371817cde4/ascreenshot.jpeg?tl_px=164,189\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=646,283)

### Review generated synonyms and modify as needed

{% hint style="warning" %}
Please be aware of using special markdown characters such as ' or " in the AI prompt or description as they may interfere with the final prompt.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/1a8254cf-644b-4bf4-a02f-af08d92b81ca/ascreenshot.jpeg?tl_px=164,189\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=901,392)

### Save array description and synonyms

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/c3bd5416-edb9-448d-95b2-d877e11a6b84/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=368,498)

### Verify array description and synonyms saved successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/bc93758b-83d2-413b-82eb-2bc5756c3a30/ascreenshot.jpeg?tl_px=161,24\&br_px=1537,793\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,276)


# How to Generate Attribute Descriptions, Synonyms, & Sample Values

### In the Data Dictionary Builder, select an array to edit attributes for

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/d608de07-960d-40e9-a7c3-994d2e9278c4/ascreenshot.jpeg?tl_px=0,183\&br_px=1376,952\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=392,277)

### Scroll to the Attribute Descriptions & Synonyms section

These attributes are based on the selected array

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/80ae4b34-d76f-4daa-a098-5804913ceb26/ascreenshot.jpeg?tl_px=0,57\&br_px=1376,826\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=497,277)

### Select an attribute

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/62d721b1-8470-49c0-a12a-50d97aeb4a0e/ascreenshot.jpeg?tl_px=0,91\&br_px=1376,860\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=471,277)

### Open the attribute description, synonyms, and sample data editor

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/cabb5c7d-151d-4749-9e7c-c10c5cd5d2fc/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=221,419)

### (Optional) Add a custom AI prompt

This prompt will be added to the DataPancake system prompt

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/5cef49b9-9069-44b6-9734-090b31b8fd08/ascreenshot.jpeg?tl_px=0,184\&br_px=1376,953\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=327,276)

### Generate the description with Cortex AI

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/38f8d1aa-9bc0-425e-a97d-c207481d9a97/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=352,321)

### Review the generated description and modify as needed

{% hint style="warning" %}
Please be aware of using special markdown characters such as ' or " in the AI prompt or description as they may interfere with the final prompt.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/e1c18758-80ef-4f2f-bba3-4e6202a17acc/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=384,357)

### Generate synonyms with Cortex AI

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/7c402f28-6969-4bb7-8931-27195891ffc5/ascreenshot.jpeg?tl_px=84,147\&br_px=1461,916\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

### Review generated synonyms and modify as needed

{% hint style="warning" %}
Please be aware of using special markdown characters such as ' or " in the AI prompt or description as they may interfere with the final prompt.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/efb0d17f-2881-412c-aac8-460492a53ad5/ascreenshot.jpeg?tl_px=164,189\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=538,364)

### Generate sample values

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/dd4f617f-96e4-4ccd-b7d9-1d2bc2e174e4/ascreenshot.jpeg?tl_px=164,150\&br_px=1541,919\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=782,277)

### Review generated sample values and modify as needed

{% hint style="warning" %}
Please be aware of using special markdown characters such as ' or " in the AI prompt or description as they may interfere with the final prompt.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/822ec4ef-fe87-4da1-b790-8ceaa4bf850a/ascreenshot.jpeg?tl_px=164,189\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=828,316)

### Save the description, synonyms, and sample values

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/6a88b544-ad88-4419-97c5-7b72696736ff/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=306,443)

### Verify the new values saved successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-19/f604d1b2-ea07-4594-976c-6baf0d170a4b/ascreenshot.jpeg?tl_px=130,189\&br_px=1506,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,393)


# How to Deploy & Validate Generated Code

{% hint style="info" %}
Please ensure you have [generated the latest SQL code](/guides/how-to-guides-ui/pipeline-designer/how-to-generate-dynamic-sql-statement-code).
{% endhint %}

### Open the Data Source SQL page and select your data source

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/6b50e14a-f1f5-40bf-a9bf-1c7186d1b5c5/ascreenshot.jpeg?tl_px=0,33\&br_px=1376,802\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=452,277)

### Click the copy button for the generated code block

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/86d02c01-f5ec-4222-bc23-165e3d452987/ascreenshot.jpeg?tl_px=164,137\&br_px=1541,906\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=985,276)

### Open Workspaces in Snowflake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/30ce331f-0095-4910-9bb6-41f41baabfab/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=208,163)

### In a new SQL file, paste the copied SQL statements

Review the statements carefully before deploying

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/5d90e971-ee9f-47e9-b56a-8bcd6422f85d/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=753,87)

### Select the desired database and schema to deploy objects to

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/6d74ad5c-aa33-4c1a-932c-e68c48b942ef/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=894,86)

### Run the statements and ensure they complete successfully

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-02/4b3a9c69-dcb2-4992-8f95-87c106111f23/user_cropped_screenshot.webp?tl_px=0,0\&br_px=1541,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=439,58)


# Data Dictionary


# Semantic Model Generator

## Creating a Semantic Model in Snowflake

1\. Click "Semantic Model Generator"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/bd9e5909-3305-4be4-ae04-2533a9f627d0/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=112,306)

2\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/eb7201f5-2c54-4217-ad09-c77056a1e3dc/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=474,190)

3\. Click "customer\_data"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/babb32ee-29b3-404a-8f1d-ae9d32890507/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=461,255)

4\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/fd098504-913e-4f2e-ac6b-628ac2af5e54/ascreenshot.jpeg?tl_px=0,37\&br_px=1376,806\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=390,277)

5\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/5679da20-4710-4b78-94ac-9277d3440a19/ascreenshot.jpeg?tl_px=0,74\&br_px=1376,843\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=388,277)

6\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/b2362a30-8f38-4040-8b38-c940d4c27070/ascreenshot.jpeg?tl_px=0,112\&br_px=1376,881\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=389,277)

7\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/e6a9ee6d-49e8-4d6f-b1fa-8ba73387dc97/ascreenshot.jpeg?tl_px=146,110\&br_px=1522,879\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,276)

8\. Double-click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/f74dfdce-f015-4548-8943-e81df01783db/ascreenshot.jpeg?tl_px=145,110\&br_px=1521,879\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,276)

9\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/c5950eb5-d4f8-487e-800b-3e588f55df37/ascreenshot.jpeg?tl_px=164,96\&br_px=1541,865\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=726,277)

10\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/9a10b1a2-4b6d-4498-989d-7b0e059132d7/ascreenshot.jpeg?tl_px=164,109\&br_px=1541,878\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=628,277)

11\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/5e02e85d-43ee-4a4b-8983-88869cd3d451/ascreenshot.jpeg?tl_px=164,109\&br_px=1541,878\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=721,277)

12\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/97e60477-3cd0-4a8a-8437-fffde629a677/ascreenshot.jpeg?tl_px=164,105\&br_px=1541,874\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=715,277)

13\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/895bada6-ae4b-4e1f-b732-f5b7a25a2bce/ascreenshot.jpeg?tl_px=164,112\&br_px=1541,881\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=687,277)

14\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/da38a49c-46ae-4c52-93f1-c3784ceb3082/ascreenshot.jpeg?tl_px=164,106\&br_px=1541,875\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=611,276)

15\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/6ff1ad6a-81eb-4b5b-89f6-4928c6453184/ascreenshot.jpeg?tl_px=164,106\&br_px=1541,875\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=639,276)

16\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/6b93b7f8-27c6-4039-b539-c7070faf22e0/ascreenshot.jpeg?tl_px=164,101\&br_px=1541,870\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=764,277)

17\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/f3bf341c-5c77-4997-b2dc-a34c04b0ea40/ascreenshot.jpeg?tl_px=164,106\&br_px=1541,875\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=939,276)

18\. Click "Virtual Attributes"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/8dba20ff-452b-4c8d-9fc0-61a0503ea7c9/ascreenshot.jpeg?tl_px=130,32\&br_px=1507,801\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

19\. Click the "Attribute Name" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/74395ddb-0ade-4879-85aa-70c27ce462b0/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=454,247)

20\. Type "example"

21\. Click the "Description" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/644bc3d9-14d9-4cdb-b119-190cf3a3a0af/ascreenshot.jpeg?tl_px=0,51\&br_px=1376,820\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=445,276)

22\. Type "an example virtual attribute"

23\. Click "str"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/d7c0a5f3-8815-458b-ac93-457eb890dafc/ascreenshot.jpeg?tl_px=0,135\&br_px=1376,904\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=455,277)

24\. Click "int"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/a4820ab6-0ddf-4fa7-b99f-227d388ae7cb/ascreenshot.jpeg?tl_px=0,209\&br_px=1376,978\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=416,277)

25\. Click "NUMBER"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/48f04e7f-8d41-4d9a-83ec-8d2e130547e9/ascreenshot.jpeg?tl_px=0,222\&br_px=1376,991\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=477,277)

26\. Click "DECIMAL"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/9624475e-995e-4411-a488-0346e6ba1611/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=436,332)

27\. Click here.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/116b1545-e8fa-49f5-a016-3d0561351cca/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=483,337)

28\. Click "filters"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/1371187b-9991-48b8-a4a3-1d768d5a5944/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=458,463)

29\. Click "Root level (no array)"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/886675e5-cf6c-42e7-8cc6-7da604ed8640/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=502,412)

30\. Click "customerData.customers"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/38700bb1-a4cd-4f58-8593-1131bf725b9e/ascreenshot.jpeg?tl_px=0,135\&br_px=1376,904\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=489,277)

31\. Click the "SQL Expression\*" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/f6bdf954-d162-48a8-baa8-3b741af72692/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=475,503)

32\. Type "''"

33\. Click "Create"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/3b89c131-477c-4d4f-a2d6-fe30bfecb36b/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=447,558)

34\. Click "Create"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/dfce9d26-ba5f-4ce2-8611-4d348361f740/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=354,563)

35\. Click the "Semantic Model Instructions" field.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/5696fde4-6553-4610-9c94-709575b598e0/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=454,314)

36\. Type "Additional Instructions go here."

37\. Click "Save Instructions"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/52d2f7fe-9554-4e33-8d97-2d42dd57bf57/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=338,397)

38\. Click "Generate YAML Code"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/3ae71e9e-d26c-438d-9467-85573f6d3f34/ascreenshot.jpeg?tl_px=0,223\&br_px=1376,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=116,333)

39\. Click "itemized purchases"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/a826ff38-809f-431f-b410-aab1caca58bd/ascreenshot.jpeg?tl_px=119,223\&br_px=1495,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,286)

40\. Click this icon.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-18/abb5f6fb-4236-42dc-95a0-6289fd036b31/ascreenshot.jpeg?tl_px=164,124\&br_px=1541,893\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=991,277)

[**Made with Scribe**](https://scribehow.com/shared/Creating_a_Semantic_Model_in_Snowflake__dqN-mugtTgul1lSf3oqMFg)


# How to Guides (Script Builder)


# Admin Guides


# How to Grant Account Level Privileges to DataPancake

Build a script to grant DataPancake the necessary account-level and Cortex AI privileges required for scanning and schema discovery the Cortex AI assisted data dictionary builder.

### 1. Navigate to the admin page

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-19/89188d00-21ab-4232-a513-85ea03baeb33/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=82,382)

### 2. (Optional) Change the app database name

The default is DATAPANCAKE

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/0efa1689-8f02-4ba2-bb56-25efd97a09dc/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=413,221)

### 3. Enter the role name used to install data pancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/dc4ee1e4-2257-4e82-956d-d69ef634944e/ascreenshot.jpeg?tl_px=164,7\&br_px=1541,776\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=563,277)

### 4. Enter a role name with privileges to create a warehouse

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/295b8765-64e7-41f8-9e46-ac68b4e990f8/ascreenshot.jpeg?tl_px=194,80\&br_px=1571,849\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)

### 6. Enter the warehouse name used to execute the generated script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/8c24c2ce-3eb2-4b00-adbe-27babbd7ce61/ascreenshot.jpeg?tl_px=164,158\&br_px=1541,927\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=563,277)

### 7. Ensure the "Initialize Application Database Privileges" checkbox is checked

If you are ever re-running this script, you can uncheck this box to skip this step.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/19e18130-9b3e-4270-93db-63086324bb71/ascreenshot.jpeg?tl_px=55,189\&br_px=1432,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,291)

### 8. Scroll to the bottom and click "Generate Script"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/ae0261d2-230b-42b8-a660-3a11e676879b/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=405,448)

### 9. Copy the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/5196b227-3115-45e5-9d68-c54ac685728c/ascreenshot.jpeg?tl_px=544,0\&br_px=1920,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=987,168)

### 10. Open a new Snowflake SQL file and paste the script

Ensure you have a role and warehouse selected to execute the SQL file

![](https://colony-recorder.s3.amazonaws.com/files/2025-05-12/6de63b03-2077-4c3a-96c4-9436ef0dbfde/stack_animation.webp)

### 11. Review & Execute the script

Use the blue dropdown arrow at the top right and click "Run All"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/46027b34-667d-4a21-acaa-4b22453ee679/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1047,60)

### 12. Ensure successful execution by examining the call result column in the result set

<figure><img src="/files/Wz7NrjkseypBhLKQVpt2" alt=""><figcaption></figcaption></figure>


# How to Configure Available Warehouses in DataPancake

Build a script to configure virtual warehouse access for DataPancake by granting usage on existing warehouses or provisioning new, optimized warehouses for scanning and discovery workloads.

### 1. Navigate to the "Admin" script builder

If you are already on the Admin script builder page, navigate to the Getting Started page and then the Admin script builder to reset the admin form UI.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-19/89188d00-21ab-4232-a513-85ea03baeb33/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=82,382)

### 2. Enter the role name used to install DataPancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/06177453-963f-4a4d-b023-4a34e7b9c0d5/ascreenshot.jpeg?tl_px=164,2\&br_px=1541,771\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=568,277)

### 3. Enter a role name with privileges to create a warehouse

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/a3816905-9691-4633-80f3-653ec3bef9c2/ascreenshot.jpeg?tl_px=164,80\&br_px=1541,849\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=566,277)

### 4. Enter the warehouse name used to execute the generated script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/82a80174-d2d6-4691-8729-5a88865092d5/ascreenshot.jpeg?tl_px=164,157\&br_px=1541,926\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=569,276)

### 5. Determine which warehouse sizes to include in the script

![An example selecting every available warehouse size](https://colony-recorder.s3.amazonaws.com/files/2025-05-12/99600381-adda-46d7-885c-93a37d7727e3/stack_animation.webp)

### 6. Set the warehouse statuses

**Create New** will create a new warehouse and add it to DataPancake

**Use Existing** will add an existing warehouse to DataPancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/fd5a6251-68ea-428f-a504-ff24f0cc2aed/ascreenshot.jpeg?tl_px=164,9\&br_px=1541,778\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=682,277)

### 7. Enter warehouse names

Enter warehouse names for existing warehouses or enter a custom name if you are creating a new warehouse

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/b0ac86d3-5d2f-4498-81be-6df1d8b92ddc/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=872,252)

### 8. (Optional) Modify the Auto-Suspend time

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/2ad60bd9-fadf-4b7e-ad9e-0f52e9ca8972/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=969,265)

### 9. Click "Generate Script"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/c1a3caab-e444-4139-8a14-d5e3db996b9e/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=410,566)

### 10. Copy the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/9e6ecf61-06e8-4cb3-8c88-60048bc2ac02/ascreenshot.jpeg?tl_px=164,43\&br_px=1541,812\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=994,276)

### 11. Open a new Snowflake SQL file and paste in the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/8bd56e51-f29c-473d-811d-2375647001e0/ascreenshot.jpeg?tl_px=164,24\&br_px=1541,793\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=940,276)

### 12. Review & Execute the script

Use the blue dropdown arrow at the top right and click "Run All"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/4b590fee-33ba-4cc1-bd11-d9608723a051/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1066,23)

### 13. Ensure successful execution by examining the call result column in the result set

<figure><img src="/files/yBOqLiZA3YnRbevfl7U4" alt=""><figcaption></figcaption></figure>

### Troubleshooting

The query may take several minutes to finish.

If Snowflake fails to provision any of the larger warehouses, simply refresh the page and re-execute the required statements.

<figure><img src="/files/XSyNZVReMSMpXEjrJRo2" alt=""><figcaption></figcaption></figure>


# How to Manage Access to DataPancake

To allow additional users to access DataPancake, you can grant the APP\_PUBLIC application role to any existing system or custom role in your Snowflake account.

### 1. Navigate to the "Admin" script builder

If you are already on the Admin script builder page, navigate to the Getting Started page and then the Admin script builder to reset the admin form UI.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-19/89188d00-21ab-4232-a513-85ea03baeb33/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=82,382)

### 2. (Optional) Change the App Database Name

The default is DATAPANCAKE

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/1278dc3e-ec40-444d-9a65-2cfa5ec3fece/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=548,222)

### 3. Enter the role name used to install DataPancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/08acf826-a935-4b09-9021-8d19d70b45e9/ascreenshot.jpeg?tl_px=164,3\&br_px=1541,772\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=555,277)

### 4. Enter a role name with privileges to create a warehouse

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/46d042bf-1f06-405a-b51c-446ca78c4aa6/ascreenshot.jpeg?tl_px=164,82\&br_px=1541,851\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=561,277)

### 5. Enter the warehouse name used to execute the generated script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/8c24c2ce-3eb2-4b00-adbe-27babbd7ce61/ascreenshot.jpeg?tl_px=164,158\&br_px=1541,927\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=563,277)

### 6. Scroll to the Access Management section and enter the role names

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/b0b33467-0798-4987-b321-d06372131f4a/ascreenshot.jpeg?tl_px=141,189\&br_px=1518,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,390)

### 7. Click "Generate Script"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/3acdce5c-d83a-45f7-ae5a-d107617ad475/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=412,568)

### 8. Copy the generated script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/d7a1b728-a898-41c2-9fa7-7758ad2c7a93/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=990,237)

### 9. Open a new Snowflake SQL file and paste in the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/8d03d242-41a6-49b5-b6df-fd0fe3432927/ascreenshot.jpeg?tl_px=164,85\&br_px=1541,854\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=873,277)

### 10. Review & Execute the script

Use the blue dropdown arrow at the top right and click "Run All"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/d4914fe7-4a77-4e86-81cc-769aa954bda2/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1070,20)

### 11. Ensure successful execution by examining the call result column in the result set

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-12/1b18e3aa-ef44-4f48-b065-86eb44a14ae6/ascreenshot.jpeg?tl_px=133,180\&br_px=1509,949\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=530,280)


# Data Source Guides


# How to Create a Single DataPancake Data Source (Script Builder)

Build a script to create and initiate a scan for a single data source in DataPancake and optionally generate SQL code.

{% hint style="warning" %}
Please ensure the [Admin Guides](/guides/how-to-guides-script-builder/admin-guides) have been completed before creating your first data source.
{% endhint %}

{% hint style="info" %}
This script builder is not available for the following scenarios:

* Data sources with a pre-configured schema
* Data sources that contain stream data such as Kafka

See [Creating & Configuring Data Sources](/guides/how-to-guides-ui/creating-and-configuring-data-sources) guides for more details.
{% endhint %}

### 1. Navigate to the "Data Source" script builder

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/44c0b16d-13e9-4b0c-aee0-c8d6c6894535/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=74,454)

### &#x20;2. Enter the custom data source name

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/e9d48242-9eae-4f2f-b5d6-c090f2092be7/ascreenshot.jpeg?tl_px=0,124\&br_px=1376,893\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=489,277)

### 3. (Optional) Change the app database name

The default is DATAPANCAKE

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/a81ebbc4-4fc7-4d54-bdc7-4d92b2a6bed5/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=421,286)

### 4. Enter the role used to install DataPancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/c32ac813-c6a7-4842-b37f-468dc4cf77ac/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=501,346)

### 5. Enter the role which has the select privilege for the database object to be scanned

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/16ed500a-7214-4cf6-8a27-0f7d03bf9569/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=481,409)

### 6. Select the Snowflake Database Object Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/64db6420-74ab-460a-b35c-919b201b6b74/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=514,410)

### 7. Select the Column Data Type (Semi-Structured Only)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/7c527923-a9df-4783-bd78-5697d5374447/ascreenshot.jpeg?tl_px=4,187\&br_px=1380,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=523,410)

### 8. Select the Data Source Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/8ed1ee59-d45a-48ef-aebe-dbfa72d4f521/ascreenshot.jpeg?tl_px=164,96\&br_px=1541,865\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=667,277)

### 9. (Semi-Structured Only) Select the Data Format Type

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/1ae186a9-fdd4-46cf-aa13-926bde1415a0/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=736,303)

### 10. Select the Attribute Create Type

"Discover" means DataPancake will discover the *all* attributes for you during the scan. "Schema" means you will provide a schema for all known attributes, on top of which DataPancake can find additional discovered attributes.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/e4b7776a-c50b-4f53-a500-5f25cc2caffb/ascreenshot.jpeg?tl_px=164,176\&br_px=1541,945\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=747,276)

### 11. Enter the Snowflake database name that contains the data

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/6c849138-9691-4186-976e-c7f7a907bc02/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=667,326)

### 12. (Optional) Indicate if the database is shared

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/b299b939-0960-4440-8b2f-a65c197463dc/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=830,304)

### 13. Enter the name of the schema which contains the database object to be scanned

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/ad937228-fb82-47ea-910e-a354837e4926/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=699,385)

### 14. Enter the name of the database object to be scanned

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/da26d165-2703-465d-aad0-ce720da49a51/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=800,447)

### 15. (Semi-Structured Only) Enter the name of the column to be scanned

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/e5d12f61-1878-420a-b995-5482ee3bff93/ascreenshot.jpeg?tl_px=164,187\&br_px=1541,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=729,522)

### 16. Select the warehouse to be used by DataPancake to scan

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/84091f61-7dd1-4a6c-a3ed-b82559c5017c/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=443,140)

### 17. (Optional) Prevent the scan from starting automatically

If you switch this off, you will need to manually trigger the data source scan from the "Scan Data" page.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/e8910d61-ff23-4b47-9f24-738a1b69a781/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=410,178)

### 18. (Optional) Enter a record limit for the initial scan

If you want to scan *all* records, set the limit to 0

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/f6a6b1fe-eec9-4edb-86ea-a97129e08ef1/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=514,239)

### 19. (Optional) Enable Additional Paid Features

{% hint style="info" %}
Explore <https://www.datapancake.com/pricing> to learn more about DataPancake's transparent, attribute-based pricing model.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/ea931db7-a731-45bc-a1ae-94a2b2161ddd/ascreenshot.jpeg?tl_px=0,175\&br_px=1376,944\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=446,277)

### 20. (Optional) Disable Using Case Sensitivity

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/761512b4-6b97-4120-9bfb-6ed6179a3a8d/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=467,328)

{% hint style="warning" %}
The "Generate Code After Scan" will automatically create the output SQL statements based on the discovered schema at the completion of the scan.

SQL Code Generation is a paid feature available once you purchase the application or as part of an Enterprise license. Code Generation in the Trial version is not enabled.

If you choose not to generate code, skip to the "Generate Script" step below.
{% endhint %}

### 21. (Optional) Enable generating SQL code after the scan completes

With the SQL Code Generation feature enabled, you can also generate SQL code on scanned data sources from the "Generated SQL" page as needed.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/402901a2-4264-48d3-9d32-da6ec31b0379/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=473,358)

### 22. Enter the Materialized Object Type

The type of materialized object to create.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-10-27/96afab57-2d2f-40e6-8e79-ddc22e0eda35/ascreenshot.jpeg?tl_px=100,187\&br_px=1476,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,297)

### 23. Enter the user defined name for the root dynamic table, such as 'dt\_\<object\_name>'

The name used for the materialized object's root name and as a prefix for all nested materialized objects in the code generation process.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/8095477a-df00-4020-896f-885894145ef4/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=510,303)

### 24. Enter the name of the warehouse used to refresh dynamic tables

This warehouse name is included as part of the create dynamic SQL table statements.

{% hint style="info" %}
**"Why is this not a dropdown with options like the scan data warehouse one above?"**

The previous dropdown is the warehouse used to scan data, which *must* be connected to DataPancake.

The warehouse here is used to refresh dynamic tables and can be any warehouse, including ones not connected to DataPancake.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/58710468-3336-44fc-85ea-2230b41a2144/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=458,358)

### 25. Select the Semantic Layer - Object Type

The type of semantic layer object to create.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/2f253667-7d14-4e9d-a774-e9baba45e052/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=367,516)

### 26. Enter the user defined name for the root level view, such as 'vw\_\<object\_name>'

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/70164187-b6a4-41ea-a6c8-d551d65644a6/ascreenshot.jpeg?tl_px=11,187\&br_px=1387,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,481)

### 27. Click "Generate Script"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/ce4e7b86-8ba9-45d6-aac2-648437c481db/ascreenshot.jpeg?tl_px=0,187\&br_px=1376,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=314,529)

### 28. Copy the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/bcb25a40-9edb-4de3-84c4-bfaefcf50bfa/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=987,154)

### 29. Open a new Snowflake SQL file and paste the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/bc98a85b-2b35-4892-98a8-074d6616ab8c/ascreenshot.jpeg?tl_px=164,78\&br_px=1541,847\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=548,277)

### 30. Scroll Down to Review the Optional Parameters as Part of the Code Generation

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/9c16da44-30ad-4c77-a467-e9911e861510/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=314,154)

### 31. Execute the Script

Use the blue dropdown arrow at the top right and click "Run All"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-10/f955d5f8-a2f1-41df-a244-04bab5bd796c/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1015,69)

### 32. Ensure successful execution by examining the call result column in the result set

If you mistyped any of the database connection information, the resulting error message will show you what was incorrect.

If the warehouse used has not been previously added to DataPancake, then the scan will not be initiated.

If the scan is initiated, the result message will show that the scan has started.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/35e24782-5023-445c-b2db-89ef9ff2b34d/ascreenshot.jpeg?tl_px=171,234\&br_px=1464,957\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,369)

## 33. View the scan status

On the "Scans In Process" page you can view the progress of the scan. Click the "Refresh" button to update view the latest status. When the scan is finished, you are ready to start designing your pipeline.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-11-13/79e203c4-ba79-4ca8-b4fc-7ee0cc92d4d4/ascreenshot.jpeg?tl_px=0,88\&br_px=1376,857\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=83,277)


# Alert Guides


# How to Create Schema Drift Alerts (Script Builder)

Build a script to create schema drift email alerts for all connected data sources in DataPancake.

{% hint style="warning" %}
Please ensure the [Admin Guides](/guides/how-to-guides-script-builder/admin-guides) have been completed and at least one [data source](broken://pages/qx1Zmem0EUKGzG3xdJpY) is connected before creating schema drift alerts.
{% endhint %}

### 1. Navigate to the "Alert" script builder

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-19/cd52db23-d02e-41ed-adf8-771e225408cc/ascreenshot.jpeg?tl_px=0,189\&br_px=1376,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=71,445)

### 2. (Optional) Change the app database name

The default is DATAPANCAKE

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/24218b5c-82e1-4939-991f-f40a1b2eddb8/ascreenshot.jpeg?tl_px=0,68\&br_px=2698,1575\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=476,276)

### 3. Enter the role used to install DataPancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/8b789a8a-139b-41ce-9e76-d7666d67e675/ascreenshot.jpeg?tl_px=0,228\&br_px=2698,1735\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=482,277)

### 4. Enter the name of the Snowflake database used to store the alert

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/5d6f496c-8290-4ed2-8e32-32887dd8d61b/ascreenshot.jpeg?tl_px=0,402\&br_px=2698,1909\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=492,276)

### 5. Enter the name of the schema used to store the alert

{% hint style="info" %}
If the name is case sensitive, put the name in double quotes such as `"EXAMPLE_NAME"`
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/98dc4976-e999-4f73-9c28-4df1c0700432/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=475,341)

### 6. Enter the name of the Warehouse used to store the alert

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/4f6528b6-3890-4cc2-aa70-9bfb69c5607c/ascreenshot.jpeg?tl_px=0,64\&br_px=2698,1571\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=810,277)

### 7. Select the Interval Type

Choose the interval type for data to be analyzed and determine if an alert should be sent.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/b39b55b6-0631-46b9-bfa2-98a12f932dde/ascreenshot.jpeg?tl_px=0,236\&br_px=2698,1743\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=838,276)

### 8. Enter the Interval Quantity

Choose the interval quantity for data to be analyzed and determine if an alert should be sent.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/bd7c1b16-70bd-4202-aab8-0fe999a0e941/ascreenshot.jpeg?tl_px=0,404\&br_px=2698,1911\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=793,276)

### 9. Enter the comma separated email addresses that should receive the alerts

{% hint style="info" %}
The email addresses must be verified by Snowflake to receive emails. Email verification can be initiated through the user's "My Profile" settings in Snowflake. Click 'Resend verification email' if needed.

![](/files/QJ0vzbBcDzVhO0Hqr63O)
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/32cd5041-9fb5-43cb-95f2-c4800bb0bcde/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=783,338)

### 10. (Option 1) Click "Generate Alert Script (Free)"

The free version will send an email notification informing of a schema change to one or more data sources including the name of the data source only.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/054ee7b9-5c91-455a-9d59-f30d986547ae/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=469,428)

### 11. (Option 2) Click "Generate Alert Script (Paid)"

The paid version will send an email notification informing of a schema change to one or more data sources including the details of the schema changes.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/b61e04c3-3051-42ba-b474-1f73c999514a/ascreenshot.jpeg?tl_px=0,372\&br_px=2698,1879\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=455,276)

### 12. Copy the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/c6ee9c28-4924-40fa-afbb-2f5c154b2687/ascreenshot.jpeg?tl_px=0,420\&br_px=2698,1928\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=991,306)

### 13. Open a new Snowflake SQL file and paste the script

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/2f5ac057-d541-4719-aa83-b11076f80c65/ascreenshot.jpeg?tl_px=0,14\&br_px=2698,1521\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=878,276)

### 14. Review & Execute the script

Use the blue dropdown arrow at the top right and click "Run All"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/3cab1d13-d350-433a-b4a1-961654ca921b/ascreenshot.jpeg?tl_px=0,0\&br_px=2698,1507\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1005,73)

### 15. Ensure successful execution by examining the call result

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-15/c7322af1-a3f4-49d3-b698-59d13e9565b7/ascreenshot.jpeg?tl_px=0,140\&br_px=2698,1647\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=512,276)

### 16. Alert Management

SQL statements have been provided to:

* Manually execute the alert
* Start and stop the alert scheduling.
* View alert execution history

<figure><img src="/files/pwpAXFCJaJa5pFGZg90q" alt=""><figcaption></figcaption></figure>


# How to Guides (Bulk Upsert via CSV)


# Database Object Initialization


# Core Attributes - Initialization

Create a new stage and upload the stored procedure to enable bulk updates for core attribute metadata.

### Create a new stage for datapancake files (or use an existing stage)

```sql
CREATE STAGE <DATABASE>.<SCHEMA>.DATAPANCAKE_FILES;
```

For more details on creating a stage, see <https://docs.snowflake.com/en/sql-reference/sql/create-stage>

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/149fecfb-e559-4576-a13d-88e6b9d9798a/ascreenshot_e2dfe86c61b247be9cccc7da03b6f2a9_text_export.jpeg)

### Copy the Procedure DDL

```sql
CREATE OR REPLACE PROCEDURE <database_name>.<schema_name>.sp_update_datapancake_attribute_metadata_core(
    FILE_PATH string,
    ARCHIVE_PATH string, 
    USER_NAME string
)
RETURNS string
LANGUAGE PYTHON
RUNTIME_VERSION = '3.11'
PACKAGES = ('snowflake-snowpark-python','orjson')
HANDLER = 'update_datapancake_attribute_metadata'
EXECUTE AS CALLER

AS
$$
import snowflake.snowpark as snowpark
import datetime
import traceback
import orjson

def update_datapancake_attribute_metadata(session: snowpark.Session, FILE_PATH: str, ARCHIVE_PATH: str, USER_NAME: str):
    try:

        # Initialize the output variable
        
        attribute_data = ""

        # Step 1: Read the CSV file from the specified Snowflake stage
        # Set skip_header=0 so we can manually extract and process the first row as the header
        
        df = session.read.options({"field_delimiter": ",", "skip_header": 0}).csv(FILE_PATH)
        
        # Step 2: Collect all rows from the file
        
        rows = df.collect()
        if not rows:
            return "No rows found."

        # Step 3: Extract column names from the first row (header)
        # Convert column names to uppercase and strip whitespace
        
        header_row = rows[0]
        header_names = [str(getattr(header_row, f"c{i+1}")).strip().upper() for i in range(len(header_row))]

        # Step 4: Extract all remaining data rows
        
        data_rows = rows[1:]
        if not data_rows:
            return "Only header row found."

        # Step 5: Build a list of records (dicts) using the extracted headers
        
        records = []
        for row in data_rows:
            record = {}
            for i in range(len(header_names)):
                value = getattr(row, f"c{i+1}")
                record[header_names[i]] = str(value).strip() if value not in [None, ""] else None
            records.append(record) 
            
        # Step 6: Serialize the records list as JSON string using orjson
        # Default=str handles values like datetime or decimal types  
        
        attribute_data = orjson.dumps(records,default=str).decode("utf-8")

        # Step 7: Call the DataPancake procedure to update the attribute metadata
        result = session.call("DATAPANCAKE.CORE.UPDATE_ATTRIBUTE_METADATA_CORE",USER_NAME, attribute_data, FILE_PATH)
        if result == "Success":

            #Step 8: Optional: Archive the input file to a new location
            if ARCHIVE_PATH is not None and len(ARCHIVE_PATH) > 0 and ARCHIVE_PATH != FILE_PATH:
                session.sql(f"COPY FILES INTO '{ARCHIVE_PATH}' FROM '{FILE_PATH}'").collect()

            #Step 9: Optional - Remove the source file from the stage
            session.sql(f"REMOVE '{FILE_PATH}'").collect()

            #Step 10: Return message showing the successful result
            return f"The DataPancake attribute metadata has been successfully updated and the file has been archived. Processed {len(records)} rows with columns: {', '.join(header_names)}"
        else:
            #Step 10: Return the error message
            return f"Error: {result} and: {rows[1]}"
            
    except Exception as e:
        return f"Error: {str(e)} with a trace of: {traceback.format_exc()}"
$$;
```

### Paste the DDL and modify the database and schema name

{% hint style="info" %}
If you changed the name during install, modify DataPancake application database name.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/d2824bb1-2ea1-466c-9a4a-698957441036/ascreenshot_7b054e34a69f4e57a194409c0b87fffd_text_export.jpeg)

{% hint style="info" %}
Update the DataPancake database application name if you changed the name during install. TODO add circle
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/eb62727c-e7f9-4dba-a6d7-6e8fa7265c18/ascreenshot_5b8d8213686e439aa52b5298507029a0_text_export.jpeg)

### Execute the create stored procedure statement

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/7d21a6d5-c9c9-4911-9853-486de4748471/ascreenshot_bf8ccbc88c2e42619d5e3aa515ac39a0_text_export.jpeg)

### Verify the stored procedure was created successfully

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/cfe37ac9-ddb4-413c-8786-fadda1d6569d/ascreenshot_2ad028e3b4234b279604c3af97e26ed5_text_export.jpeg)

## Next Steps

[Attribute Metadata Bulk Updates (Core) - Execute](/guides/how-to-guides-bulk-upsert-via-csv/usage/core-attributes-bulk-update)


# Core + Security Attributes - Initialization

Create a new stage and upload the stored procedure to enable bulk updates for both core and security attribute metadata.

### Create a new stage for datapancake files (or use an existing stage)

```sql
CREATE STAGE <DATABASE>.<SCHEMA>.DATAPANCAKE_FILES;
```

For more details on creating a stage, see <https://docs.snowflake.com/en/sql-reference/sql/create-stage>

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/149fecfb-e559-4576-a13d-88e6b9d9798a/ascreenshot_e2dfe86c61b247be9cccc7da03b6f2a9_text_export.jpeg)

### Copy the Procedure DDL

```sql
CREATE OR REPLACE PROCEDURE <database_name>.<schema_name>.sp_update_datapancake_attribute_metadata_security(
    FILE_PATH string,
    ARCHIVE_PATH string, 
    USER_NAME string
)
RETURNS string
LANGUAGE PYTHON
RUNTIME_VERSION = '3.11'
PACKAGES = ('snowflake-snowpark-python','orjson')
HANDLER = 'update_datapancake_attribute_metadata'
EXECUTE AS CALLER

AS
$$
import snowflake.snowpark as snowpark
import datetime
import traceback
import orjson

def update_datapancake_attribute_metadata(session: snowpark.Session, FILE_PATH: str, ARCHIVE_PATH: str, USER_NAME: str):
    try:

        # Initialize the output variable
        
        attribute_data = ""

        # Step 1: Read the CSV file from the specified Snowflake stage
        # Set skip_header=0 so we can manually extract and process the first row as the header
        
        df = session.read.options({"field_delimiter": ",", "skip_header": 0}).csv(FILE_PATH)
        
        # Step 2: Collect all rows from the file
        
        rows = df.collect()
        if not rows:
            return "No rows found."

        # Step 3: Extract column names from the first row (header)
        # Convert column names to uppercase and strip whitespace
        
        header_row = rows[0]
        header_names = [str(getattr(header_row, f"c{i+1}")).strip().upper() for i in range(len(header_row))]

        # Step 4: Extract all remaining data rows
        
        data_rows = rows[1:]
        if not data_rows:
            return "Only header row found."

        # Step 5: Build a list of records (dicts) using the extracted headers
        
        records = []
        for row in data_rows:
            record = {}
            for i in range(len(header_names)):
                value = getattr(row, f"c{i+1}")
                record[header_names[i]] = str(value).strip() if value not in [None, ""] else None
            records.append(record) 
            
        # Step 6: Serialize the records list as JSON string using orjson
        # Default=str handles values like datetime or decimal types  
        
        attribute_data = orjson.dumps(records,default=str).decode("utf-8")

        # Step 7: Call the DataPancake procedure to update the attribute metadata
        result = session.call("DATAPANCAKE.CORE.UPDATE_ATTRIBUTE_METADATA_SECURITY",USER_NAME, attribute_data, FILE_PATH)
        if result == "Success":

            #Step 8: Optional: Archive the input file to a new location
            if ARCHIVE_PATH is not None and len(ARCHIVE_PATH) > 0 and ARCHIVE_PATH != FILE_PATH:
                session.sql(f"COPY FILES INTO '{ARCHIVE_PATH}' FROM '{FILE_PATH}'").collect()

            #Step 9: Optional - Remove the source file from the stage
            session.sql(f"REMOVE '{FILE_PATH}'").collect()

            #Step 10: Return message showing the successful result
            return f"The DataPancake attribute metadata has been successfully updated and the file has been archived. Processed {len(records)} rows with columns: {', '.join(header_names)}"
        else:
            #Step 10: Return the error message
            return f"Error: {result} and: {rows[1]}"
            
    except Exception as e:
        return f"Error: {str(e)} with a trace of: {traceback.format_exc()}"
$$;
```

### Paste the DDL and modify the database and schema name

{% hint style="info" %}
If you changed the name during install, modify DataPancake application database name.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/08a48753-77e8-42d4-8b26-bfd3975cf655/ascreenshot_af59fff4a3d74acbae85aa358dcf8b50_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/0b3bb1f7-ddda-4a94-a866-ef18601b3873/ascreenshot_ef7432d644884206ae0391af2b65dfff_text_export.jpeg)

### Execute the create stored procedure statement

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/e1381ebe-bafc-4c6a-8ca6-4807c00ff171/ascreenshot_dfc701671c0949b990f489f9aff23817_text_export.jpeg)

### Verify the stored procedure was created successfully

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/479a2eb6-abce-4484-a932-e4159af96271/ascreenshot_b35428f606ee428991445782033c9daf_text_export.jpeg)

## Next Steps

[Attribute Metadata Bulk Updates (Security) - Execute](/guides/how-to-guides-bulk-upsert-via-csv/usage/core-+-security-attributes-bulk-update)


# Core + Data Dictionary Attributes - Initialization

Select a stage and upload the stored procedure to enable bulk updates for both core and data dictionary attribute metadata or to generate descriptions, synonyms, and sample values via Cortex AI.

### (Optional) Create a new stage for datapancake files (or use an existing stage)

```sql
CREATE STAGE <DATABASE>.<SCHEMA>.DATAPANCAKE_FILES;
```

For more details on creating a stage, see <https://docs.snowflake.com/en/sql-reference/sql/create-stage>

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/149fecfb-e559-4576-a13d-88e6b9d9798a/ascreenshot_e2dfe86c61b247be9cccc7da03b6f2a9_text_export.jpeg)

### Copy the Procedure DDL

```sql
CREATE OR REPLACE PROCEDURE <database_name>.<schema_name>.sp_update_datapancake_attribute_metadata_dictionary(
    FILE_PATH string,
    ARCHIVE_PATH string, 
    USER_NAME string
)
RETURNS string
LANGUAGE PYTHON
RUNTIME_VERSION = '3.11'
PACKAGES = ('snowflake-snowpark-python','orjson')
HANDLER = 'update_datapancake_attribute_metadata'
EXECUTE AS CALLER

AS
$$
import snowflake.snowpark as snowpark
import datetime
import traceback
import orjson

def update_datapancake_attribute_metadata(session: snowpark.Session, FILE_PATH: str, ARCHIVE_PATH: str, USER_NAME: str):
    try:

        # Initialize the output variable
        
        attribute_data = ""

        # Step 1: Read the CSV file from the specified Snowflake stage
        # Set skip_header=0 so we can manually extract and process the first row as the header
        
        df = session.read.options({"field_delimiter": ",", "skip_header": 0}).csv(FILE_PATH)
        
        # Step 2: Collect all rows from the file
        
        rows = df.collect()
        if not rows:
            return "No rows found."

        # Step 3: Extract column names from the first row (header)
        # Convert column names to uppercase and strip whitespace
        
        header_row = rows[0]
        header_names = [str(getattr(header_row, f"c{i+1}")).strip().upper() for i in range(len(header_row))]

        # Step 4: Extract all remaining data rows
        
        data_rows = rows[1:]
        if not data_rows:
            return "Only header row found."

        # Step 5: Build a list of records (dicts) using the extracted headers
        
        records = []
        for row in data_rows:
            record = {}
            for i in range(len(header_names)):
                value = getattr(row, f"c{i+1}")
                record[header_names[i]] = str(value).strip() if value not in [None, ""] else None
            records.append(record) 
            
        # Step 6: Serialize the records list as JSON string using orjson
        # Default=str handles values like datetime or decimal types  
        
        attribute_data = orjson.dumps(records,default=str).decode("utf-8")

        # Step 7: Call the DataPancake procedure to update the attribute metadata
        result = session.call("DATAPANCAKE.CORE.UPDATE_ATTRIBUTE_METADATA_DICTIONARY",USER_NAME, attribute_data, FILE_PATH)
        if result == "Success":

            #Step 8: Optional: Archive the input file to a new location
            if ARCHIVE_PATH is not None and len(ARCHIVE_PATH) > 0 and ARCHIVE_PATH != FILE_PATH:
                session.sql(f"COPY FILES INTO '{ARCHIVE_PATH}' FROM '{FILE_PATH}'").collect()

            #Step 9: Optional - Remove the source file from the stage
            session.sql(f"REMOVE '{FILE_PATH}'").collect()

            #Step 10: Return message showing the successful result
            return f"The DataPancake attribute metadata has been successfully updated and the file has been archived. Processed {len(records)} rows with columns: {', '.join(header_names)}"
        else:
            #Step 10: Return the error message
            return f"Error: {result} and: {rows[1]}"
            
    except Exception as e:
        return f"Error: {str(e)} with a trace of: {traceback.format_exc()}"
$$;
```

### Paste the DDL and modify the database and schema name

{% hint style="info" %}
If you changed the name during install, modify DataPancake application database name.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/28491cf7-99db-4a87-b605-cffcc10cd4c2/ascreenshot_4a68578442e9457882e980242944998a_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/e8fdba3e-6315-494b-96db-7847b243c8de/ascreenshot_d1ddb7dd7ef6404aad46eb6afc2a8324_text_export.jpeg)

### Execute the create stored procedure statement

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/c6ec03e1-1b6c-4efa-b5d7-63c1b47f6562/ascreenshot_c510f349606b4c1884a58a05bd3134da_text_export.jpeg)

### Verify the stored procedure was created successfully

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/24471108-62e6-4098-aa7f-65497e3722b3/ascreenshot_57ecd3b1fc2a40c89fb7728cb83b9dcc_text_export.jpeg)

## Next Steps

[Attribute Metadata Bulk Updates (Data Dictionary) - Execute](/guides/how-to-guides-bulk-upsert-via-csv/usage/core-+-data-dictionary-attributes-bulk-update)


# Datasource Metadata - Initialization

Select a stage and upload the stored procedure to enable bulk updates for datasource metadata.

### 1. (Optional) Create a new stage for datapancake files (or use an existing stage)

```sql
CREATE STAGE <DATABASE>.<SCHEMA>.DATAPANCAKE_FILES;
```

For more details on creating a stage, see <https://docs.snowflake.com/en/sql-reference/sql/create-stage>

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/149fecfb-e559-4576-a13d-88e6b9d9798a/ascreenshot_e2dfe86c61b247be9cccc7da03b6f2a9_text_export.jpeg)

### 2. Copy the Datasource Metadata Procedure DDL

```sql
CREATE OR REPLACE PROCEDURE <DATABASE_NAME>.<SCHEMA_NAME>.sp_update_datapancake_datasource_metadata(
    FILE_PATH string,
    ARCHIVE_PATH string, 
    USER_NAME string
)
RETURNS string
LANGUAGE PYTHON
RUNTIME_VERSION = '3.11'
PACKAGES = ('snowflake-snowpark-python','orjson')
HANDLER = 'update_datapancake_datasource_metadata'
EXECUTE AS CALLER

AS
$$
import snowflake.snowpark as snowpark
import datetime
import traceback
import orjson

def update_datapancake_datasource_metadata(session: snowpark.Session, FILE_PATH: str, ARCHIVE_PATH: str, USER_NAME: str):
    try:

        # Initialize the output variable
        
        datasource_data = ""

        # Step 1: Read the CSV file from the specified Snowflake stage
        # Set skip_header=0 so we can manually extract and process the first row as the header
        
        df = session.read.options({"field_delimiter": ",", "skip_header": 0}).csv(FILE_PATH)
        
        # Step 2: Collect all rows from the file
        
        rows = df.collect()
        if not rows:
            return "No rows found."

        # Step 3: Extract column names from the first row (header)
        # Convert column names to uppercase and strip whitespace
        
        header_row = rows[0]
        header_names = [str(getattr(header_row, f"c{i+1}")).strip().upper() for i in range(len(header_row))]

        # Step 4: Extract all remaining data rows
        
        data_rows = rows[1:]
        if not data_rows:
            return "Only header row found."

        # Step 5: Build a list of records (dicts) using the extracted headers
        
        records = []
        for row in data_rows:
            record = {}
            for i in range(len(header_names)):
                value = getattr(row, f"c{i+1}")
                record[header_names[i]] = str(value).strip() if value not in [None, ""] else None
            records.append(record) 
            
        # Step 6: Serialize the records list as JSON string using orjson
        # Default=str handles values like datetime or decimal types  
        
        datasource_data = orjson.dumps(records,default=str).decode("utf-8")

        # Step 7: Call the DataPancake procedure to update the datasource metadata
        result = session.call("DATAPANCAKE.CORE.UPDATE_DATAPANCAKE_DATASOURCE_METADATA_CORE",USER_NAME, datasource_data, FILE_PATH)
        if result.startswith("Successfully updated"):

            #Step 8: Optional: Archive the input file to a new location
            if ARCHIVE_PATH is not None and len(ARCHIVE_PATH) > 0 and ARCHIVE_PATH != FILE_PATH:
                session.sql(f"COPY FILES INTO '{ARCHIVE_PATH}' FROM '{FILE_PATH}'").collect()

            #Step 9: Optional - Remove the source file from the stage
            session.sql(f"REMOVE '{FILE_PATH}'").collect()

            #Step 10: Return message showing the successful result
            return f"The DataPancake datasource metadata has been successfully updated and the file has been archived. Processed {len(records)} rows with columns: {', '.join(header_names)}"
        else:
            #Step 10: Return the error message
            return f"Error: {result}"
            
    except Exception as e:
        return f"Error: {str(e)} with a trace of: {traceback.format_exc()}"
$$;
```

### Paste the DDL and modify the database and schema name

{% hint style="info" %}
If you changed the name during install, modify DataPancake application database name.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/5f012513-2aa8-45d5-a100-39452b58a93b/ascreenshot_a0839aa0eea24eed973f2a28be3bb2b0_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/685d5393-d558-4633-a526-53b87698e547/ascreenshot_b5e52e7199f94f269193e610ee936a58_text_export.jpeg)

### Execute the create stored procedure statement

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/bfcee6e0-9944-48fe-aa41-81abea6b3596/ascreenshot_3b7796de122c477bb0268e9f56e02e8f_text_export.jpeg)

### Verify the stored procedure was created successfully

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/b59ce423-87e4-41e0-aad4-c4e79cb3661a/ascreenshot_b550aac264474dac8fce1d3b62ce3d9d_text_export.jpeg)


# Array Foreign Key - Initialization

Select a stage and upload the stored procedure to enable bulk updates for array foreign key metadata metadata.

### (Optional) Create a new stage for datapancake files (or use an existing stage)

```sql
CREATE STAGE <DATABASE>.<SCHEMA>.DATAPANCAKE_FILES;
```

For more details on creating a stage, see <https://docs.snowflake.com/en/sql-reference/sql/create-stage>

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/149fecfb-e559-4576-a13d-88e6b9d9798a/ascreenshot_e2dfe86c61b247be9cccc7da03b6f2a9_text_export.jpeg)

### Copy the Array Foreign Key Procedure DDL

```sql
CREATE OR REPLACE PROCEDURE <DATABASE_NAME>.<SCHEMA_NAME>.sp_update_datapancake_array_foreign_key_metadata_core(
    FILE_PATH string,
    ARCHIVE_PATH string, 
    USER_NAME string
)
RETURNS string
LANGUAGE PYTHON
RUNTIME_VERSION = '3.11'
PACKAGES = ('snowflake-snowpark-python','orjson')
HANDLER = 'update_datapancake_array_foreign_key_metadata'
EXECUTE AS CALLER

AS
$$
import snowflake.snowpark as snowpark
import datetime
import traceback
import orjson

def update_datapancake_array_foreign_key_metadata(session: snowpark.Session, FILE_PATH: str, ARCHIVE_PATH: str, USER_NAME: str):
    try:

        # Initialize the output variable
        
        foreign_key_data = ""

        # Step 1: Read the CSV file from the specified Snowflake stage
        # Set skip_header=0 so we can manually extract and process the first row as the header
        
        df = session.read.options({"FIELD_DELIMITER": ",","TRIM_SPACE":True,"SKIP_HEADER": 0, "FIELD_OPTIONALLY_ENCLOSED_BY":'"'}).csv(FILE_PATH)
        
        # Step 2: Collect all rows from the file
        
        rows = df.collect()
        if not rows:
            return "No rows found."

        # Step 3: Extract column names from the first row (header)
        # Convert column names to uppercase and strip whitespace
        
        header_row = rows[0]
        header_names = [str(getattr(header_row, f"c{i+1}")).strip().upper() for i in range(len(header_row))]

        # Step 4: Extract all remaining data rows
        
        data_rows = rows[1:]
        if not data_rows:
            return "Only header row found."

        # Step 5: Build a list of records (dicts) using the extracted headers
        
        records = []
        for row in data_rows:
            record = {}
            for i in range(len(header_names)):
                value = getattr(row, f"c{i+1}")
                record[header_names[i]] = str(value) if value not in [None, ""] else None
            records.append(record) 
            
        # Step 6: Serialize the records list as JSON string using orjson
        # Default=str handles values like datetime or decimal types  
        
        foreign_key_data = orjson.dumps(records,default=str).decode("utf-8")

        # Step 7: Call the DataPancake procedure to update the array foreign key metadata
        result = session.call("datapancake.core.update_array_foreign_key_metadata_core",USER_NAME, foreign_key_data, FILE_PATH)
        
        # Use substring matching to be more flexible
        if "Success" in str(result):

            #Step 8: Optional: Archive the input file to a new location
            if ARCHIVE_PATH is not None and len(ARCHIVE_PATH) > 0 and ARCHIVE_PATH != FILE_PATH:
                session.sql(f"COPY FILES INTO '{ARCHIVE_PATH}' FROM '{FILE_PATH}'").collect()

            #Step 9: Optional - Remove the source file from the stage
            session.sql(f"REMOVE '{FILE_PATH}'").collect()

            #Step 10: Return message showing the successful result
            return f"The DataPancake array foreign key metadata has been successfully updated and the file has been archived. Processed {len(records)} rows with columns: {', '.join(header_names)}"
        else:
            #Step 10: Return the error message
            return f"Error: {result} and: {rows[1]}"
            
    except Exception as e:
        return f"Error: {str(e)} with a trace of: {traceback.format_exc()}" 
$$;
```

### Paste the DDL and modify the database and schema name

{% hint style="info" %}
If you changed the name during install, modify DataPancake application database name.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/edb16e4f-f810-488d-8a1a-d4ce2988f10e/ascreenshot_4d0df195f9f34fdd82b42f5c82bba171_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/05f59ef1-16c1-42aa-afc3-15203e6e0d0f/ascreenshot_b9539c8a244b47888c12ecc9f9bc825e_text_export.jpeg)

### Execute the create stored procedure statement

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/8d076baf-932d-4e2d-98c9-bd7c4ccb4b18/ascreenshot_20b31d8e6a974ce6a2831bd977102419_text_export.jpeg)

### Verify the stored procedure was created successfully

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/0039b63a-a526-48b5-b8a2-543d080dcb3c/ascreenshot_0023ddcb23ca4a8ea4e03c866874ba3e_text_export.jpeg)


# Schema Transformation / Consolidation - Intialization

Select a stage and upload the stored procedure to enable bulk updates for schema transformation metadata.

### (Optional) Create a new stage for datapancake files (or use an existing stage)

```sql
CREATE STAGE <DATABASE>.<SCHEMA>.DATAPANCAKE_FILES;
```

For more details on creating a stage, see <https://docs.snowflake.com/en/sql-reference/sql/create-stage>

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/149fecfb-e559-4576-a13d-88e6b9d9798a/ascreenshot_e2dfe86c61b247be9cccc7da03b6f2a9_text_export.jpeg)

### Copy the Schema Transformation Procedure DDL

```sql
CREATE OR REPLACE PROCEDURE <database_name>.<schema_name>.sp_update_datapancake_datasource_schema_transformation_metadata_core(
    FILE_PATH string,
    ARCHIVE_PATH string, 
    USER_NAME string
)
RETURNS string
LANGUAGE PYTHON
RUNTIME_VERSION = '3.11'
PACKAGES = ('snowflake-snowpark-python','orjson')
HANDLER = 'update_datapancake_datasource_schema_transformation_metadata'
EXECUTE AS CALLER

AS
$$
import snowflake.snowpark as snowpark
import datetime
import traceback
import orjson

def update_datapancake_datasource_schema_transformation_metadata(session: snowpark.Session, FILE_PATH: str, ARCHIVE_PATH: str, USER_NAME: str):
    try:

        # Initialize the output variable
        transformation_data = ""

        # Step 1: Read the CSV file from the specified Snowflake stage
        # Set skip_header=0 so we can manually extract and process the first row as the header
        
        df = session.read.options({"FIELD_DELIMITER": ",","TRIM_SPACE":True,"SKIP_HEADER": 0, "FIELD_OPTIONALLY_ENCLOSED_BY":'"'}).csv(FILE_PATH)
        
        # Step 2: Collect all rows from the file
        
        rows = df.collect()
        if not rows:
            return "No rows found."

        # Step 3: Extract column names from the first row (header)
        # Convert column names to uppercase and strip whitespace
        
        header_row = rows[0]
        header_names = [str(getattr(header_row, f"c{i+1}")).strip().upper() for i in range(len(header_row))]

        # Step 4: Extract all remaining data rows
        
        data_rows = rows[1:]
        if not data_rows:
            return "Only header row found."

        # Step 5: Build a list of records (dicts) using the extracted headers
        
        records = []
        for row in data_rows:
            record = {}
            for i in range(len(header_names)):
                value = getattr(row, f"c{i+1}")
                record[header_names[i]] = str(value) if value not in [None, ""] else None
            records.append(record) 
            
        # Step 6: Serialize the records list as JSON string using orjson
        # Default=str handles values like datetime or decimal types  
        
        transformation_data = orjson.dumps(records,default=str).decode("utf-8")

        # Step 7: Call the DataPancake procedure to update the schema transformation metadata
        result = session.call("DATAPANCAKE.CORE.UPDATE_DATASOURCE_SCHEMA_TRANSFORMATION_CORE",USER_NAME, transformation_data, FILE_PATH)
        if result.startswith("Success"):

            #Step 8: Optional: Archive the input file to a new location
            if ARCHIVE_PATH is not None and len(ARCHIVE_PATH) > 0 and ARCHIVE_PATH != FILE_PATH:
                session.sql(f"COPY FILES INTO '{ARCHIVE_PATH}' FROM '{FILE_PATH}'").collect()

            #Step 9: Optional - Remove the source file from the stage
            session.sql(f"REMOVE '{FILE_PATH}'").collect()

            #Step 10: Return message showing the successful result
            return f"The DataPancake schema transformation metadata has been successfully updated and the file has been archived. Processed {len(records)} rows with columns: {', '.join(header_names)}"
        else:
            #Step 10: Return the error message
            return f"Error: {result}"
            
    except Exception as e:
        return f"Error: {str(e)} with a trace of: {traceback.format_exc()}"

$$;
```

### Paste the DDL and modify the database and schema name

{% hint style="info" %}
If you changed the name during install, modify DataPancake application database name.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/16ab4f1b-5fc4-40de-a8a6-3dee0c3b79d9/ascreenshot_3c7475f9b6ac40d5a850f128b7af6278_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/7d860f93-eb68-4fdb-96c7-ecbfc2f3ad66/ascreenshot_f81ff070201c4db2b2f9ae494e019c71_text_export.jpeg)

### Execute the create stored procedure statement

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/1fcaf425-5241-480e-ad51-2b7b64a83b67/ascreenshot_e34c0377277e4e5ca7f052878a903bb2_text_export.jpeg)

### Verify the stored procedure was created successfully

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-19/3e518af4-76e6-4fd5-b259-623394824462/ascreenshot_3a969c0b03784ef9b5a345100d14a6e2_text_export.jpeg)


# Data Source + CodeGen + Data Dictionary


# Scan Configuration


# Virtual Attributes


# Semantic Model


# Usage


# Core Attributes - Bulk Update

Select and export the attribute metadata to a .csv file, edit in a spreadsheet like Google Sheets or Excel, then perform a bulk update for core attribute metadata in DataPancake.

{% hint style="info" %}

### Ensure you have completed [Attribute Metadata Bulk Updates (Core) - Setup](/guides/how-to-guides-bulk-upsert-via-csv/database-object-initialization/core-attributes-initialization)

{% endhint %}

### Open a new SQL file Snowflake workspace

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/4b391681-1194-493e-87ae-5b5e550c0857/ascreenshot_294d708fbe9e4bff8033a5f4c50a35c2_text_export.jpeg)

### Run a select statement for datapancake.core.vw\_datasource\_all\_attributes

The minimum field requirements to select are `attribute_id, polymorphic_version_id` - for example:

```sql
select ATTRIBUTE_ID, POLYMORPHIC_VERSION_ID
from datapancake.core.vw_datasource_attribute_security
where version_status = 'active';
```

#### Select statement for updating attributes where the source data type is an array

<pre class="language-sql"><code class="lang-sql"><strong>select
</strong>-- VIEW ONLY COLUMNS
DATASOURCE_ID,
ATTRIBUTE_ID,
POLYMORPHIC_VERSION_ID,
DATASOURCE_NAME,
DATASOURCE_TAG,
VERSION_NUMBER,
VERSION_STATUS_DATE,
PARENT_OBJECT,
PARENT_ARRAY,
ATTRIBUTE_PATH,
ATTRIBUTE_NAME,
ATTRIBUTE_LEVEL,
ATTRIBUTE_ORDER,
SOURCE_DATA_TYPE,
POLYMORPHIC_ATTRIBUTE_NAME,
ARRAY_TYPE,
ARRAY_PRIMITIVE_TYPE,
-- EDITABLE COLUMNS (Array-specific)
INCLUDE_ARRAY_IN_CODE_GEN, --TRUE, FALSE
ARRAY_RELATIONSHIP_NAME,
ARRAY_RELATIONSHIP_DESCRIPTION,
ARRAY_RELATIONSHIP_TYPE, --many_to_one, one_to_one
ARRAY_RELATIONSHIP_JOIN_TYPE, --left_outer, inner
SEMANTIC_LAYER_ALIAS_NAME,
FLATTEN_ARRAY, --TRUE, FALSE
-- AUDIT COLUMNS
ATTRIBUTE_LAST_UPDATED_DATETIME,
ATTRIBUTE_LAST_UPDATED_BY
from datapancake.core.vw_datasource_all_attributes
where version_status = 'active'
and SOURCE_DATA_TYPE = 'array'
order by attribute_path;
</code></pre>

#### Select statement for updating attributes where source data types are primitive and object

```sql
select
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
ATTRIBUTE_ID,
POLYMORPHIC_VERSION_ID,
DATASOURCE_NAME,
DATASOURCE_TAG,
VERSION_NUMBER,
VERSION_STATUS_DATE,
PARENT_OBJECT,
PARENT_ARRAY,
ATTRIBUTE_PATH,
ATTRIBUTE_NAME,
ATTRIBUTE_LEVEL,
ATTRIBUTE_ORDER,
SOURCE_DATA_TYPE,
POLYMORPHIC_ATTRIBUTE_NAME,
SAMPLE_VALUE,
HAS_EMBEDDED_CONTENT,
DATA_PLATFORM_DATA_TYPE,
-- EDITABLE COLUMNS (Non-array attributes)
ATTRIBUTE_RECORD_STATUS,
INCLUDE_COLUMN_IN_SECURE_VIEW,
NUMERIC_PRECISION,
NUMERIC_SCALE,
USE_DATETIME_FORMAT,
DATETIME_FORMAT,
ATTRIBUTE_RECORD_STATUS,
IS_UNIQUE,
IS_PRIMARY_KEY,
CONTAINS_ENUM_VALUES,
RAW_TRANSFORMATION_TYPE,
RAW_TRANSFORMATION_EXPRESSION,
RAW_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_NULL_VALUE_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_ALIAS_NAME,
SEMANTIC_LAYER_ALIAS_NAME,
CONSOLIDATION_REGEX_SEARCH,
CONSOLIDATION_SQL_EXPRESSION,
-- AUDIT COLUMNS
ATTRIBUTE_LAST_UPDATED_DATETIME,
ATTRIBUTE_LAST_UPDATED_BY
from datapancake.core.vw_datasource_all_attributes
where version_status = 'active'
and SOURCE_DATA_TYPE != 'array'
order by attribute_path;
```

{% hint style="info" %}
You can choose which editable fields you wish to include in your select statement.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/b327ab4a-e541-4bb0-8fff-0fdbd1da96c5/ascreenshot_0c40b3c393534615b71e22a54f94ee76_text_export.jpeg)

### Verify the query successfully returns a list of attribute metadata

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/6854ca13-27aa-47e2-9088-b96f64feed73/ascreenshot_fce689aaf5be41f1838592dbaa8545ac_text_export.jpeg)

### Download the results as a .csv file

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/f70b1a0a-d38a-43dd-ab18-8cf961d1f7db/ascreenshot_dc8fef5b5b7840b799fee9afd14c08fa_text_export.jpeg)

### Open the .csv file in either Excel or Google Sheets

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/166d997b-67c7-44df-a522-984aec4ab6e7/ascreenshot.jpeg?tl_px=109,0\&br_px=1486,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,129)

### Edit any editable columns as needed

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/3dcc3276-5b44-4d03-bc5e-d511fb39a13c/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=643,123)

### Save (Excel) or download (Google Sheets) the file

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/1d878217-47d1-4e0b-9beb-5b32f76fd18a/ascreenshot.jpeg?tl_px=0,46\&br_px=1376,815\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=459,277)

### Load the .csv into your stage

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/b95a896b-a5e6-41e4-bf02-8f6ebeca882f/ascreenshot.jpeg?tl_px=0,8\&br_px=1376,777\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=239,276)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/e03c17ff-fde1-4bd3-b412-c33e3fe39724/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1005,7)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/ff23955f-4c43-4781-885a-58c1cd46cc6b/ascreenshot.jpeg?tl_px=68,0\&br_px=1445,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,257)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/f34d74ef-8a5b-413a-a39a-20aa0849aeab/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=664,372)

### Run the bulk update stored procedure

{% hint style="info" %}
Modify the \<placeholders> with the same database and schema you uploaded the stored procedure to.
{% endhint %}

When the stored procedure completes, the attribute metadata file will be moved to the archive folder.

```sql
call <database>.<schema>.sp_update_datapancake_attribute_metadata_core(
    '@<stage_name>/<staged_filename>.csv',
    '@<stage_name>/<archive_folder>/',
    '<snowflake_username>'
);
```

### Verify the integration completed successfully by running the following query

```sql
select * from datapancake.core.vw_integration_process
where user_name = 'BWOLFF'
order by integration_process_date desc;
```


# Core + Security Attributes - Bulk Update

Select and export the attribute metadata to a .csv file, edit in a spreadsheet like Google Sheets or Excel, then perform a bulk update for core and security attribute metadata in DataPancake.

{% hint style="info" %}

### Ensure you have completed [Attribute Metadata Bulk Updates (Security) - Setup](/guides/how-to-guides-bulk-upsert-via-csv/database-object-initialization/core-+-security-attributes-initialization)

{% endhint %}

### Open a new SQL file Snowflake workspace

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/4b391681-1194-493e-87ae-5b5e550c0857/ascreenshot_294d708fbe9e4bff8033a5f4c50a35c2_text_export.jpeg)

### Run a select statement for DATAPANCAKE.CORE.VW\_DATASOURCE\_ATTRIBUTE\_SECURITY

The minimum field requirements to select are `attribute_id, polymorphic_version_id` - for example:

```sql
select ATTRIBUTE_ID, POLYMORPHIC_VERSION_ID
from datapancake.core.vw_datasource_attribute_security
where version_status = 'active';
```

#### Select statement for security updates where source data type is an array

```sql
select
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
ATTRIBUTE_ID,
POLYMORPHIC_VERSION_ID,
DATASOURCE_NAME,
DATASOURCE_TAG,
VERSION_NUMBER,
VERSION_STATUS_DATE,
PARENT_OBJECT,
PARENT_ARRAY,
ATTRIBUTE_PATH,
ATTRIBUTE_NAME,
ATTRIBUTE_LEVEL,
ATTRIBUTE_ORDER,
SOURCE_DATA_TYPE,
POLYMORPHIC_ATTRIBUTE_NAME,
ARRAY_TYPE,
ARRAY_PRIMITIVE_TYPE,
-- SECURITY EDITABLE COLUMNS (Array-specific)
INCLUDE_ARRAY_IN_CODE_GEN,
ARRAY_RELATIONSHIP_NAME,
ARRAY_RELATIONSHIP_DESCRIPTION,
ARRAY_RELATIONSHIP_TYPE,
ARRAY_RELATIONSHIP_JOIN_TYPE,
SEMANTIC_LAYER_ALIAS_NAME,
FLATTEN_ARRAY,
ARRAY_ROW_ACCESS_POLICY_NAME,
-- AUDIT COLUMNS
ATTRIBUTE_LAST_UPDATED_DATETIME,
ATTRIBUTE_LAST_UPDATED_BY
from datapancake.core.vw_datasource_attribute_security
where version_status = 'active' 
and SOURCE_DATA_TYPE = 'array'
order by attribute_path;
```

#### Select statement for updating attributes where source data types are primitive and object

<pre class="language-sql"><code class="lang-sql"><strong>select
</strong>-- VIEW ONLY COLUMNS
DATASOURCE_ID,
ATTRIBUTE_ID,
POLYMORPHIC_VERSION_ID,
DATASOURCE_NAME,
DATASOURCE_TAG,
VERSION_NUMBER,
VERSION_STATUS_DATE,
PARENT_OBJECT,
PARENT_ARRAY,
<strong>ATTRIBUTE_PATH,
</strong>ATTRIBUTE_NAME,
ATTRIBUTE_LEVEL,
ATTRIBUTE_ORDER,
SOURCE_DATA_TYPE,
POLYMORPHIC_ATTRIBUTE_NAME,
SAMPLE_VALUE,
HAS_EMBEDDED_CONTENT,
DATA_PLATFORM_DATA_TYPE,
-- EDITABLE COLUMNS (Non-array attributes)
ATTRIBUTE_RECORD_STATUS,
INCLUDE_COLUMN_IN_SECURE_VIEW,
NUMERIC_PRECISION,
NUMERIC_SCALE,
USE_DATETIME_FORMAT,
DATETIME_FORMAT,
IS_UNIQUE,
IS_PRIMARY_KEY,
CONTAINS_ENUM_VALUES,
RAW_TRANSFORMATION_TYPE,
RAW_TRANSFORMATION_EXPRESSION,
RAW_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_NULL_VALUE_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_ALIAS_NAME,
SEMANTIC_LAYER_ALIAS_NAME,
CONSOLIDATION_REGEX_SEARCH,
CONSOLIDATION_SQL_EXPRESSION,
INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY,
ROW_ACCESS_POLICY_COLUMN_ORDER,
COLUMN_MASKING_POLICY_NAME,
COLUMN_MASKING_POLICY_PARAMETERS,
-- AUDIT COLUMNS
ATTRIBUTE_LAST_UPDATED_DATETIME,
ATTRIBUTE_LAST_UPDATED_BY
from datapancake.core.vw_datasource_attribute_security
where version_status = 'active' 
and SOURCE_DATA_TYPE != 'array'
order by attribute_path;
</code></pre>

{% hint style="info" %}
You can choose which editable fields you wish to include in your select statement.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/b327ab4a-e541-4bb0-8fff-0fdbd1da96c5/ascreenshot_0c40b3c393534615b71e22a54f94ee76_text_export.jpeg)

### Verify the query successfully returns a list of attribute metadata

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/6854ca13-27aa-47e2-9088-b96f64feed73/ascreenshot_fce689aaf5be41f1838592dbaa8545ac_text_export.jpeg)

### Download the results as a .csv file

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/f70b1a0a-d38a-43dd-ab18-8cf961d1f7db/ascreenshot_dc8fef5b5b7840b799fee9afd14c08fa_text_export.jpeg)

### Open the .csv file in either Excel or Google Sheets

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/166d997b-67c7-44df-a522-984aec4ab6e7/ascreenshot.jpeg?tl_px=109,0\&br_px=1486,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,129)

### Edit any editable columns as needed

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-30/d24852ff-110f-4186-9c3a-e6b3ee7e9fa8/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=963,125)

### Save (Excel) or download (Google Sheets) the file

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/1d878217-47d1-4e0b-9beb-5b32f76fd18a/ascreenshot.jpeg?tl_px=0,46\&br_px=1376,815\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=459,277)

### Load the .csv into your stage

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/b95a896b-a5e6-41e4-bf02-8f6ebeca882f/ascreenshot.jpeg?tl_px=0,8\&br_px=1376,777\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=239,276)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/e03c17ff-fde1-4bd3-b412-c33e3fe39724/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1005,7)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/ff23955f-4c43-4781-885a-58c1cd46cc6b/ascreenshot.jpeg?tl_px=68,0\&br_px=1445,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,257)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/f34d74ef-8a5b-413a-a39a-20aa0849aeab/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=664,372)

### Run the bulk update stored procedure

{% hint style="info" %}
Modify the \<placeholders> with same database and schema you uploaded the stored procedure to.
{% endhint %}

When the stored procedure completes, the attribute metadata file will be moved to the archive folder.

```sql
call <database>.<schema>.sp_update_datapancake_attribute_metadata_security(
    '@<stage_name>/<staged_filename>.csv',
    '@<stage_name>/<archive_folder>/',
    '<snowflake_username>'
);
```

### Verify the integration completed successfully by running the following query

```sql
select * from datapancake.core.vw_integration_process
where user_name = 'BWOLFF'
order by integration_process_date desc;
```


# Core + Data Dictionary Attributes - Bulk Update

Export the attribute metadata to a .csv file, edit in a spreadsheet like Google Sheets or Excel, then use to perform a bulk update on core & data dictionary attribute metadata in DataPancake.

{% hint style="info" %}

### Ensure you have completed [Attribute Metadata Bulk Updates (Data Dictionary) - Setup](/guides/how-to-guides-bulk-upsert-via-csv/database-object-initialization/core-+-data-dictionary-attributes-initialization)

{% endhint %}

### Open a new SQL file Snowflake workspace

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/4b391681-1194-493e-87ae-5b5e550c0857/ascreenshot_294d708fbe9e4bff8033a5f4c50a35c2_text_export.jpeg)

### Run a select statement for DATAPANCAKE.CORE.VW\_DATASOURCE\_ATTRIBUTE\_DATA\_DICTIONARY

The minimum field requirements to select are `attribute_id, polymorphic_version_id` - for example:

```sql
select attribute_id, polymorphic_version_id
from datapancake.core.vw_datasource_attribute_data_dictionary
where version_status = 'active';
```

#### Select statement for data dictionary updates where source data type is an array

```sql
select
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
ATTRIBUTE_ID,
POLYMORPHIC_VERSION_ID,
DATASOURCE_NAME,
DATASOURCE_TAG,
VERSION_NUMBER,
VERSION_STATUS_DATE,
PARENT_OBJECT,
PARENT_ARRAY,
ATTRIBUTE_PATH,
ATTRIBUTE_NAME,
ATTRIBUTE_LEVEL,
ATTRIBUTE_ORDER,
SOURCE_DATA_TYPE,
POLYMORPHIC_ATTRIBUTE_NAME,
ARRAY_TYPE,
ARRAY_PRIMITIVE_TYPE,
-- EDITABLE COLUMNS (Array-specific)
INCLUDE_ARRAY_IN_CODE_GEN,
ARRAY_RELATIONSHIP_NAME,
ARRAY_RELATIONSHIP_DESCRIPTION,
ARRAY_RELATIONSHIP_TYPE,
ARRAY_RELATIONSHIP_JOIN_TYPE,
SEMANTIC_LAYER_ALIAS_NAME,
ARRAY_REQUIRE_FLATTEN, // TODO: Update
ATTRIBUTE_VERSION_DESCRIPTION_PROMPT,
ATTRIBUTE_VERSION_DESCRIPTION,
ATTRIBUTE_VERSION_SYNONYMS,
-- DERIVED COLUMNS FOR BULK CORTEX AI GENERATION
GENERATE_DESCRIPTION,
GENERATE_SYNONYMS,
GENERATE_SAMPLE_VALUES,
DESCRIPTION_WORD_LIMIT,
SYNONYM_LIMIT,
SAMPLE_VALUE_LIMIT,
MODEL_NAME,
-- AUDIT COLUMNS
ATTRIBUTE_LAST_UPDATED_DATETIME,
ATTRIBUTE_LAST_UPDATED_BY
from datapancake.core.vw_datasource_attribute_data_dictionary
where version_status = 'active'
and SOURCE_DATA_TYPE = 'array'
order by attribute_path;
```

#### Select statement for updating attributes where source data types are primitive and object

```sql
select
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
ATTRIBUTE_ID,
POLYMORPHIC_VERSION_ID,
DATASOURCE_NAME,
DATASOURCE_TAG,
VERSION_NUMBER,
VERSION_STATUS_DATE,
PARENT_OBJECT,
PARENT_ARRAY,
ATTRIBUTE_PATH,
ATTRIBUTE_NAME,
ATTRIBUTE_LEVEL,
ATTRIBUTE_ORDER,
SOURCE_DATA_TYPE,
POLYMORPHIC_ATTRIBUTE_NAME,
SAMPLE_VALUE,
HAS_EMBEDDED_CONTENT,
DATA_PLATFORM_DATA_TYPE,
-- EDITABLE COLUMNS (Non-array attributes)
ATTRIBUTE_RECORD_STATUS,
INCLUDE_COLUMN_IN_SECURE_VIEW,
NUMERIC_PRECISION,
NUMERIC_SCALE,
USE_DATETIME_FORMAT,
DATETIME_FORMAT,
ATTRIBUTE_RECORD_STATUS,
IS_UNIQUE,
IS_PRIMARY_KEY,
CONTAINS_ENUM_VALUES,
RAW_TRANSFORMATION_TYPE,
RAW_TRANSFORMATION_EXPRESSION,
RAW_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_NULL_VALUE_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION,
SEMANTIC_LAYER_TRANSFORMATION_EXPRESSION_COMMENT,
RAW_ALIAS_NAME,
SEMANTIC_LAYER_ALIAS_NAME,
CONSOLIDATION_REGEX_SEARCH,
CONSOLIDATION_SQL_EXPRESSION,
ATTRIBUTE_VERSION_DESCRIPTION_PROMPT,
ATTRIBUTE_VERSION_DESCRIPTION,
ATTRIBUTE_VERSION_SYNONYMS,
ATTRIBUTE_VERSION_SAMPLE_VALUES,
-- DERIVED COLUMNS FOR BULK CORTEX AI GENERATION
FALSE AS GENERATE_DESCRIPTION,
FALSE AS GENERATE_SYNONYMS,
FALSE AS GENERATE_SAMPLE_VALUES,
100 AS DESCRIPTION_WORD_LIMIT,
5 AS SYNONYM_LIMIT,
3 AS SAMPLE_VALUE_LIMIT,
'<ENTER MODEL NAME HERE>' AS MODEL_NAME,
-- AUDIT COLUMNS
ATTRIBUTE_LAST_UPDATED_DATETIME,
ATTRIBUTE_LAST_UPDATED_BY
from datapancake.core.vw_datasource_attribute_data_dictionary
where version_status = 'active'
and SOURCE_DATA_TYPE != 'array'
order by attribute_path;

```

{% hint style="info" %}
You can choose which editable fields you wish to include in your select statement.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/b327ab4a-e541-4bb0-8fff-0fdbd1da96c5/ascreenshot_0c40b3c393534615b71e22a54f94ee76_text_export.jpeg)

### Verify the query successfully returns a list of attribute metadata

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/6854ca13-27aa-47e2-9088-b96f64feed73/ascreenshot_fce689aaf5be41f1838592dbaa8545ac_text_export.jpeg)

### Download the results as a .csv file

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/f70b1a0a-d38a-43dd-ab18-8cf961d1f7db/ascreenshot_dc8fef5b5b7840b799fee9afd14c08fa_text_export.jpeg)

### Open the .csv file in either Excel or Google Sheets

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/166d997b-67c7-44df-a522-984aec4ab6e7/ascreenshot.jpeg?tl_px=109,0\&br_px=1486,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,129)

### Edit any editable columns as needed

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/3dcc3276-5b44-4d03-bc5e-d511fb39a13c/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=643,123)

{% hint style="success" %}
**Bulk Cortex AI Data Dictionary Generation**

Use **TRUE**  for these attributes and DataPancake will generate new data dictionary values with the following:

`GENERATE_DESCRIPTION`, `GENERATE_SYNONYMS`, and `GENERATE_SAMPLE_VALUES` \
\
You can also modify the `DESCRIPTION_WORD_LIMIT`, `SYNONYM_LIMIT`, `SAMPLE_VALUE_LIMIT`,  `MODEL_NAME`, and `PROMPT` columns to further improve the LLM values returned.
{% endhint %}

<figure><img src="/files/nNpxZoeyKut1jHfzAOQK" alt=""><figcaption></figcaption></figure>

### Save (Excel) or download (Google Sheets) the file

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/1d878217-47d1-4e0b-9beb-5b32f76fd18a/ascreenshot.jpeg?tl_px=0,46\&br_px=1376,815\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=459,277)

### Load the .csv into your stage

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/b95a896b-a5e6-41e4-bf02-8f6ebeca882f/ascreenshot.jpeg?tl_px=0,8\&br_px=1376,777\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=239,276)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/e03c17ff-fde1-4bd3-b412-c33e3fe39724/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1005,7)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/ff23955f-4c43-4781-885a-58c1cd46cc6b/ascreenshot.jpeg?tl_px=68,0\&br_px=1445,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,257)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/f34d74ef-8a5b-413a-a39a-20aa0849aeab/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=664,372)

### Run the bulk update stored procedure

{% hint style="info" %}
Modify the \<placeholders> with same database and schema you uploaded the stored procedure to.
{% endhint %}

When the stored procedure completes, the attribute metadata file will be moved to the archive folder.

<pre class="language-sql"><code class="lang-sql">call &#x3C;database>.&#x3C;schema>.sp_update_datapancake_attribute_metadata_dictionary(
<strong>    '@&#x3C;stage_name>/&#x3C;staged_filename>.csv',
</strong>    '@&#x3C;stage_name>/&#x3C;archive_folder>/',
    '&#x3C;snowflake_username>'
);
</code></pre>

### Verify the integration completed successfully by running the following query

```sql
select * from datapancake.core.vw_integration_process
where user_name = 'BWOLFF'
order by integration_process_date desc;
```


# Datasources - Bulk Update

Select and export the datasource metadata to a .csv file, edit in a spreadsheet like Google Sheets or Excel, then perform a bulk update in DataPancake.

{% hint style="info" %}

### Ensure you have completed [Initialization Guide](/guides/how-to-guides-bulk-upsert-via-csv/database-object-initialization/datasource-metadata-initialization)

{% endhint %}

### Open a new SQL file Snowflake workspace

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/4b391681-1194-493e-87ae-5b5e550c0857/ascreenshot_294d708fbe9e4bff8033a5f4c50a35c2_text_export.jpeg)

### Run a select statement for DATAPANCAKE.CORE.VW\_DATASOURCES

```sql
SELECT
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
DATASOURCE_TYPE,
DATA_FORMAT,
DATASOURCE_OBJECT_TYPE,
DATASOURCE_OBJECT_ATTRIBUTE_DATA_TYPE,
DATASOURCE_DATABASE,
DATASOURCE_SCHEMA,
DATASOURCE_OBJECT_NAME,
DATASOURCE_OBJECT_ATTRIBUTE_NAME,
LAST_SCAN,
ATTRIBUTE_COUNT,
ATTRIBUTE_MAX_LEVEL,
OBJECT_COUNT,
ARRAY_COUNT,
POLYMORPHIC_ATTRIBUTE_COUNT,
EMBEDDED_CONTENT_ATTRIBUTE_COUNT,
COMPLEXITY_SCORE,
DATASOURCE_STATUS,
CONNECTION_STATUS,
VIRTUAL_ATTRIBUTE_COUNT,
SCHEMA_ATTRIBUTE_COUNT,
DISCOVERED_ATTRIBUTE_COUNT,
-- PRODUCT TIER FLAGS
PRODUCT_TIER_ATTRIBUTE_METADATA_MANAGEMENT,
PRODUCT_TIER_SQL_CODE_GENERATION,
PRODUCT_TIER_DATA_DICTIONARY_BUILDER,
PRODUCT_TIER_SEMANTIC_MODEL_CODE_GENERATION,
PRODUCT_TIER_SECURITY_POLICY_INTEGRATION,
-- EDITABLE COLUMNS FOR BULK UPDATE
DATASOURCE_NAME,
DATASOURCE_TAG,
-- OUTPUT CONFIGURATION FIELDS
OUTPUT_OBJECT_TYPE,
OUTPUT_OBJECT_PREFIX_NAME,
OUTPUT_OBJECT_COMPUTE_RESOURCE_NAME,
OUTPUT_OBJECT_INTERVAL_QUANTITY,
OUTPUT_OBJECT_INTERVAL_UNIT_TYPE,
OUTPUT_OBJECT_OPTIONAL_PARAMETERS,
OUTPUT_OBJECT_OPTIONAL_PARAMETERS_ARRAY,
OUTPUT_OBJECT_DEDUPLICATE,
OUTPUT_OBJECT_SECURITY_ROW_LEVEL_POLICY_NAME_SEMANTIC_LAYER,
OUTPUT_OBJECT_DATABASE_NAME,
OUTPUT_OBJECT_SCHEMA_NAME,
OUTPUT_OBJECT_ROOT_SELECT_PREFIX,
OUTPUT_OBJECT_CASE_SENSITIVE,
-- SCAN CONFIGURATION FIELDS
BASE_SCAN_COMPUTE_RESOURCE_THREAD_COUNT,
BASE_SCAN_RECORDS_PER_MINUTE,
-- METADATA TABLE CONFIGURATION FIELDS
OUTPUT_OBJECT_CREATE_METADATA_TABLE,
OUTPUT_OBJECT_METADATA_TABLE_ALLOW_UPDATE,
OUTPUT_OBJECT_METADATA_TABLE_ALLOW_DELETE,
OUTPUT_OBJECT_METADATA_TABLE_COMPUTE_RESOURCE_NAME,
OUTPUT_OBJECT_METADATA_TABLE_CRON_SCHEDULE,
OUTPUT_OBJECT_METADATA_TABLE_CRON_TIMEZONE,
OUTPUT_OBJECT_METADATA_TABLE_DATABASE_NAME,
OUTPUT_OBJECT_METADATA_TABLE_SCHEMA_NAME,
-- DATA DICTIONARY
DATASOURCE_DESCRIPTION_PROMPT,
DATASOURCE_DESCRIPTION,
-- DERIVED COLUMNS FOR BULK UPDATE
FALSE AS GENERATE_CODE,
FALSE AS GENERATE_DATASOURCE_DESCRIPTION,
'mixtral-8x7b' AS MODEL_NAME,
250 AS WORD_LIMIT,
FROM DATAPANCAKE.CORE.VW_DATASOURCES
ORDER BY DATASOURCE_NAME;
```

{% hint style="info" %}
You can choose which editable fields you wish to include in your select statement.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/b327ab4a-e541-4bb0-8fff-0fdbd1da96c5/ascreenshot_0c40b3c393534615b71e22a54f94ee76_text_export.jpeg)

### Verify the query successfully returns a list of attribute metadata

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/6854ca13-27aa-47e2-9088-b96f64feed73/ascreenshot_fce689aaf5be41f1838592dbaa8545ac_text_export.jpeg)

### Download the results as a .csv file

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/f70b1a0a-d38a-43dd-ab18-8cf961d1f7db/ascreenshot_dc8fef5b5b7840b799fee9afd14c08fa_text_export.jpeg)

### Open the .csv file in either Excel or Google Sheets

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/166d997b-67c7-44df-a522-984aec4ab6e7/ascreenshot.jpeg?tl_px=109,0\&br_px=1486,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,129)

### Edit any editable columns as needed

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/3dcc3276-5b44-4d03-bc5e-d511fb39a13c/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=643,123)

{% hint style="success" %}
**Bulk Cortex AI Data Source Description Generation**

Use **TRUE**  for `GENERATE_CODE` and DataPancake will automatically generate code for the datasource.

Use `GENERATE_DATASOURCE_DESCRIPTION` and DataPancake will automatically generate a description from the datasource\
\
You can also modify the `MODEL_NAME`, and `WORD_LIMIT`columns to further improve the LLM values returned.
{% endhint %}

### Save (Excel) or download (Google Sheets) the file

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/1d878217-47d1-4e0b-9beb-5b32f76fd18a/ascreenshot.jpeg?tl_px=0,46\&br_px=1376,815\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=459,277)

### Load the .csv into your stage

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/b95a896b-a5e6-41e4-bf02-8f6ebeca882f/ascreenshot.jpeg?tl_px=0,8\&br_px=1376,777\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=239,276)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/e03c17ff-fde1-4bd3-b412-c33e3fe39724/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1005,7)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/ff23955f-4c43-4781-885a-58c1cd46cc6b/ascreenshot.jpeg?tl_px=68,0\&br_px=1445,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,257)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/f34d74ef-8a5b-413a-a39a-20aa0849aeab/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=664,372)

### Run the bulk update stored procedure

{% hint style="info" %}
Modify the \<placeholders> with same database and schema you uploaded the stored procedure to.
{% endhint %}

When the stored procedure completes, the attribute metadata file will be moved to the archive folder.

```sql
call <database>.<schema>.sp_update_datapancake_datasource_metadata_core(
    '@<stage_name>/<staged_filename>.csv',
    '@<stage_name>/<archive_folder>/',
    '<snowflake_username>'
);
```

### Verify the integration completed successfully by running the following query

```sql
select * from datapancake.core.vw_integration_process
where user_name = 'BWOLFF'
order by integration_process_date desc;
```


# Array Foreign Key - Bulk Update

Select and export the array foreign key metadata to a .csv file, edit in a spreadsheet like Google Sheets or Excel, then perform a bulk update in DataPancake.

***

## Array Foreign Key - Bulk Update

{% hint style="info" %}

#### Ensure you have completed the [Array Foreign Key - Initialization](app://-/database-object-initialization/array-foreign-key-initialization) guide.

{% endhint %}

This guide explains how to export foreign key metadata, edit the metadata in a spreadsheet, and apply the changes through a CSV bulk update.

The examples use the sample **Real Estate** data source. The exact data source ID and available child tables may vary by environment.

#### Open a new SQL worksheet in Snowflake

Open Snowsight and create a new SQL worksheet.

Select a role, warehouse, database, and schema with access to the DataPancake application and the Snowflake stage used for bulk-update files.

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/68632df4-c5d3-4fff-a936-35d9da4ad590/action-d2e23de045f24392ad681c14f052b650_257db268e1564d32ac6691bd16cc10af_text_export.jpeg)

#### Export the foreign key metadata

Run the following query to retrieve foreign key metadata from `DATAPANCAKE.CORE.VW_DATASOURCE_FOREIGN_KEYS`.

```sql
SELECT
-- REQUIRED COLUMNS FOR BULK UPDATE
FOREIGN_KEY_ID, -- Unique ID for upsert operations - use {new_id} for new records
ATTRIBUTE_ID_CHILD_TABLE,
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
DATASOURCE_NAME,
PARENT_TABLE_WITHOUT_PREFIX,
CHILD_TABLE_WITHOUT_PREFIX,
CHILD_TABLE_PATH,
CHILD_TABLE_LEVEL,
-- EDITABLE COLUMNS FOR BULK UPDATE
PARENT_ATTRIBUTE_NAME,
CHILD_ATTRIBUTE_NAME,
INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY,
ROW_ACCESS_POLICY_COLUMN_ORDER
FROM datapancake.core.vw_datasource_foreign_keys
--where datasource_id = '<your datasource id>'
ORDER BY DATASOURCE_NAME, CHILD_TABLE_LEVEL, CHILD_TABLE_WITHOUT_PREFIX, PARENT_ATTRIBUTE_NAME;
```

{% hint style="info" %}
Uncomment the `WHERE` clause and enter the target data source ID to limit the export to a single data source.\
\
Filtering the export reduces the possibility of changing foreign keys for an unrelated data source.
{% endhint %}

For the Real Estate demonstration, filter the query to the sample Real Estate data source in your environment.

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/bd623a2a-bfec-4296-8fde-47763b4932c5/action-28eb42ab405a4b54b19ee7150af6f765_56eed7ea1437478c8e0e89fb156c420f_text_export.jpeg)

#### Run the query and review the results

Execute the query.

Confirm that the results contain the Real Estate data source and its child tables.

Use the following columns to identify each child table:

* `CHILD_TABLE_WITHOUT_PREFIX`
* `CHILD_TABLE_PATH`
* `CHILD_TABLE_LEVEL`
* `ATTRIBUTE_ID_CHILD_TABLE`

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/a48679c1-8249-433e-b0fe-70d440dae979/action-fec9a831b92c459ca485368a7d7ac21b_8a163a021f3040028444862733da9d5e_text_export.jpeg)

#### Download the results as a CSV file

Download the query results as a `.csv` file.

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/fe6e449b-9975-4dff-86ea-31ee2b320709/action-efa2449906ea4481a66997db40645ae8_df74d1a3f62545889d3caa86e68c1841_text_export.jpeg)

#### Open the CSV file

Open the downloaded file in Excel, Google Sheets, or another spreadsheet editor that preserves CSV formatting.

Confirm that the header row contains all exported columns.

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/1173e8f9-078f-4b0b-b5fc-c593a0c71d92/action-9c61b88b7a944a7483c99c2467f065d3_6a29e9c73604451bbc3c11b3b0c335c9_text_export.jpeg)

#### Review the CSV columns

| Column                                | Usage                                                                                                                            |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `FOREIGN_KEY_ID`                      | Preserve the existing identifier when updating a record. Enter `{new_id}` when creating a new foreign key.                       |
| `ATTRIBUTE_ID_CHILD_TABLE`            | Required identifier for the child table attribute. Preserve the exported value.                                                  |
| `DATASOURCE_ID`                       | View-only data source identifier. Do not edit.                                                                                   |
| `DATASOURCE_NAME`                     | View-only data source name. Do not edit.                                                                                         |
| `PARENT_TABLE_WITHOUT_PREFIX`         | View-only parent table name. Do not edit.                                                                                        |
| `CHILD_TABLE_WITHOUT_PREFIX`          | View-only child table name. Do not edit.                                                                                         |
| `CHILD_TABLE_PATH`                    | View-only path that identifies the child table within the source structure. Do not edit.                                         |
| `CHILD_TABLE_LEVEL`                   | View-only nesting level of the child table. Do not edit.                                                                         |
| `PARENT_ATTRIBUTE_NAME`               | Parent attribute whose value should be added to the child table.                                                                 |
| `CHILD_ATTRIBUTE_NAME`                | Name of the foreign key column created in the child table.                                                                       |
| `INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY` | Enter `TRUE` or `FALSE` to control whether the generated child-table column is included in the row access policy.                |
| `ROW_ACCESS_POLICY_COLUMN_ORDER`      | Enter the column's position in the row access policy when applicable. Leave blank when the column is not included in the policy. |

{% hint style="info" %}
Do not change `ATTRIBUTE_ID_CHILD_TABLE` or any of the view-only columns.\
\
When updating an existing foreign key, preserve its current `FOREIGN_KEY_ID`. Use `{new_id}` only when creating a new foreign key record.
{% endhint %}

#### Add `property_id_pk` to selected Real Estate child tables

For this demonstration, select a few of the Real Estate child tables that should receive the parent property's identifier.

For each selected child table:

1. Enter `{new_id}` in `FOREIGN_KEY_ID`.
2. Preserve the exported `ATTRIBUTE_ID_CHILD_TABLE`.
3. Enter `property_id_pk` in `PARENT_ATTRIBUTE_NAME`.
4. Enter `property_id_pk` in `CHILD_ATTRIBUTE_NAME`.
5. Enter `FALSE` in `INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY`.
6. Leave `ROW_ACCESS_POLICY_COLUMN_ORDER` blank.

Example:

| FOREIGN\_KEY\_ID | ATTRIBUTE\_ID\_CHILD\_TABLE | CHILD\_TABLE\_WITHOUT\_PREFIX | PARENT\_ATTRIBUTE\_NAME | CHILD\_ATTRIBUTE\_NAME | INCLUDE\_COLUMN\_IN\_ROW\_ACCESS\_POLICY | ROW\_ACCESS\_POLICY\_COLUMN\_ORDER |
| ---------------- | --------------------------- | ----------------------------- | ----------------------- | ---------------------- | ---------------------------------------- | ---------------------------------- |
| `{new_id}`       | Preserve exported value     | First selected child table    | `property_id_pk`        | `property_id_pk`       | `FALSE`                                  | <p><br></p>                        |
| `{new_id}`       | Preserve exported value     | Second selected child table   | `property_id_pk`        | `property_id_pk`       | `FALSE`                                  | <p><br></p>                        |
| `{new_id}`       | Preserve exported value     | Third selected child table    | `property_id_pk`        | `property_id_pk`       | `FALSE`                                  | <p><br></p>                        |

{% hint style="info" %}
The table names shown in the CSV depend on the current Real Estate data source schema. Select child tables that do not already contain the intended `property_id_pk` foreign key relationship.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/4881fbee-23d3-4b96-b20e-9414412149d8/action-b18102fb9a2449f2b9d226f7e8cb4ba3_e62a39a769dd4210a50ba0e2b26e242b_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/765a64ed-c822-4f69-b5fa-0a10cf930bc5/action-d11c5ded37344ae7b980b2335eb86eb9_eb25e71ab86a4dcca0ab6b659bd9f6e6_text_export.jpeg)

#### Save the CSV file

Save or download the edited spreadsheet as a CSV file.

Use a descriptive filename, such as:

```
real_estate_foreign_keys_YYYYMMDD.csv
```

{% hint style="info" %}
Confirm that the saved filename contains exactly one `.csv` extension.

The stage path used in the stored procedure call must exactly match the uploaded filename.
{% endhint %}

#### Upload the CSV to a Snowflake stage

In Snowflake, navigate to the database, schema, and stage used for DataPancake bulk-update files.

Select **+ Files** or the equivalent upload action and upload the edited CSV.

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/04f770cd-ef5c-42ca-959e-5f6e0cf08c37/action-e3099445604440659639f432623368e2_9ec697f6709c4126bb4adf03710557aa_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/370c9681-a644-4bd6-978a-ed0c6a7ac50c/action-b968f5c91771411c892bf9d75da2888d_a82b263e1c8444a08e7fa8f71f691b3c_text_export.jpeg)

#### Verify the staged filename

Confirm that the uploaded CSV appears in the stage.

Note the exact stage path and filename. You will use both values in the stored procedure call.

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/b1340cfe-e093-427d-8277-adc3d8831f5a/action-9317a45cb49a4dcf9360751498b0930c_7f7777094bc84dfeb27129fd343fb843_text_export.jpeg)

#### Run the bulk update stored procedure

Run the same array foreign key bulk-update procedure used for existing foreign key files.

Replace the placeholders with values for your environment.

```sql
call <database>.<schema>.sp_update_datapancake_array_foreign_key_metadata_core(
    '@<stage_name>/<staged_filename>.csv',
    '@<stage_name>/<archive_folder>/',
    '<snowflake_username>'
);
```

Example structure:

```sql
call MY_DATABASE.MY_SCHEMA.sp_update_datapancake_array_foreign_key_metadata_core(
    '@MY_DATABASE.MY_SCHEMA.DATAPANCAKE_FILES/real_estate_foreign_keys_YYYYMMDD.csv',
    '@MY_DATABASE.MY_SCHEMA.DATAPANCAKE_FILES/ARCHIVED_FILES/',
    'MY_USERNAME'
);
```

{% hint style="warning" %}
The stage path and filename must exactly match the uploaded file.<br>

Check the following values before running the procedure:

* Database
* Schema
* Stage
* Optional folder
* Filename
* File extension
* Snowflake username
  {% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/90b7e618-58ca-4d28-a4cb-7f1ce8d04617/action-affec076b2cc42f2b9f05ebf3d6cd05f_cc037fde78d5407f9a3ad6471883d077_text_export.jpeg)

#### Review the returned processing message

Execute the stored procedure call.

The procedure returns a processing message after it evaluates the uploaded file. Review the complete returned message and confirm that the file was processed successfully.

The screenshot for this step should capture the full message returned by the current version of the stored procedure.

{% hint style="success" %}
The returned processing message is the primary confirmation that the file was accepted and processed. Review the entire message before continuing to verification.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-08-05/486318d3-e24d-4a89-81b1-1c8e43a75059/action-ae72c6bc6f2b46e682b29ca1e621d8aa_22324a3b737247b3b7948e48a4629a73_text_export.jpeg)

#### Confirm that the file was archived

After a successful update, confirm that the processed CSV was moved to the configured archive folder.

The file should:

* Appear in the archive folder.
* No longer appear in its original stage location.

#### Verify the new foreign keys

Rerun the export query using the same Real Estate data source filter.

```sql
SELECT
-- REQUIRED COLUMNS FOR BULK UPDATE
FOREIGN_KEY_ID,
ATTRIBUTE_ID_CHILD_TABLE,
-- VIEW ONLY COLUMNS
DATASOURCE_ID,
DATASOURCE_NAME,
PARENT_TABLE_WITHOUT_PREFIX,
CHILD_TABLE_WITHOUT_PREFIX,
CHILD_TABLE_PATH,
CHILD_TABLE_LEVEL,
-- EDITABLE COLUMNS FOR BULK UPDATE
PARENT_ATTRIBUTE_NAME,
CHILD_ATTRIBUTE_NAME,
INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY,
ROW_ACCESS_POLICY_COLUMN_ORDER
FROM datapancake.core.vw_datasource_foreign_keys
WHERE datasource_id = '<your datasource id>'
ORDER BY DATASOURCE_NAME, CHILD_TABLE_LEVEL, CHILD_TABLE_WITHOUT_PREFIX, PARENT_ATTRIBUTE_NAME;
```

For each child table updated in the CSV, confirm that:

* `FOREIGN_KEY_ID` now contains a generated identifier instead of `{new_id}`.
* `ATTRIBUTE_ID_CHILD_TABLE` identifies the expected child table attribute.
* `PARENT_ATTRIBUTE_NAME` is `property_id_pk`.
* `CHILD_ATTRIBUTE_NAME` is `property_id_pk`.
* `INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY` is `FALSE`.
* The correct child table is shown in `CHILD_TABLE_WITHOUT_PREFIX` and `CHILD_TABLE_PATH`.

#### Optional: Review the integration process

You can also review the DataPancake integration process log.

Replace `<snowflake_username>` with the username passed to the bulk-update procedure.

```
SELECT *
FROM datapancake.core.vw_integration_process
WHERE user_name = '<snowflake_username>'
ORDER BY integration_process_date DESC;
```

Review the latest entry associated with the uploaded CSV.

***

#### Troubleshooting

**The staged file could not be found**

Confirm that:

* The file was uploaded successfully.
* The stage path is correct.
* The filename in the procedure call exactly matches the staged filename.
* The filename does not contain a duplicated `.csv` extension.
* The active Snowflake role has access to the stage.

You can list the staged files to confirm the exact filename:

```
LIST @<database>.<schema>.<stage>;
```

**A new foreign key was not created**

Confirm that:

* `FOREIGN_KEY_ID` contains exactly `{new_id}`.
* `ATTRIBUTE_ID_CHILD_TABLE` contains the original exported identifier.
* `PARENT_ATTRIBUTE_NAME` contains `property_id_pk`.
* `CHILD_ATTRIBUTE_NAME` contains `property_id_pk`.
* The required column headers were not renamed.
* The intended child table row was edited.

**An existing foreign key was duplicated**

Use `{new_id}` only when creating a new foreign key.

When updating an existing relationship, preserve the generated value already present in `FOREIGN_KEY_ID`.

**The wrong child table was updated**

Use the following view-only fields together to identify the intended table before editing:

* `CHILD_TABLE_WITHOUT_PREFIX`
* `CHILD_TABLE_PATH`
* `CHILD_TABLE_LEVEL`
* `ATTRIBUTE_ID_CHILD_TABLE`

Do not rely on the child table name alone when similarly named tables exist at different nesting levels.

**The row access policy configuration was not applied**

Confirm that:

* `INCLUDE_COLUMN_IN_ROW_ACCESS_POLICY` contains `TRUE` or `FALSE`.
* `ROW_ACCESS_POLICY_COLUMN_ORDER` is populated when required.
* The data source has the required security policy features enabled.
* The configured policy supports the selected child-table column.


# Schema Transformation / Consolidation - Bulk Update

Select and export the scema transformation metadata to a .csv file, edit in a spreadsheet like Google Sheets or Excel, then perform a bulk update in DataPancake.

{% hint style="info" %}

### Ensure you have completed [Initialization Guide](/guides/how-to-guides-bulk-upsert-via-csv/database-object-initialization/schema-transformation-consolidation-intialization)

{% endhint %}

### Open a new SQL file Snowflake workspace

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/4b391681-1194-493e-87ae-5b5e550c0857/ascreenshot_294d708fbe9e4bff8033a5f4c50a35c2_text_export.jpeg)

### Run a select statement for DATAPANCAKE.CORE.VW\_DATASOURCE\_SCHEMA\_CONSOLIDATION

```sql
SELECT
-- REQUIRED COLUMNS FOR BULK UPDATE
TRANSFORMATION_ID,  -- Unique ID for upsert operations - use {new_id} for new records
DATASOURCE_ID,
-- VIEW ONLY COLUMNS
DATASOURCE_NAME,
DATASOURCE_TAG,
-- EDITABLE COLUMNS FOR BULK UPDATE
TRANSFORMATION_NAME,
TRANSFORMATION_TYPE,
SCHEMA_ATTRIBUTE_PATH_SEARCH,
SCHEMA_REGULAR_EXPRESSION_SEARCH,
SCHEMA_REGULAR_EXPRESSION_REPLACE,
STRING_DELIMITER_VALUE,
STRING_KEY_VALUE_SEPARATOR,
STRING_WRAPPER_VALUE,
STRING_FIELD_WIDTHS
FROM datapancake.core.vw_datasource_schema_transformation
ORDER BY DATASOURCE_NAME, TRANSFORMATION_NAME;
```

{% hint style="info" %}
You can choose which editable fields you wish to include in your select statement.
{% endhint %}

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/b327ab4a-e541-4bb0-8fff-0fdbd1da96c5/ascreenshot_0c40b3c393534615b71e22a54f94ee76_text_export.jpeg)

### Verify the query successfully returns a list of attribute metadata

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/6854ca13-27aa-47e2-9088-b96f64feed73/ascreenshot_fce689aaf5be41f1838592dbaa8545ac_text_export.jpeg)

### Download the results as a .csv file

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/f70b1a0a-d38a-43dd-ab18-8cf961d1f7db/ascreenshot_dc8fef5b5b7840b799fee9afd14c08fa_text_export.jpeg)

### Open the .csv file in either Excel or Google Sheets

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/166d997b-67c7-44df-a522-984aec4ab6e7/ascreenshot.jpeg?tl_px=109,0\&br_px=1486,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,129)

### Edit any editable columns as needed

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/3dcc3276-5b44-4d03-bc5e-d511fb39a13c/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=643,123)

### Save (Excel) or download (Google Sheets) the file

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-24/1d878217-47d1-4e0b-9beb-5b32f76fd18a/ascreenshot.jpeg?tl_px=0,46\&br_px=1376,815\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=459,277)

### Load the .csv into your stage

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/b95a896b-a5e6-41e4-bf02-8f6ebeca882f/ascreenshot.jpeg?tl_px=0,8\&br_px=1376,777\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=239,276)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/e03c17ff-fde1-4bd3-b412-c33e3fe39724/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1005,7)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/ff23955f-4c43-4781-885a-58c1cd46cc6b/ascreenshot.jpeg?tl_px=68,0\&br_px=1445,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,257)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-25/f34d74ef-8a5b-413a-a39a-20aa0849aeab/ascreenshot.jpeg?tl_px=164,223\&br_px=1541,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=664,372)

### Run the bulk update stored procedure

{% hint style="info" %}
Modify the \<placeholders> with same database and schema you uploaded the stored procedure to.
{% endhint %}

When the stored procedure completes, the attribute metadata file will be moved to the archive folder.

```sql
call <database>.<schema>.sp_update_datapancake_datasource_schema_transformation_metadata_core(
    '@<stage_name>/<staged_filename>.csv',
    '@<stage_name>/<archive_folder>/',
    '<snowflake_username>'
);
```

### Verify the integration completed successfully by running the following query

```sql
select * from datapancake.core.vw_integration_process
where user_name = 'BWOLFF'
order by integration_process_date desc;
```


# temp

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/b327ab4a-e541-4bb0-8fff-0fdbd1da96c5/ascreenshot_0c40b3c393534615b71e22a54f94ee76_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/6854ca13-27aa-47e2-9088-b96f64feed73/ascreenshot_fce689aaf5be41f1838592dbaa8545ac_text_export.jpeg)

![](https://colony-recorder.s3.amazonaws.com/files/2026-01-23/f70b1a0a-d38a-43dd-ab18-8cf961d1f7db/ascreenshot_dc8fef5b5b7840b799fee9afd14c08fa_text_export.jpeg)


# Miscellaneous Guides


# How to Install DataPancake

Purchase and Install the DataPancake Snowflake Native App into an existing Snowflake account.

### Navigate to the Snowflake Marketplace

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-22/1b29cabc-8d50-4328-b6a0-5695e97c8731/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=108,231)

### Search for "DataPancake"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-22/8e0c98a4-0452-4cd8-875b-8a098c861149/ascreenshot.jpeg?tl_px=0,0\&br_px=1376,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=316,31)

### Click the DataPancake listing

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-11/d49c0c6c-ca15-4eb1-bdf4-6c5f5b555897/ascreenshot.jpeg?tl_px=407,0\&br_px=1783,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,197)

### Click "See Pricing"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-22/4a9c19e8-fb1e-411f-9e5d-575462a9dbab/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=861,147)

### Explore the pricing model, then click "Try Now"

To learn more about standard DataPancake pricing, visit the DataPancake [pricing page](https://www.datapancake.com/pricing).

{% hint style="info" %}
You may be eligible to use the MarketPlace Capacity Drawdown to pay for DataPancake. Contact your Snowflake account executive to sign a Marketplace Capacity Drawdown agreement.
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-22/2b3a174c-9f38-4005-a756-ed2baaae0cc8/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=855,0)

### (Optional) Modify the name of the application

The default is DataPancake

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-22/cca8285f-9350-4c06-ae3d-e11ae1281a1a/ascreenshot.jpeg?tl_px=20,120\&br_px=1396,889\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=523,277)

### Click "Start Trial"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-12-22/2084dbe8-d214-4ecd-a9ff-66eb8e969e9b/ascreenshot.jpeg?tl_px=87,189\&br_px=1463,959\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,323)

### After 5-7 minutes, DataPancake will be installed in your environment and ready to use

Navigate to the Catalog and select Apps, then you can "Browse all apps". The installed version of DataPancake will be available to launch from here when it is ready.

Make sure to refresh your browser after \~7 minutes to see if the application is installed.

You may also need to refresh DataPancake itself after opening for the first time. You will also need to select a warehouse when DataPancake is opened if you didn't already.

![](https://colony-recorder.s3.amazonaws.com/files/2025-12-23/7da3e3a7-b5cd-4e07-ad77-3a5c8f2458a7/ascreenshot_3cf630f68e32489ba4987bc07a941e69_text_export.jpeg)

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-05-11/52dbfc66-fca7-4d7a-bdc0-4375e5e06f2d/ascreenshot.jpeg?tl_px=0,57\&br_px=1376,826\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=285,277)


# How to Upgrade DataPancake from the Free Trial

Upgrade DataPancake from a free trial to use all of its features.

### From DataPancake Click the "Go to Listing" button

Alternatively, you can go to directly to the listing from the Snowflake Marketplace.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-10/2a6591de-dcd6-478b-8ee3-5c98fb31521c/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=1004,38)

### Click "See Pricing"

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-10/537b373b-6ae6-4d63-8228-687d1e6481d4/ascreenshot.jpeg?tl_px=164,0\&br_px=1541,769\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=889,151)

### Review the pricing model and click buy

{% hint style="success" %}
**You are not charged until you enable and use paid features for a specific data source.**

See the [pricing page](https://www.datapancake.com/pricing) and the [guide on enabling features](/guides/how-to-guides-ui/modify-enabled-features-for-a-data-source) as needed.
{% endhint %}

{% hint style="success" %}
**The scanning/discovering, schema summary information, and summary schema drift alert are always free.**
{% endhint %}

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-10/6c226db2-77eb-4627-ba49-48eb57e66216/ascreenshot.jpeg?tl_px=87,223\&br_px=1463,993\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,536)

### Verify the Purchase was Successful

If you have any issues, please [contact us](https://www.datapancake.com/contact-us) for more help.

![](https://ajeuwbhvhr.cloudimg.io/https://colony-recorder.s3.amazonaws.com/files/2025-06-10/7fd6e24c-2b39-4ff2-9e77-b6e600d3e610/ascreenshot.jpeg?tl_px=79,159\&br_px=1456,928\&force_format=jpeg\&q=100\&width=1120.0\&wat=1\&wat_opacity=1\&wat_gravity=northwest\&wat_url=https://colony-recorder.s3.amazonaws.com/images/watermarks/FB923C_standard.png\&wat_pad=524,277)


# JSON Tutorial UDFs & Security Policies

Copy and deploy these in a workspace for the JSON Tutorial.

```sql
CREATE OR REPLACE ROLE PLANT_ACCESS_NA;
CREATE OR REPLACE ROLE PLANT_ACCESS_EU;

CREATE OR REPLACE TABLE DEMO_PHARMA_MANUFACTURING_PLANT_ACCESS (
  role_name STRING,
  plant_code STRING);

-- Example grants
INSERT INTO DEMO_PHARMA_MANUFACTURING_PLANT_ACCESS(role_name, plant_code) VALUES
  ('PLANT_ACCESS_NA','PLT-AZ01'),
  ('PLANT_ACCESS_NA','PLT-NJ02'),
  ('PLANT_ACCESS_EU','PLT-IE03');
  

-- Row access policy using role() to look up entitlements
CREATE OR REPLACE ROW ACCESS POLICY rap_by_plant
AS (plant_code STRING) RETURNS BOOLEAN ->
  'ACCOUNTADMIN' = CURRENT_ROLE() 
  OR
  EXISTS (
    SELECT 1
    FROM DEMO_PHARMA_MANUFACTURING_PLANT_ACCESS pa
    WHERE pa.plant_code = plant_code
      AND UPPER(pa.role_name) IN (
        SELECT UPPER(value::string)
        FROM TABLE(
          FLATTEN(INPUT => PARSE_JSON(CURRENT_AVAILABLE_ROLES()))
        )
      )
  );



CREATE OR REPLACE FUNCTION mask_phone(raw STRING)
RETURNS STRING
LANGUAGE SQL
AS
$$
  CASE
    WHEN raw IS NULL THEN NULL
    WHEN LENGTH(raw) <= 4 THEN '****'
    ELSE CONCAT(REPEAT('*', GREATEST(LENGTH(raw)-4,0)), RIGHT(raw, 4))
  END
$$;

-- Policy for phone
CREATE OR REPLACE MASKING POLICY mp_customer_phone AS (val STRING) RETURNS STRING ->
  CASE
    WHEN CURRENT_ROLE() IN ('ACCOUNTADMIN') THEN val
    ELSE mask_phone(val)
  END;

-- Policy for email
CREATE OR REPLACE MASKING POLICY mp_customer_email AS (val STRING) RETURNS STRING ->
  CASE
    WHEN CURRENT_ROLE() IN ('ACCOUNTADMIN') THEN val
    ELSE REGEXP_REPLACE(val, '(^.).+(@.+$)', '\\1***\\2')  -- a***@domain
  END;

-------Data Enrichment
  

-- UDF: standardize part number to uppercase and zero-pad the middle block
CREATE OR REPLACE FUNCTION udf_std_part_number(pn STRING)
RETURNS STRING
LANGUAGE SQL
IMMUTABLE
AS
$$
  CASE
    WHEN pn IS NULL THEN NULL

    
    WHEN REGEXP_LIKE(pn, '^PN-(\d+)-([A-Z])$', 'i') THEN
      UPPER('PN-' || LPAD(REGEXP_SUBSTR(pn, 'PN-(\d+)-', 1, 1, 'i', 1), 4, '0') || '-' ||
            REGEXP_SUBSTR(pn, '-([A-Z])$', 1, 1, 'i', 1))
    ELSE UPPER(pn)
  END
$$;


CREATE OR REPLACE FUNCTION udf_email_domain(email STRING)
RETURNS STRING
LANGUAGE SQL
IMMUTABLE
AS
$$
  CASE
    WHEN email IS NULL THEN NULL
    -- trim whitespace and lowercase
    WHEN REGEXP_LIKE(LOWER(TRIM(email)), '^[^@]+@[^@]+$') THEN
      LOWER(SPLIT_PART(TRIM(email), '@', 2))
    ELSE NULL
  END
$$;
```


# FAQ

Frequently Asked Questions

## FAQ

#### 1. How do we ensure data quality when loading files?

If you use the **DataPancake XML Chunker** to load data, it reports a **hash value** you can check against a hash of the raw file.

* A provided **stored procedure** can scan dynamic table columns for fields that are 100% null, which indicates potential issues.
* DataPancake supports **custom null expressions** to make quality checks easier.
* For deeper checks, you can:
  * Count XML elements in the raw file and compare them to rows in the final materialized tables.
  * Validate transformation expressions (e.g., formulas or UDFs) to avoid incorrect results.

***

#### 2. Can we add metadata columns (e.g., filename, run date) to dynamic tables?

Yes. You can add **virtual attributes** at the root or within any nested array. These can be populated using any valid SQL expression, including values from other source columns.

***

#### 3. How does the automated XML file ingestion process work?

We provide SQL code to automate the pipeline:

* A task checks for new files in ADLS.
* When a new file arrives, the **XML Chunker UDTF** brings the data into the **raw staging table** using a **variant column**.

***

#### 4. Can we clean up dynamic tables with aliases, PKs, and FKs?

Yes. You can alias:

* Raw dynamic table names
* Dynamic column names
* Primary/foreign key column names
* View names and view column names

This allows you to simplify naming and hide unnecessary array data when creating views.


# Warehouses

Snowflake virtual warehouses configured for DataPancake scanning operations, with specific requirements for Snowpark-Optimized warehouses and concurrency settings.

### Overview

Warehouses in DataPancake refer to Snowflake virtual warehouses that you make available to the application as compute resources for scanning operations. Each scan configuration must be assigned to a specific warehouse, and each warehouse can only support one scan at a time.

**DataPancake-Specific Constraints:**

* **One scan per warehouse** - Each warehouse processes one scan at a time; multiple warehouses required for concurrent scanning
* **Snowpark-Optimized required** - DataPancake uses Snowpark Python procedures; standard warehouses are not recommended
* **MAX\_CONCURRENCY\_LEVEL = 1** - Required for all Snowpark-Optimized warehouses to prevent memory contention
* **60-minute timeout** - Snowflake native app limitation; scans exceeding 60 minutes are automatically terminated

***

### Warehouse Configuration

#### Supported Warehouse Sizes

DataPancake supports Snowpark-Optimized warehouses. Thread count defaults are determined by `AVAILABLE_CORES` from the `compute_resource_size` table:

* **X-Small**: 8 threads
* **Small**: 16 threads
* **Medium Snowpark Optimized**: 32 threads (recommended for most use cases)
* **Large Snowpark Optimized**: 64 threads
* **X-Large Snowpark Optimized**: 128 threads
* **2X-Large Snowpark Optimized**: 256 threads
* **3X-Large through 6X-Large**: 512-4096 threads

**Size Recommendations:**

* **Medium Snowpark-Optimized** - Best balance of performance and cost; achieves approximately 1,000,000 records per minute; recommended starting point
* **Multiple Medium Warehouses** - More cost-effective than larger warehouses; enables concurrent scanning across multiple data sources
* **Large and 2X-Large** - Use for exceptionally large or complex data sources; diminishing returns compared to medium warehouses
* **Small** - Suitable for testing and small data sources; may struggle with complex or large data sources

#### Required Settings

**Warehouse Type:**

* **Snowpark-Optimized** - Required for DataPancake's Snowpark-based scanning
* **Standard warehouses** - Not recommended; may experience performance limitations

**MAX\_CONCURRENCY\_LEVEL = 1:**

* Required for all Snowpark-Optimized warehouses
* Prevents memory contention during Python procedure execution
* Prevents scan failures due to memory constraints

***

### Performance Characteristics

#### Scan Speed Benchmarks

**Medium Snowpark-Optimized Warehouse:**

* Approximately 1,000,000 records per minute
* Performance varies based on:
  * Data source complexity (nested structures, array depth)
  * Number of polymorphic variations
  * Embedded JSON content
  * Data source type (Internal Tables vs. External Tables)

**External Tables:**

* Slightly slower than internal tables
* Network latency and external storage access add overhead
* Still achieve high throughput on medium warehouses

**Scaling Considerations:**

* Diminishing returns as warehouse size increases
* 2X-Large warehouses don't provide significantly better performance than Medium
* Multiple medium warehouses provide better overall throughput than single large warehouses
* Cost-effectiveness favors multiple medium warehouses over fewer large ones

#### Memory Constraints

**Real Memory Limitations:**

* Python procedures have significant memory requirements
* Complex data sources with deep nesting consume more memory
* Large arrays and polymorphic variations increase memory usage
* Warehouse size directly impacts available memory

**Vertical Scaling:**

* DataPancake uses vertical scaling across threads within a warehouse
* Efficient job handling maximizes warehouse utilization
* Memory constraints are the primary limiting factor, not CPU

#### Timeout Constraints

**60-Minute Runtime Limit:**

* Snowpark procedures in Snowflake native apps have a 60-minute runtime limit
* Scans exceeding 60 minutes are automatically terminated by Snowflake
* This is a Snowflake organizational-level limitation, not a DataPancake limitation

**Handling Large Data Sources:**

* Break large scans into multiple procedure calls using Scan Configuration settings
* Set appropriate record limits per procedure call to stay within 60-minute limit
* Monitor scan duration and adjust batch sizes accordingly

***

### Naming Conventions

**Recommended Pattern:** `pancake_<warehouse_size>_<number>`

**Examples:**

* `pancake_medium_snowpark_optimized_1`
* `pancake_medium_snowpark_optimized_2`
* `pancake_large_optimized_1`

**Notes:**

* Use descriptive names indicating size and type
* Include sequential numbers for multiple warehouses of same size
* Avoid special characters that might cause issues in SQL

***

### Adding Warehouses

#### During Initial Setup

Warehouses must be created immediately following the granting of global permissions. The setup script (available via the Readme button) includes warehouse creation statements.

**Setup Script Example:**

```sql
CREATE OR REPLACE WAREHOUSE PANCAKE_MEDIUM_OPTIMIZED_01 WITH
  WAREHOUSE_SIZE = 'Medium'
  WAREHOUSE_TYPE = 'SNOWPARK-OPTIMIZED'
  MAX_CONCURRENCY_LEVEL = 1;
```

**Setup Process:**

1. Grant global permissions to DataPancake application
2. Create warehouses using `CREATE OR REPLACE WAREHOUSE` statements
3. Warehouses are automatically registered during setup script execution via `ADD_WAREHOUSE` procedure calls

**Required Settings:**

* `WAREHOUSE_TYPE = 'SNOWPARK-OPTIMIZED'`
* `MAX_CONCURRENCY_LEVEL = 1`

***

#### After Initial Setup

**Post-Setup Process (3 steps, in order):**

1. **Create the Warehouse in Snowflake:**

```sql
CREATE OR REPLACE WAREHOUSE PANCAKE_LARGE_OPTIMIZED_03 WITH
  WAREHOUSE_SIZE = 'Large'
  WAREHOUSE_TYPE = 'SNOWPARK-OPTIMIZED'
  MAX_CONCURRENCY_LEVEL = 1;
```

2. **Grant Usage to DataPancake:**

```sql
GRANT USAGE on WAREHOUSE PANCAKE_LARGE_OPTIMIZED_03 to APPLICATION PANCAKE;
```

3. **Register Warehouse in DataPancake:**

```sql
CALL PANCAKE.CORE.ADD_WAREHOUSE('PANCAKE_LARGE_OPTIMIZED_03', 'LARGE');
```

**Notes:**

* The `ADD_WAREHOUSE` procedure uses a LIKE match on warehouse size name (partial matches work, e.g., 'LARGE' matches 'Large Snowpark Optimized')
* Warehouse name matching is case-insensitive
* Duplicate warehouse names are rejected

***

#### Via DataPancake UI

**UI Process (still requires SQL for step 2):**

1. Create warehouse in Snowsight (Admin → Warehouses)
2. Grant usage via SQL: `GRANT USAGE on WAREHOUSE <name> to APPLICATION PANCAKE;`
3. Register in DataPancake: Navigate to "Manage Warehouses", enter warehouse name (case-insensitive), select size, click "Save"

**Notes:**

* Warehouse must exist in Snowflake before registration
* Warehouse name matching in UI is case-insensitive

***

### Common Scenarios

#### Single Data Source, Regular Scanning

* Use a single medium Snowpark-Optimized warehouse
* Set scan configuration with record limit of 0 (full scan)
* Monitor scan duration to ensure it stays under 60 minutes

#### Multiple Large Data Sources

* Provision multiple medium Snowpark-Optimized warehouses
* Assign each data source to a dedicated warehouse
* Use consistent naming convention

#### Very Large Data Source Exceeding 60 Minutes

* Use multiple procedure calls in Scan Configuration
* Set appropriate record count per procedure call
* Use a medium or large warehouse depending on complexity

#### Development and Testing

* Create small Snowpark-Optimized warehouses for testing
* Use separate warehouses from production to avoid resource contention

***

### Summary

**Key Points:**

* **One scan per warehouse** - Each warehouse processes one scan at a time; multiple warehouses required for concurrent operations
* **Medium Snowpark-Optimized recommended** - Best balance of performance and cost (32 threads, \~1M records/minute)
* **MAX\_CONCURRENCY\_LEVEL = 1** - Required for all Snowpark-Optimized warehouses
* **60-minute timeout** - Snowflake native app limitation; use multiple procedure calls for large data sources
* **Thread counts** - Determined by warehouse size (X-Small: 8, Small: 16, Medium: 32, Large: 64, 2X-Large: 256, etc.)

For Snowflake warehouse documentation, see [Snowflake Virtual Warehouses](https://docs.snowflake.com/en/user-guide/warehouses-overview).


# Data Sources

Introduction to data sources and navigation hub for all data source documentation.

### Overview

Data sources connect to Snowflake database objects and define what data to scan, how to process it, and what materialized objects to generate. Data sources are the entry point for all DataPancake operations—from schema discovery through code generation and materialization.

**Key Concepts:**

1. **Source Object Connection** - Links to a specific Snowflake database object and column
2. **Data Type Classification** - Semi-Structured (VARIANT/String columns) or Structured (relational)
3. **Product Tier Management** - Enable specific features per data source
4. **Materialization Configuration** - Define output objects (dynamic tables, views, etc.)
5. **Schema Transformation** - Apply consolidations and filters during processing
6. **Baseline Performance** - Track scan performance metrics for estimation

***

### What You'll Learn

This Data Sources section covers:

* [**Data Source Types**](/core-concepts/data-sources/data-source-types) - Semi-structured and structured data sources, format types, and column data types
* [**Adding Data Sources**](/core-concepts/data-sources/adding-data-sources) - Adding via application interface or SQL file, privileges, and connection validation
* [**Basic Configuration Settings**](/core-concepts/data-sources/basic-configuration-settings) - Name, type, status, tags, and connection status
* [**Product Tiers & Features**](/core-concepts/data-sources/product-tiers-and-features) - Feature tiers from Schema Discovery to Semantic Model Generator
* [**Source Object Settings**](/core-concepts/data-sources/source-object-settings) - Object selection, column configuration, schema samples, and platform settings
* [**Materialization Settings**](/core-concepts/data-sources/materialization-settings) - Output object types, naming, deployment location, and configuration
* [**Dynamic Table Settings**](/core-concepts/data-sources/dynamic-table-settings) - Warehouse assignment, target lag, refresh modes, and metadata tables
* [**Secure View Settings**](/core-concepts/data-sources/secure-view-settings) - View types, semantic layer, and row access policy integration
* [**Schema Transformations**](/core-concepts/data-sources/schema-transformations) - Consolidation rules, transformation types, and data type transformations
* [**Schema Filters**](/core-concepts/data-sources/schema-filters) - Filter configuration, regular expressions, and attribute exclusion
* [**Baseline Scan Settings**](/core-concepts/data-sources/baseline-scan-settings) - Performance calibration and scan estimation

***

### Quick Reference

**Essential Settings:**

* **Data Source Name** - Unique identifier (case-insensitive uniqueness check)
* **Data Source Type** - Semi-Structured or Structured
* **Source Object** - Database, schema, object, and column reference
* **Status** - Active, Inactive, or Deleted

**For Semi-Structured Data Sources:**

* **Format Type** - JSON, Avro, Parquet, ORC, or XML
* **Column Data Type** - VARIANT or String
* **Column Name** - Name of the VARIANT/String column (can include parsing expressions for String type)

**Product Tiers:**

* **Schema Discovery** - Always enabled (free tier)
* **Pipeline Designer** - Foundation for all paid features (auto-enabled with others)
* **SQL Code Generation** - Enables materialization code generation (semi-structured only)
* **Additional Features** - Data Dictionary Builder, Security Policy Integration, Semantic Model Generator

**Materialization (Semi-Structured Only):**

* **Output Object Type** - Dynamic Table or Table
* **Root Table Name** - Prefix for all generated objects (required when SQL Code Generation enabled)
* **Deployment Location** - Database and schema for output objects (defaults to source location if not specified)
* **Dynamic Table Settings** - Warehouse, target lag, optional parameters (required for Dynamic Table type)

***

### Data Source Lifecycle

1. **Creation** - Add data source via application interface or SQL file (`core.add_datasource_with_scan`)
2. **Configuration** - Set product tiers, materialization settings, and transformations
3. **Initial Scan** - Perform quick scan (default 150 records) to discover schema (optional)
4. **Full Scan** - Execute comprehensive scan using scan configurations
5. **Code Generation** - Generate SQL code for materialized objects (requires SQL Code Generation feature)
6. **Deployment** - Execute generated SQL to create output objects
7. **Maintenance** - Update settings, add transformations, monitor performance

**For detailed information on scanning data sources, see the** [**Scan Configurations**](/core-concepts/scan-configurations) **documentation. For information on generated attributes, see the** [**Attribute Metadata**](/core-concepts/attribute-metadata) **documentation.**


# Adding Data Sources

Methods and requirements for adding data sources to DataPancake.

## Overview

Data sources can be added to DataPancake through two methods: the application interface or a SQL file. Both methods require appropriate Snowflake privileges to be granted first.

***

## Prerequisites

### Required Privileges

Before adding a data source, you must grant DataPancake the necessary privileges to access the source object.

For Standard Databases:

```sql
GRANT USAGE ON DATABASE <database_name> TO APPLICATION PANCAKE;
GRANT USAGE ON SCHEMA <database_name>.<schema_name> TO APPLICATION PANCAKE;
GRANT REFERENCES, SELECT ON <object_type> <database_name>.<schema_name>.<object_name> TO APPLICATION PANCAKE;
```

For Shared Databases:

```sql
GRANT USAGE ON DATABASE <database_name> TO APPLICATION PANCAKE;
GRANT USAGE ON SCHEMA <database_name>.<schema_name> TO APPLICATION PANCAKE;
GRANT IMPORTED PRIVILEGES ON DATABASE <database_name> TO APPLICATION PANCAKE;
```

Object Types:

* `TABLE` for tables
* `VIEW` for views
* `MATERIALIZED VIEW` for materialized views
* `EXTERNAL TABLE` for external tables
* `DYNAMIC TABLE` for dynamic tables
* `ICEBERG TABLE` for Iceberg tables

### Privilege Verification

The system validates privileges when:

* Creating a new data source
* Saving data source settings
* Attempting to scan the data source

If privileges are missing, you'll receive an error message with the exact SQL statements needed to grant access.

***

## Adding from Application Interface

The application interface provides a guided experience for adding data sources with validation and error handling.

{% stepper %}
{% step %}

#### Navigate to Data Sources

* Open the DataPancake application
* Navigate to "Data Source Management" → "Data Sources"
  {% endstep %}

{% step %}

#### Select "New" Action

* Use the sidebar action selector
* Choose "New" to create a new data source
  {% endstep %}

{% step %}

#### Configure Basic Settings

* Enter Data Source Name (required, unique)
* Select Data Source Type: Semi-Structured or Structured
* Set Status: Active, Inactive, or Deleted
  {% endstep %}

{% step %}

#### Configure Source Object (Semi-Structured)

* Select Object Type (Table, View, External Table, etc.)
* Select Format Type (JSON, Avro, Parquet, ORC, XML)
* Select Column Data Type (VARIANT or String)
* Select Database
* Select Schema
* Select Object Name
* Enter Column Name (VARIANT/String column name)
  {% endstep %}

{% step %}

#### Configure Source Object (Structured)

* Select Object Type
* Select Database
* Select Schema
* Select Object Name
  {% endstep %}

{% step %}

#### Optional Configuration

* Add Data Source Tags
* Configure Product Tiers/Features
* Add Schema Sample (for Semi-Structured)
* Configure Materialization Settings (if SQL Code Generation enabled)
  {% endstep %}

{% step %}

#### Save Data Source

* Click "Save Data Source" button
* System validates connection and required fields
* Success message confirms data source creation
  {% endstep %}
  {% endstepper %}

### Validation

The application validates:

* **Required Fields** - All required fields must be provided
* **Unique Name** - Data source name must be unique
* **Connection** - System attempts to connect to source object
* **Privileges** - Verifies required privileges are granted

### Error Handling

Connection Failures:

* System displays specific error message
* Provides SQL statements to grant required privileges
* Allows correction and retry

Validation Errors:

* Missing required fields are highlighted
* Error messages explain what's needed
* Sidebar shows list of missing fields

Duplicate Names:

* Error message indicates duplicate name
* Must choose a different name

***

## Adding via SQL file

SQL file addition enables programmatic data source creation using stored procedures. This method is ideal for bulk operations, automation, and integration with other systems.

### Stored Procedure: core.add\_datasource\_with\_scan

The primary stored procedure for adding data sources with optional initial scan.

Signature:

```sql
CALL core.add_datasource_with_scan(
    DATASOURCE_NAME string,
    DATASOURCE_TYPE string,
    DATASOURCE_FORMAT string,
    ATTRIBUTE_CREATE_TYPE string,
    DATASOURCE_SCHEMA_SAMPLE string,
    SOURCE_DATA_PLATFORM string,
    OBJECT_TYPE string,
    OBJECT_DATABASE_NAME string,
    OBJECT_SCHEMA_NAME string,
    OBJECT_NAME string,
    OBJECT_COLUMN_DATA_TYPE string,
    OBJECT_COLUMN_NAME string,
    INITIATE_SCAN boolean,
    SCAN_WAREHOUSE_NAME string,
    SCAN_RECORD_LIMIT int,
    BASE_SCAN_WAREHOUSE_THREAD_COUNT int,
    BASE_SCAN_RECORDS_PER_MINUTE int,
    DATASOURCE_TAG string
)
```

### Parameters

Required Parameters:

* `DATASOURCE_NAME` - Unique name for the data source
* `DATASOURCE_TYPE` - `'Semi-Structured'` or `'Structured'`
* `DATASOURCE_FORMAT` - Format type: `'JSON'`, `'Avro'`, `'Parquet'`, `'ORC'`, or `'XML'` (Semi-Structured only)
* `ATTRIBUTE_CREATE_TYPE` - `'Discover'` (scan data) or `'Schema'` (use schema sample)
* `OBJECT_TYPE` - `'Table'`, `'View'`, `'External Table'`, `'Dynamic Table'`, `'Materialized View'`, or `'Iceberg Table'`
* `OBJECT_DATABASE_NAME` - Database name containing the source object
* `OBJECT_SCHEMA_NAME` - Schema name containing the source object
* `OBJECT_NAME` - Name of the source object
* `OBJECT_COLUMN_NAME` - Column name (required for Semi-Structured)
* `OBJECT_COLUMN_DATA_TYPE` - `'Variant'` or `'String'` (required for Semi-Structured)

Optional Parameters:

* `DATASOURCE_SCHEMA_SAMPLE` - JSON/XML schema sample (for Schema attribute creation type)
* `SOURCE_DATA_PLATFORM` - `'Kafka'` or `'DynamoDB'` (for streaming platforms)
* `INITIATE_SCAN` - `TRUE` to perform initial scan, `FALSE` to skip
* `SCAN_WAREHOUSE_NAME` - Warehouse name for initial scan
* `SCAN_RECORD_LIMIT` - Number of records to scan (0 = unlimited, default 150 for quick scan)
* `BASE_SCAN_WAREHOUSE_THREAD_COUNT` - Thread count for baseline (default 8)
* `BASE_SCAN_RECORDS_PER_MINUTE` - Records per minute for baseline (default 10000)
* `DATASOURCE_TAG` - Optional tags for organization

### Example: Basic Semi-Structured Data Source

```sql
DECLARE 
    datasource_name VARCHAR DEFAULT 'PRODUCTION.MEDICAL_DEVICE.UDI_JSON'; 
    object_type VARCHAR DEFAULT 'Table'; 
    database_name VARCHAR DEFAULT 'PRODUCTION'; 
    schema_name VARCHAR DEFAULT 'MEDICAL_DEVICE'; 
    object_name VARCHAR DEFAULT 'UDI_JSON'; 
    column_name VARCHAR DEFAULT 'JSON_DATA'; 
    datasource_tag VARCHAR DEFAULT ''; 
    warehouse_name VARCHAR DEFAULT 'PANCAKE_X_SMALL_01'; 
    record_limit INT DEFAULT 150; 
    initiate_scan BOOLEAN DEFAULT TRUE; 
    call_result VARCHAR;
BEGIN 
    CALL PANCAKE.core.add_datasource_with_scan( 
        :datasource_name,
        'Semi-Structured',
        'JSON',
        'Discover',
        '',
        '',
        :object_type,
        :database_name,
        :schema_name,
        :object_name,
        'Variant',
        :column_name,
        :initiate_scan,
        :warehouse_name,
        :record_limit,
        8,
        10000,
        :datasource_tag
    ) INTO :call_result;
    
    RETURN :call_result;
END;
```

### Example: Full Scan on Creation

```sql
DECLARE 
    datasource_name VARCHAR DEFAULT 'PRODUCTION.MEDICAL_DEVICE.UDI_JSON'; 
    warehouse_name VARCHAR DEFAULT 'PANCAKE_MEDIUM_OPTIMIZED_01'; 
    record_limit INT DEFAULT 0; -- 0 = unlimited
    call_result VARCHAR;
BEGIN 
    CALL PANCAKE.core.add_datasource_with_scan( 
        :datasource_name,
        'Semi-Structured',
        'JSON',
        'Discover',
        '',
        '',
        'Table',
        'PRODUCTION',
        'MEDICAL_DEVICE',
        'UDI_JSON',
        'Variant',
        'JSON_DATA',
        TRUE,
        :warehouse_name,
        :record_limit,
        8,
        10000,
        ''
    ) INTO :call_result;
    
    RETURN :call_result;
END;
```

### Example: Using Schema Sample

```sql
DECLARE 
    schema_sample VARCHAR DEFAULT '{"id": "string", "name": "string", "items": [{"item_id": "string"}]}';
    call_result VARCHAR;
BEGIN 
    CALL PANCAKE.core.add_datasource_with_scan( 
        'PRODUCTION.MEDICAL_DEVICE.UDI_JSON',
        'Semi-Structured',
        'JSON',
        'Schema', -- Use schema sample
        :schema_sample,
        '',
        'Table',
        'PRODUCTION',
        'MEDICAL_DEVICE',
        'UDI_JSON',
        'Variant',
        'JSON_DATA',
        FALSE, -- Don't initiate scan
        '',
        0,
        8,
        10000,
        ''
    ) INTO :call_result;
    
    RETURN :call_result;
END;
```

### Example: Structured Data Source

```sql
DECLARE 
    call_result VARCHAR;
BEGIN 
    CALL PANCAKE.core.add_datasource_with_scan( 
        'PRODUCTION.CUSTOMER_DATA.ORDERS_TABLE',
        'Structured',
        '', -- No format for structured
        'Discover',
        '',
        '',
        'Table',
        'PRODUCTION',
        'CUSTOMER_DATA',
        'ORDERS_TABLE',
        '', -- No column for structured
        '', -- No column name for structured
        TRUE,
        'PANCAKE_X_SMALL_01',
        150,
        8,
        10000,
        ''
    ) INTO :call_result;
    
    RETURN :call_result;
END;
```

### Return Values

The stored procedure returns a string indicating success or failure:

* Success: Returns success message
* Error: Returns error message with details
* Connection Failed: Returns connection error with privilege grant statements
* Duplicate Name: Returns error indicating duplicate data source name

### Bulk Data Source Creation

You can use SQL scripts to find and create data sources in bulk:

```sql
-- Example: Find all tables with VARIANT columns and generate add statements
SELECT 
    'CALL PANCAKE.core.add_datasource_with_scan(' ||
    '''' || table_catalog || '.' || table_schema || '.' || table_name || ''',' ||
    '''Semi-Structured'',' ||
    '''JSON'',' ||
    '''Discover'',' ||
    '''',' ||
    '''',' ||
    '''Table'',' ||
    '''' || table_catalog || ''',' ||
    '''' || table_schema || ''',' ||
    '''' || table_name || ''',' ||
    '''Variant'',' ||
    '''' || column_name || ''',' ||
    'TRUE,' ||
    '''PANCAKE_X_SMALL_01'',' ||
    '150,' ||
    '8,' ||
    '10000,' ||
    ''''');' AS add_statement
FROM information_schema.columns
WHERE data_type = 'VARIANT'
AND table_schema NOT LIKE 'PANCAKE%';
```

***

## Initial Quick Scan

When adding a data source, you can optionally perform an initial "quick scan" to discover the schema immediately.

### Quick Scan Configuration

Default Settings:

* Record Limit: 150 records
* Warehouse: PANCAKE\_X\_SMALL\_01 (or specified warehouse)
* Attribute Create Type: Discover (scans actual data)

### Quick Scan Benefits

* Immediate Schema Discovery — See schema structure right away
* Fast Onboarding — Quick validation of data source setup
* Cost Effective — Small record limit keeps costs low
* Baseline Setup — Establishes initial attribute metadata

### When to Skip Initial Scan

Skip the initial scan when:

* You have a schema sample and want to use Schema attribute creation type
* You want to configure materialization settings first
* You're creating data sources in bulk and will scan later
* You want to review configuration before scanning

### Full Scan During Creation

To perform a full scan when creating a data source:

* Set `SCAN_RECORD_LIMIT` to `0` (unlimited) or a number greater than total records
* Use a Medium or larger warehouse (e.g., `PANCAKE_MEDIUM_OPTIMIZED_01`)
* Ensure warehouse has sufficient resources for the data size

Note: Full scans during creation may take significant time and cost. Consider using quick scan first, then performing full scans via scan configurations.

***

***

## Troubleshooting

<details>

<summary>Connection Failed</summary>

* Verify privileges are granted correctly
* Check object exists and is accessible
* For shared databases, use `GRANT IMPORTED PRIVILEGES`
* Verify database and schema names are correct

</details>

<details>

<summary>Duplicate Name</summary>

* Choose a different, unique name
* Check existing data sources for similar names
* Use more specific naming with database/schema context

</details>

<details>

<summary>Invalid Format</summary>

* Verify format type matches actual data format
* Check column data type (VARIANT vs String)
* For String columns, ensure parsing expression is correct

</details>

<details>

<summary>Scan Failures</summary>

* Verify warehouse exists and is accessible
* Check warehouse size is appropriate for data volume
* Review scan error messages for specific issues
* Start with smaller record limits

</details>

***

## Summary

Methods:

* Application Interface (guided experience)
* SQL file (programmatic/bulk)

Requirements:

* Appropriate Snowflake privileges
* Valid source object
* Unique data source name

Initial Scan:

* Optional quick scan (150 records default)
* Can skip and scan later
* Can perform full scan on creation

**Note:** Start with quick scan (default 150 records), then configure and perform full scans via scan configurations.

For information on data source types, see [Data Source Types](/core-concepts/data-sources/data-source-types). For basic configuration, see [Basic Configuration Settings](/core-concepts/data-sources/basic-configuration-settings).


# Baseline Scan Settings

Performance calibration metrics for estimating scan duration and progress.

## Overview

Baseline Scan Settings store performance metrics from previous scans to estimate future scan duration and track progress. These settings are automatically populated after the first successful scan with at least 10,000 records using an X-Small warehouse (or specified warehouse), and are used by scan configurations to calculate estimated completion times and progress percentages.

***

## Base Records Processed Per Minute

The number of records processed per minute during the baseline scan.

### Purpose

* **Performance Metric** - Measures scanning throughput
* **Estimation** - Used to estimate future scan durations
* **Progress Tracking** - Calculates scan progress percentage
* **Calibration** - Baseline for performance comparisons

### How It's Set

**Automatic Population:**

* Set after first successful scan with 10,000+ records
* Calculated from actual scan performance
* Uses X-Small warehouse as baseline
* Stored in data source configuration

**Calculation:**

* Total records scanned / scan duration in minutes
* Example: 10,000 records in 2 minutes = 5,000 records/minute

### Usage

**Scan Estimation:**

* Used by scan configurations to estimate duration
* Formula: `estimated_minutes = record_limit / records_per_minute`
* Provides users with expected scan time

**Progress Tracking:**

* Calculates percentage complete during scans
* Formula: `progress = (records_processed / total_records) * 100`
* Updates in real-time during scan execution

***

## Base Thread Count

The number of threads used during the baseline scan.

### Purpose

* **Resource Metric** - Records compute resources used
* **Calibration** - Baseline for thread count comparisons
* **Estimation** - Used in performance calculations
* **Reference** - Helps configure future scans

### How It's Set

**Automatic Population:**

* Set after first successful scan with 10,000+ records
* Uses actual thread count from baseline scan
* Typically 8 threads for X-Small warehouse
* Stored in data source configuration

**Default Value:**

* Defaults to 8 threads if not set
* Can be manually adjusted if needed
* Should match warehouse thread capacity

### Usage

**Performance Reference:**

* Reference for configuring scan thread counts
* Helps determine optimal thread configuration
* Used in performance estimation calculations

***

## Setting Baseline Values

### Automatic Setting

**Requirements:**

* Scan with at least 10,000 records
* Use X-Small warehouse (or specified warehouse)
* Successful scan completion
* System automatically calculates and stores values

{% stepper %}
{% step %}

#### Perform a baseline scan

Perform a scan with 10,000+ records using the specified warehouse.
{% endstep %}

{% step %}

#### System calculates records per minute

The system computes records per minute from the scan duration and total records scanned.
{% endstep %}

{% step %}

#### System records thread count

The system records the actual thread count used during the baseline scan.
{% endstep %}

{% step %}

#### Values stored in data source configuration

Calculated values (records/minute and thread count) are saved to the data source configuration and become available for future scan estimations.
{% endstep %}
{% endstepper %}

### Manual Setting

**When to Manually Set:**

* Baseline values are inaccurate
* Performance has changed significantly
* Want to use different baseline
* Testing different configurations

**How to Set:**

* Edit data source configuration
* Enter values in Baseline Scan Settings
* Save data source
* Values used for future estimations

***

## Resetting Baseline Settings

### Reset to Zero

**Purpose:**

* Clear existing baseline values
* Force recalculation on next scan
* Reset to default values
* Start fresh baseline calibration

**When to Reset:**

* Baseline values are inaccurate
* Performance characteristics changed
* Warehouse configuration changed
* Want to recalibrate

**How to Reset:**

* Click "Reset Baseline Scan Settings" button
* Values set to 0
* Next scan with 10,000+ records will set new baseline
* System recalculates from new scan

### Default Values

**When Baseline is Zero:**

* System uses default values for estimation
* Default: 10,000 records/minute
* Default: 8 threads
* Estimates may be less accurate

**After Reset:**

* Next substantial scan sets new baseline
* System uses actual performance metrics
* More accurate estimations going forward

***

## Impact on Scan Configurations

### Estimation Accuracy

**With Baseline:**

* Estimates based on actual performance
* More accurate duration predictions
* Better progress tracking
* Calibrated to your data and warehouse

**Without Baseline:**

* Uses default values
* Less accurate estimations
* May over/under estimate duration
* Generic performance assumptions

### Progress Tracking

**With Baseline:**

* Real-time progress based on actual throughput
* Accurate percentage calculations
* Better user experience
* Reliable progress indicators

**Without Baseline:**

* Progress based on defaults
* May be less accurate
* Still functional but less precise

***

***

## Troubleshooting

<details>

<summary>Inaccurate Estimates — Symptoms &#x26; Solutions</summary>

**Symptoms:**

* Scan duration estimates are way off
* Progress tracking seems incorrect
* Baseline values seem wrong

**Solutions:**

* Reset baseline settings
* Perform new baseline scan
* Verify warehouse configuration
* Check data complexity hasn't changed

</details>

<details>

<summary>Missing Baseline — Symptoms &#x26; Solutions</summary>

**Symptoms:**

* Baseline values are 0
* Estimates use defaults
* Less accurate predictions

**Solutions:**

* Perform scan with 10,000+ records
* Let system set baseline automatically
* Verify scan completed successfully
* Check baseline values were set

</details>

<details>

<summary>Performance Changes — Symptoms &#x26; Solutions</summary>

**Symptoms:**

* Baseline no longer accurate
* Recent scans much faster/slower
* Estimates consistently wrong

**Solutions:**

* Reset baseline settings
* Perform new baseline scan
* Review warehouse configuration
* Check for data structure changes

</details>

***

## Summary

**Core Settings:**

* Base Records Processed Per Minute (auto-set or manual)
* Base Thread Count (auto-set or manual)

**Automatic Setting:**

* Set after scan with 10,000+ records
* Uses actual scan performance
* Calibrated to your data and warehouse

**Usage:**

* Scan duration estimation
* Progress tracking
* Performance reference

**Note:** Let system set baseline automatically after first substantial scan (10,000+ records). Reset only when baseline is clearly inaccurate.

For scan configuration, see [Scan Configurations documentation](/core-concepts/scan-configurations). For data source overview, see [Overview](/core-concepts/data-sources).


# Basic Configuration Settings

Core settings for data source identification, status, and metadata.

## Overview

Basic configuration settings define the fundamental properties of a data source: its name, type, operational status, and organizational tags. These settings are required for all data sources and determine how the data source appears and functions within DataPancake.

***

## Data Source Name

A unique, descriptive identifier for the data source within your DataPancake instance.

### Requirements

* Required Field — Must be provided to save the data source
* Unique — Cannot duplicate an existing data source name (case-insensitive)
* Descriptive — Should clearly identify the data source's purpose and content

**Examples:**

* `PRODUCTION.MEDICAL_DEVICE.UDI_JSON`
* `ANALYTICS.CUSTOMER_EVENTS`
* `STAGING.API_RESPONSES_JSON`
* `WAREHOUSE.ORDERS_TABLE`

**Validation:**

* Checks for uniqueness (case-insensitive comparison)
* Returns error if duplicate name exists
* Name cannot be empty or whitespace only

***

## Data Source Type

Classification of the data source as either Semi-Structured or Structured.

### Options

Semi-Structured (Recommended for JSON/VARIANT data)

* For data stored in VARIANT columns
* Enables full schema discovery and materialization
* Supports nested objects and arrays
* Requires format type and column specification
* Enables dynamic table generation

Structured

* For standard relational database objects
* Basic schema discovery only
* No materialization features
* No format or column specification needed
* Limited to flat relational structures

### Selection Impact

The data source type determines:

* Available Configuration Options — Semi-structured sources have more settings
* Materialization Capabilities — Only semi-structured sources can generate dynamic tables
* Schema Discovery Depth — Semi-structured sources discover nested structures
* Required Fields — Semi-structured requires format type and column name

Best Practice: Choose Semi-Structured for VARIANT column data to enable full DataPancake capabilities.

For detailed information on data source types, see [Data Source Types](broken://pages/3a32caa968b71644f58268e6aebb34e7ba155ae3).

***

## Status

Operational state of the data source within DataPancake.

### Options

Active (Default)

* Data source is operational and available for scanning
* Appears in data source lists and dropdowns
* Can be used in scan configurations
* Scans can be executed against this data source
* Use for all production and active development data sources

Inactive

* Data source is preserved but not available for scanning
* Hidden from most data source selection lists
* Configuration is retained for future use
* Useful for temporarily disabling data sources
* Can be reactivated by changing status back to Active

Deleted

* Data source is marked for deletion
* Configuration may be retained for audit purposes
* Typically hidden from user interfaces
* Use when data source is no longer needed
* May be permanently removed in future cleanup operations

**Impact on Operations:**

* Only Active data sources appear in scan configuration dropdowns
* Only Active data sources can be scanned
* Inactive/Deleted data sources retain their configuration and scan history
* Status changes are logged for audit purposes

***

## Data Source Tags

Optional metadata tags for organizing and categorizing data sources.

### Purpose

Tags provide flexible organization and filtering capabilities:

* Categorization — Group related data sources
* Environment Identification — Tag as PROD, DEV, TEST, etc.
* Department/Team — Identify data source ownership
* Data Classification — Mark sensitive or public data
* Custom Organization — Any organizational scheme

### Usage

* Optional Field — Not required to save data source
* Free Text — Any text value accepted
* No Validation — System does not enforce tag format
* Search/Filter — Can be used for filtering in views and reports

**Examples:**

* `PROD, CUSTOMER_DATA, PII`
* `DEV; TEST_DATA; API_RESPONSES`
* `ANALYTICS_TEAM, PUBLIC, EVENTS`

***

## Connection Status

Read-only indicator showing whether DataPancake can successfully connect to the source object.

### Status Values

Connected

* DataPancake has successfully validated connection to source object
* Required privileges are granted
* Data source is ready for scanning
* Connection validated on save or periodic checks

Connection Failed

* DataPancake cannot access the source object
* Missing required privileges
* Object may not exist or be inaccessible
* Error message provides specific failure reason

### Connection Validation

Connection status is validated when:

* Data source is first created
* Data source settings are saved
* Periodic background validation (if enabled)

<details>

<summary>Troubleshooting Connection Failures</summary>

When connection fails, the system provides specific error messages and SQL statements to resolve privilege issues.

For Standard Databases:

```sql
GRANT USAGE ON DATABASE <database_name> TO APPLICATION PANCAKE;
GRANT USAGE ON SCHEMA <database_name>.<schema_name> TO APPLICATION PANCAKE;
GRANT REFERENCES, SELECT ON <object_type> <database_name>.<schema_name>.<object_name> TO APPLICATION PANCAKE;
```

For Shared Databases:

```sql
GRANT USAGE ON DATABASE <database_name> TO APPLICATION PANCAKE;
GRANT USAGE ON SCHEMA <database_name>.<schema_name> TO APPLICATION PANCAKE;
GRANT IMPORTED PRIVILEGES ON DATABASE <database_name> TO APPLICATION PANCAKE;
```

Common Issues:

* Missing USAGE privilege on database or schema
* Missing SELECT privilege on object
* Object does not exist or was renamed
* Object is in a shared database requiring IMPORTED PRIVILEGES

For detailed information on privileges, see [Adding Data Sources](broken://pages/6c9e24784a258c34149469b6ee344df363a19923).

</details>

***

## Field Requirements Summary

### Required Fields

All data sources require:

* Data Source Name — Unique identifier
* Data Source Type — Semi-Structured or Structured
* Status — Active, Inactive, or Deleted
* Object Type — Table, View, External Table, etc.
* Database — Source database name
* Schema — Source schema name
* Object Name — Source object name

### Additional Required for Semi-Structured

* Format Type — JSON, Avro, Parquet, ORC, or XML
* Column Data Type — VARIANT or String
* Column Name — Name of VARIANT/String column

### Optional Fields

* Data Source Tags — Organizational metadata
* Schema Sample — Sample JSON/XML for faster discovery (semi-structured)

***

For information on adding data sources, see [Adding Data Sources](/core-concepts/data-sources/adding-data-sources). For product tier configuration, see [Product Tiers & Features](/core-concepts/data-sources/product-tiers-and-features).


# Data Source Types

Classification and format configuration for data sources in DataPancake.

## Overview

DataPancake supports two primary data source types: **Semi-Structured** and **Structured**. The data source type determines what configuration options are available, how data is processed, and what materialization capabilities can be used. Semi-structured data sources require additional format and column type specifications, while structured data sources connect directly to relational database objects.

***

## Semi-Structured Data Sources

Semi-structured data sources connect to Snowflake objects containing JSON, Avro, Parquet, ORC, or XML data stored in VARIANT or String columns. These data sources enable DataPancake's full schema discovery and materialization capabilities.

### Supported Object Types

Semi-structured data sources can be created from:

* **Dynamic Tables** - Snowflake dynamic tables containing VARIANT columns only
* **External Tables** - External tables pointing to cloud storage (S3, Azure Blob, etc.). JSON format only.
* **Iceberg Tables** - Iceberg tables with VARIANT or STRING columns. JSON format only. STRING type is primarily for Iceberg use cases and supports JSON only (not XML).
* **Materialized Views** - Materialized views containing VARIANT columns
* **Tables** - Standard Snowflake tables with VARIANT columns
* **Views** - Views that expose VARIANT columns

### Format Types

* **JSON**
* **Avro**
* **Parquet**
* **ORC**
* **XML**

### Column Data Types

* **VARIANT** - Native Snowflake semi-structured data type
* **String** - Text column containing JSON strings. For Iceberg tables, STRING type supports JSON only (not XML).

***

## Structured Data Sources

Structured data sources connect to standard relational database objects (tables, views, materialized views) without requiring format or column type specifications. These data sources provide basic schema discovery capabilities.

### Supported Object Types

* **Materialized Views** - Materialized views
* **Tables** - Standard Snowflake tables
* **Views** - Standard views

### Limitations

Structured data sources only support:

* **Data Dictionary Builder**
* **Semantic Model Generator**

These are the only two supported features for structured data sources.

***

For information on adding data sources, see [Adding Data Sources](broken://pages/6c9e24784a258c34149469b6ee344df363a19923). For source object configuration, see [Source Object Settings](broken://pages/60884f750752dbb870333b2321e5c820a4665a9d).


# Dynamic Table Settings

Configuration for Snowflake Dynamic Tables generated from semi-structured data sources.

## Overview

Dynamic Table Settings configure the refresh behavior, warehouse assignment, and optional parameters for Dynamic Tables generated by DataPancake.

**Feature Requirements:**

* Table Type must be set to "Dynamic Table"
* SQL Code Generation feature must be enabled

***

## Dynamic Table Warehouse Name

The Snowflake warehouse assigned to the Dynamic Table for refresh operations.

**Purpose:**

* Warehouse used to execute Dynamic Table refreshes
* Determines compute resources for refresh
* Warehouse size affects refresh cost and performance

**Requirements:**

* Required for Dynamic Table type
* Warehouse must exist before code generation
* User must have USAGE privilege on warehouse

**Note:** This is the warehouse assigned to the Dynamic Table (in the CREATE DYNAMIC TABLE statement), not the warehouse used to execute the CREATE statement.

***

## Target Lag Configuration

The maximum acceptable delay between source data changes and Dynamic Table updates.

**Target Lag Unit Type:**

* seconds — For near-real-time updates
* minutes — For frequent updates (most common)
* hours — For periodic updates
* days — For daily or less frequent updates

**Target Lag Quantity:**

* Number of time units for target lag (must be greater than 0)
* Combined with unit type defines refresh schedule

**Examples:**

* `1 minute` — Updates within 1 minute of source changes
* `5 minutes` — Updates within 5 minutes
* `1 hour` — Updates within 1 hour
* `1 day` — Daily updates

**How Target Lag Works:**

* Snowflake automatically refreshes Dynamic Table when target lag is exceeded
* Refresh frequency depends on source data change rate
* More frequent changes trigger more frequent refreshes

***

## Optional Parameters

Additional parameters included in the CREATE DYNAMIC TABLE statement.

**Root Dynamic Table Optional Parameters:**

* Parameters for the root-level Dynamic Table
* Included directly in CREATE DYNAMIC TABLE statement

**Nested Dynamic Table Optional Parameters:**

* Parameters for nested Dynamic Tables created from array attributes
* Applied to all nested/flattened Dynamic Tables

**Common Parameters:**

* `REFRESH_MODE=INCREMENTAL` — Only refresh changed data (default, recommended)
* `REFRESH_MODE=FULL` — Refresh all data each time

**Parameter Format:**

* Key-value pairs separated by commas
* Format: `KEY1=VALUE1, KEY2=VALUE2`
* Example: `REFRESH_MODE=INCREMENTAL, INITIALIZE=ON_CREATE`

**Documentation:**

* See [Snowflake Dynamic Table documentation](https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table) for all available parameters

***

## Metadata Table Configuration

Optional configuration for creating metadata tables to track Dynamic Table changes.

**Create Metadata for Dynamic Table Inserts:**

* Toggle: Creates a metadata table tracking inserts to root Dynamic Table
* Stores primary key, UUID, created timestamp, last updated timestamp
* Enables change tracking and auditing
* Metadata table and sync task created automatically when enabled

**Create Metadata for Dynamic Table Updates:**

* Toggle: Extends metadata tracking to include updates
* Tracks when rows are updated in Dynamic Table
* Requires Create Metadata for Inserts to be enabled

**Create Metadata for Dynamic Table Deletes:**

* Toggle: Extends metadata tracking to include deletes
* Tracks when rows are deleted from Dynamic Table
* Requires Create Metadata for Inserts to be enabled

### Metadata Table Task Configuration

**Required when metadata tracking enabled:**

* Metadata Table Task Warehouse Name - Warehouse for executing metadata sync task (can be different from Dynamic Table warehouse)
* Metadata Table Task Cron Schedule - Cron expression for scheduling metadata updates
* Metadata Table Task Schedule Time Zone - Timezone for cron schedule

**Optional:**

* Task Deployment Database - Database where metadata sync task will be deployed (defaults to Dynamic Table deployment database)
* Task Deployment Schema - Schema where metadata sync task will be deployed

**Cron Schedule Examples:**

* `30 * * * *` — Hourly at 30 minutes past hour
* `0 3 * * *` — Daily at 3:00 AM
* `0 3 * * MON` — Weekly on Monday at 3:00 AM
* `0 3 1 * *` — Monthly on 1st at 3:00 AM

**Available Timezones:**

* `America/Los_Angeles`, `America/New_York`, `America/Chicago`, `America/Denver`, `Etc/UTC` (recommended), and others

**Use Cases:**

* Change tracking and audit trails
* Data quality monitoring and lineage
* Integration with downstream systems for change detection

***

## Configuration Requirements

**Required Settings for Dynamic Tables:**

* Dynamic Table Warehouse Name
* Dynamic Table Target Lag Unit Type
* Dynamic Table Target Lag Quantity

**Required Settings for Metadata Tables (if enabled):**

* Metadata Table Task Warehouse Name
* Metadata Table Task Cron Schedule
* Metadata Table Task Schedule Time Zone

**Optional Settings for Metadata Tables:**

* Task Deployment Database (defaults to Dynamic Table deployment database)
* Task Deployment Schema

**Validation:** The system validates warehouse exists and is accessible, target lag quantity is greater than 0, cron schedule is valid format, timezone is valid, and all required fields are provided when metadata enabled.

***

***

## Summary

**Core Settings (required):**

* Warehouse Name
* Target Lag Unit Type
* Target Lag Quantity

**Optional Parameters:**

* Root Dynamic Table parameters
* Nested Dynamic Table parameters

**Metadata Configuration (optional):**

* Enable metadata tracking (Create Metadata for Inserts/Updates/Deletes)
* Configure metadata task (warehouse, cron schedule, timezone)

For materialization settings, see [Materialization Settings](/core-concepts/data-sources/materialization-settings). For secure view configuration, see [Secure View Settings](/core-concepts/data-sources/secure-view-settings).


# Materialization Settings

Configuration for generating materialized objects (Dynamic Tables or Tables) from semi-structured data sources.

## Overview

Materialization Settings configure how DataPancake generates SQL code to create materialized objects from your semi-structured data. These settings control the output object type, naming, deployment location, case sensitivity, and stream metadata inclusion.

**Feature Requirements:**

* Semi-structured data sources only
* SQL Code Generation feature must be enabled

***

## Table Type

The type of materialized object to generate.

**Options:**

* **Dynamic Table** (Recommended) - Automatically refreshed based on target lag, requires Dynamic Table Settings configuration
* **Table** - Static tables requiring manual refresh, simpler configuration

**Selection:**

* Use Dynamic Table for continuously updated data requiring automatic refresh
* Use Table for static or rarely updated data requiring manual control

***

## Root Table Name

The base name used for all generated materialized objects.

**Purpose:**

* Name for the root-level materialized object
* Prefix for all nested array objects (system automatically adds underscores for nested objects)

**Requirements:**

* Required when SQL Code Generation is enabled
* Should be unique within deployment database/schema
* Must be valid Snowflake identifier

**Naming Pattern:**

* Root Object: Uses the exact name provided (e.g., `CUSTOMER_EVENTS`)
* Nested Array Objects: Uses prefix with underscore and array attribute name (e.g., `CUSTOMER_EVENTS_ITEMS` for items array)

***

## Deployment Location

The database and schema where materialized objects will be created.

**Table Deployment Database:**

* Optional field (if empty, uses source database)
* Should exist before code generation

**Table Deployment Schema:**

* Optional field (if empty, uses source schema)
* Should exist before code generation

**Note:** If deployment database/schema are not specified, objects are created in the same database/schema as the source object.

***

## Case Sensitivity

Controls whether object names preserve case and allow special characters.

**Toggle:** Use Case Sensitivity

**When Enabled:**

* All output object names enclosed in double quotes
* Preserves exact case of names
* Allows special characters in names
* Example: `"CustomerEvents"`, `"customer_events"`

**When Disabled:**

* Object names not quoted
* Snowflake converts to uppercase
* No special characters allowed
* Example: `CUSTOMER_EVENTS` (always uppercase)

***

## Include Stream Message Metadata

Controls whether streaming platform message metadata is included in the root dynamic table.

**When Enabled:**

* Includes metadata fields: `message_key`, `message_offset`, `message_timestamp`, and platform-specific metadata fields
* Useful for tracking message order, deduplication, and auditing

**When Disabled:**

* No message metadata included
* Only data payload attributes in dynamic table

**Requirements:**

* Source Platform/Application must be configured (Kafka, DynamoDB, etc.)
* Only applies to streaming platform data sources
* Metadata fields automatically added to root table

For information on deduplication, see [Source Object Settings](/core-concepts/data-sources/source-object-settings).

***

## Configuration Requirements

**Minimum Requirements (when SQL Code Generation enabled):**

* Table Type (Dynamic Table or Table)
* Root Table Name

**For Dynamic Tables (additionally required):**

* Dynamic Table Warehouse Name
* Dynamic Table Target Lag Unit Type
* Dynamic Table Target Lag Quantity

**For Metadata Tables (if enabled):**

* Metadata Table Task Warehouse Name
* Metadata Table Task Cron Schedule
* Metadata Table Task Schedule Time Zone

**Optional Settings:**

* Table Deployment Database (defaults to source database)
* Table Deployment Schema (defaults to source schema)
* Case Sensitivity (defaults to disabled)
* Include Stream Message Metadata (defaults to disabled)

***

***

## Summary

**Core Settings:**

* Table Type (Dynamic Table or Table)
* Root Table Name (required)
* Deployment Location (optional, defaults to source location)

**Advanced Settings:**

* Case Sensitivity (optional, defaults to disabled)
* Include Stream Message Metadata (optional, streaming only, defaults to disabled)

**Requirements:**

* SQL Code Generation feature must be enabled (semi-structured only)
* Additional Dynamic Table settings required for Dynamic Tables

For detailed Dynamic Table configuration, see [Dynamic Table Settings](/core-concepts/data-sources/dynamic-table-settings). For secure view configuration, see [Secure View Settings](/core-concepts/data-sources/secure-view-settings).


# Product Tiers & Features

Feature enablement and product tier configuration for data sources.

## Overview

DataPancake offers multiple product tiers that enable different capabilities for each data source. Schema Discovery is always available at no cost, while other features can be enabled per data source. Features have dependencies—some features automatically enable others.

***

## Schema Discovery (Always Enabled)

**Status:** Always enabled, no cost (cannot be disabled)

**Capabilities:**

* Schema Summary - Overview of discovered attributes and data types
* Data Source Overview - Summary information on the Data Source Overview screen
* Basic Attribute Discovery - Identification of attributes and their types
* Scan History - Record of scans performed on the data source

**Limitations:**

* No detailed attribute metadata management
* No SQL code generation
* No materialization capabilities
* No advanced features

***

## Pipeline Designer

**Status:** Paid feature, can be enabled per data source

**Dependencies:** None (but required for other features)

**Capabilities:**

* Attribute Metadata Management - Detailed attribute information and configuration
* Polymorphic Version Tracking - Management of multiple data type versions for attributes
* Attribute Relationships - Configuration of relationships between attributes
* Schema Evolution Monitoring - Tracking changes in data structure over time

**Auto-Enabled With:**

* SQL Code Generation
* Data Dictionary Builder
* Semantic Model Generator
* Security Policy Integration

***

## SQL Code Generation

**Status:** Paid feature, can be enabled per data source (semi-structured only)

**Dependencies:** Pipeline Designer (auto-enabled)

**Capabilities:**

* Dynamic Table Generation - Generate CREATE DYNAMIC TABLE statements
* Table Generation - Generate CREATE TABLE statements
* Nested Array Flattening - Automatic handling of nested arrays
* Materialization Code - Complete SQL code for materialized objects
* Code Customization - Configure output object names, deployment locations, and settings

**Auto-Enabled With:**

* Semantic Model Generator
* Security Policy Integration

**Configuration Requirements:** When SQL Code Generation is enabled, you must configure:

* Materialization Settings - Output object type, root table name, deployment location
* Dynamic Table Settings - Warehouse, target lag, optional parameters (if using Dynamic Tables)
* Source Object Settings - Complete source object configuration

**For detailed information on materialization, see** [**Materialization Settings**](/core-concepts/data-sources/materialization-settings)**.**

***

## Data Dictionary Builder

**Status:** Paid feature, can be enabled per data source

**Dependencies:** Pipeline Designer (auto-enabled)

**Capabilities:**

* Data Dictionary Management - Create and maintain data dictionaries
* Attribute Documentation - Document attributes with descriptions and metadata
* Schema Documentation - Comprehensive schema documentation
* Metadata Management - Rich metadata for attributes and data sources

***

## Security Policy Integration

**Status:** Paid feature, can be enabled per data source

**Dependencies:** Pipeline Designer, SQL Code Generation (both auto-enabled)

**Capabilities:**

* Row Access Policy Integration - Include row-level security in generated code
* Column Masking Policy Integration - Include column masking in generated code
* Secure View Generation - Generate secure views with security policies
* Policy Configuration - Configure which attributes use which security policies

**For detailed information on secure views, see** [**Secure View Settings**](/core-concepts/data-sources/secure-view-settings)**.**

***

## Semantic Model Generator

**Status:** Paid feature, can be enabled per data source

**Dependencies:** Pipeline Designer, SQL Code Generation, Data Dictionary Builder (all auto-enabled)

**Capabilities:**

* Semantic Layer Generation - Create views or materialized views for semantic layer
* Cortex Analyst Integration - Generate semantic models for Cortex Analyst
* Relationship Configuration - Define relationships for semantic models
* Query Generation - Generate verified queries for semantic models

**Configuration Requirements:** When Semantic Model Generator is enabled, you can configure:

* View Type - View or Materialized View
* Root View Name - Name for the root semantic layer view
* Deployment Location - Database and schema for semantic layer objects
* Row Access Policy - Security policy for semantic layer views

**For detailed information on secure views, see** [**Secure View Settings**](/core-concepts/data-sources/secure-view-settings)**.**

***

## Feature Enablement

**Enabling Features:** Features are enabled per data source through the Data Source management interface:

1. Navigate to the Data Source management page
2. Select or create a data source
3. Click the "Enable Feature Selection" button
4. Check the boxes for desired features
5. Save the data source

**Feature Dependencies:** The system automatically handles feature dependencies:

* Enabling SQL Code Generation automatically enables Pipeline Designer
* Enabling Semantic Model Generator automatically enables Pipeline Designer, SQL Code Generation, and Data Dictionary Builder
* Enabling Security Policy Integration automatically enables Pipeline Designer and SQL Code Generation

**Feature Status:**

* **Active** - Feature is enabled and available
* **Inactive** - Feature is disabled (default for paid features)

**Billing:** For organizations using billing events (Public Marketplace listing), each enabled feature generates billing events based on the number of attributes in the data source. Schema Discovery is always free. For subscription listings, features are available based on your subscription tier.

***

## Feature Combinations

**Basic Materialization:**

* Pipeline Designer (auto-enabled)
* SQL Code Generation

**Complete Solution:**

* Pipeline Designer (auto-enabled)
* SQL Code Generation
* Data Dictionary Builder
* Security Policy Integration
* Semantic Model Generator

**Documentation Only:**

* Pipeline Designer
* Data Dictionary Builder

***

## Feature Management

**Viewing Enabled Features:** Enabled features are displayed in the Data Source management interface with checkboxes indicating their status.

**Changing Features:** Features can be enabled or disabled at any time:

1. Edit the data source
2. Click "Enable Feature Selection"
3. Check or uncheck features as needed
4. Save changes

**Note:** Disabling a feature may affect dependent features. The system will warn you if disabling a feature will also disable dependent features.

**Feature Impact:**

* **Enabling Features:** May require additional configuration (e.g., SQL Code Generation requires materialization settings), may enable dependent features automatically, may generate billing events (for billing event organizations)
* **Disabling Features:** May disable dependent features, may remove generated code or configurations, does not delete scan history or discovered attributes

***

## Summary

**Free Tier:**

* Schema Discovery (always enabled)

**Paid Features:**

* Pipeline Designer (foundation feature, auto-enabled with others)
* SQL Code Generation (materialization, semi-structured only)
* Data Dictionary Builder (documentation)
* Security Policy Integration (security)
* Semantic Model Generator (semantic layer)

**Dependencies:**

* Most features require Pipeline Designer (auto-enabled)
* Advanced features require SQL Code Generation (auto-enabled)
* Semantic Model Generator requires multiple features (all auto-enabled)

**For information on basic configuration, see** [**Basic Configuration Settings**](/core-concepts/data-sources/basic-configuration-settings)**. For materialization configuration, see** [**Materialization Settings**](/core-concepts/data-sources/materialization-settings)**.**


# Schema Filters

Configuration for excluding parts of the schema from code generation and attribute discovery.

## Overview

Schema Filters allow you to exclude specific attributes or attribute patterns from the code generation process using regular expressions. Filtered attributes are discovered during scanning but marked as `inactive`, preventing them from being included in generated SQL code. Filters can be reactivated at any time by removing the filter or changing attribute status.

***

## Filter Configuration

### Filter Name

**Purpose:** Descriptive name for the filter (required field for all filters).

### Filter Regular Expression

**Purpose:** Regular expression pattern matching attribute paths to exclude (required field for all filters).

**Pattern Matching:**

* Matches against complete attribute paths (e.g., `customer.metadata.debug`)
* Uses standard regular expression syntax
* Case-sensitive by default
* Can match partial paths or full paths

**Examples:**

* `^customer\.internal_id$` - Excludes `customer.internal_id` only
* `^metadata\..*` - Excludes all `metadata.*` attributes
* `.*\.debug$` - Excludes any attribute ending with `.debug`
* `.*_temp$` - Excludes attributes ending with `_temp`
* `^temp\..*` - Excludes all attributes under `temp.*`
* `.*\[0\]\.internal.*` - Excludes internal attributes in first array element

**Note:** Use multiple filters for different patterns—each filter can target different attribute groups.

***

## How Filters Work

### During Scanning

* Filters do not prevent attribute discovery—all attributes are still discovered during scanning
* Attributes matching filter patterns are marked as `inactive`
* Attributes not matching filters remain `active` (or keep existing status)
* Status can be changed manually after scanning

### During Code Generation

* Only `active` attributes included in generated SQL
* `inactive` attributes excluded from code generation
* Filtered attributes not in Dynamic Tables, semantic layer views, or generated SQL code

### Reactivation

**Removing Filters:**

* Delete filter from configuration
* Run scan to update attribute statuses
* Previously filtered attributes become active

**Manual Reactivation:**

* Change attribute status to `active` in Attributes management
* Attribute included in future code generation
* No need to remove filter if manually reactivated

***

## Filter Use Cases

**Exclude Internal Fields:**

* `^.*\._internal.*$` - Exclude internal fields
* `^metadata\..*` - Exclude metadata fields
* `.*\.system_.*` - Exclude system fields

**Exclude Debug/Temporary Fields:**

* `.*_debug$` - Exclude debug fields
* `.*_temp$` - Exclude temporary fields
* `^temp\..*` - Exclude temp namespace

**Exclude Sensitive Data:**

* `.*password.*` - Exclude password fields
* `.*ssn.*` - Exclude SSN fields
* `.*pii\..*` - Exclude PII namespace

**Exclude Large/Unused Attributes:**

* `.*\.binary_data$` - Exclude binary data
* `.*\.large_text$` - Exclude large text fields
* `^unused\..*` - Exclude unused namespace

**Exclude Specific Paths:**

* `^customer\.address\.coordinates$` - Exclude specific nested attribute
* `.*\[.*\]\.internal.*` - Exclude internal fields in arrays
* `^root\.metadata\..*` - Exclude metadata under root

***

## Managing Filters

**Adding Filters:**

* Navigate to data source management
* Scroll to Schema Filters section
* Click `+` symbol to add new row
* Enter Filter Name (required)
* Enter Filter Regular Expression (required)
* Click "Save Schema Filters"

**Editing Filters:**

* Find filter in grid
* Edit Filter Name or Regular Expression directly
* Changes saved when "Save Schema Filters" clicked
* System validates regular expression syntax

**Deleting Filters:**

* Move mouse to leftmost column
* Checkbox appears for row selection
* Check box for filter to delete
* Press Delete key
* Click "Save Schema Filters" to confirm deletion

**Filter Validation:**

* System validates regex syntax on save
* Invalid regex patterns cause save to fail
* Error message indicates regex issue

***

## Filter vs. Transformation

**When to Use Filters:**

* You want to exclude attributes completely
* Attributes are not needed in materialized objects
* You want to reduce object complexity
* Attributes should remain in source only

**When to Use Transformations:**

* You want to modify attribute names
* You need to change data types
* You want to restructure schema
* You need to normalize data

**Order of Application:**

1. Transformations applied first (consolidation, type changes)
2. Filters applied after transformations
3. Final schema used for code generation

***

## Summary

**Core Configuration:**

* Filter Name (required)
* Filter Regular Expression (required)

**Functionality:**

* Excludes attributes from code generation
* Marks matching attributes as inactive
* Can be reactivated by removing filter or changing attribute status

**Use Cases:**

* Exclude internal/debug fields
* Remove sensitive data
* Optimize object size
* Fine-grained attribute control

**Important:** Filters are applied after transformations. Order matters when combining filters and transformations.

For schema transformations, see [Schema Transformations](/core-concepts/data-sources/schema-transformations). For attribute management, see the Attributes documentation.


# Schema Transformations

Configuration for transforming source schema during materialization process.

## Overview

Schema Transformations (also called Schema Consolidations) allow you to modify the source schema during the materialization process. Transformations are applied during scanning and code generation, affecting how attributes are discovered and how SQL code is generated.

***

## Transformation Types

The type of transformation to apply to the schema.

### Consolidate Schema

**Purpose:** Consolidate multiple attribute name variations into a single name using regular expressions.

**Configuration:**

* **Search Expression** - Regular expression to find attribute names
* **Replace Expression** - Replacement pattern for matched names
* **Attribute Path Search** - Optional path filter to limit transformation scope

### Convert Object to Array

**Purpose:** Convert object attributes to array attributes (transform single objects into arrays of objects).

**Configuration:**

* **Source Data Type** - `object` (required)
* **Transform Data Type** - `array` (result)
* **Attribute Path Search** - Path to object attribute to transform

### Transform Objects to Array

**Purpose:** Transform multiple object attributes into a single array (consolidate related objects into array structure).

**Configuration:**

* **Source Data Type** - `object`
* **Transform Data Type** - `array`
* **Attribute Path Search** - Path pattern to match objects

### Transform String to Array

**Purpose:** Convert string attributes containing delimited values into arrays.

**Configuration:**

* **Source Data Type** - `str` (required)
* **Transform Data Type** - `array` (result)
* **String List Type** - Parsing method (primitive, key\_value, fixed\_width)
* Additional parameters based on String List Type

***

## String List Types

When transforming strings to arrays, specify how the string should be parsed.

### Primitive

**Purpose:** Simple delimited list of primitive values.

**Configuration:**

* **Delimiter Value** - Character(s) separating values (e.g., `,`, `|`, `;`)

**Example:**

* Input: `"apple,banana,cherry"`, Delimiter: `,`, Output: `["apple", "banana", "cherry"]`

### Key Value

**Purpose:** String containing key-value pairs parsed into array of objects.

**Configuration:**

* **Key Value Separator** - Separator between key and value (e.g., `=`, `:`)
* **Delimiter Value** - Separator between pairs (e.g., `,`, `;`)

**Example:**

* Input: `"name=John,age=30,city=NYC"`, Key Value Separator: `=`, Delimiter: `,`, Output: `[{"name": "John"}, {"age": "30"}, {"city": "NYC"}]`

### Fixed Width

**Purpose:** String with fixed-width fields parsed based on character positions.

**Configuration:**

* **Field Widths** - Comma-separated list of field widths (e.g., `10,5,15`)

**Example:**

* Input: `"John 30NYC "`, Field Widths: `10,5,15`, Output: Parsed into array based on positions

***

## Regular Expression Patterns

Regular expressions are used for schema consolidation and attribute path filtering.

### Search Expression

**Purpose:** Regular expression pattern to match attribute names (used in Consolidate Schema transformations).

**Examples:**

* `^customer_?id$` - Matches `customer_id`, `customerid`
* `.*[Tt]imestamp.*` - Matches any attribute with "timestamp" or "Timestamp"
* `^[a-z]+_[a-z]+$` - Matches snake\_case attributes

### Replace Expression

**Purpose:** Replacement pattern for matched attribute names (used with Search Expression in Consolidate Schema).

**Examples:**

* Search: `^customer_?id$`, Replace: `customer_id`
* Search: `.*[Tt]imestamp.*`, Replace: `timestamp`
* Search: `(.*)_(.*)`, Replace: `$1_$2` (standardize format)

### Attribute Path Search

**Purpose:** Optional path filter to limit transformation scope (applies transformation only to matching attribute paths).

**Examples:**

* `customer.*` - Apply to all customer.\* attributes
* `.*\.items\[.*\]` - Apply to items array elements
* `root\.metadata\..*` - Apply to metadata.\* attributes

***

## Transformation Configuration

### Consolidation Name

**Purpose:** Descriptive name for the transformation (required field for all transformations).

### Source Data Type

**Purpose:** Original data type before transformation (required for type transformations).

**Options:** `str`, `int`, `float`, `bool`, `object`, `array`

**Usage:**

* Required for Convert Object to Array
* Required for Transform Objects to Array
* Required for Transform String to Array

### Transform Data Type

**Purpose:** Target data type after transformation (required for type transformations).

**Options:** `str`, `int`, `float`, `bool`, `object`, `array`

**Usage:** Specifies result type for transformations (must be compatible with transformation type).

### Additional Parameters

**Wrapper Value:** Characters wrapping values in strings (used for string parsing).

**Delimiter Value:** Character(s) separating values (used in Primitive and Key Value string parsing). Common: `,`, `|`, `;`, `\t`

**Key Value Separator:** Separator between keys and values (used in Key Value string parsing). Common: `=`, `:`, `->`

**Field Widths:** Comma-separated list of field widths (used in Fixed Width string parsing). Example: `10,5,15` for three fields

***

## Managing Transformations

**Adding Transformations:**

* Navigate to data source management
* Scroll to Schema Transformation section
* Click `+` symbol to add new row
* Configure transformation settings
* Click "Save Schema Transformations"

**Editing Transformations:**

* Find transformation in grid
* Edit fields directly in grid
* Changes are saved when "Save Schema Transformations" clicked
* System validates changes before saving

**Deleting Transformations:**

* Move mouse to leftmost column
* Checkbox appears for row selection
* Check box for transformation to delete
* Press Delete key
* Click "Save Schema Transformations" to confirm

{% hint style="warning" %}
Important: Transformations are applied in the order they appear in the grid. Order matters when multiple transformations affect the same attributes.
{% endhint %}

***

## Summary

**Transformation Types:**

* Consolidate Schema (name consolidation)
* Convert Object to Array
* Transform Objects to Array
* Transform String to Array

**String List Types:**

* Primitive (simple delimited)
* Key Value (key-value pairs)
* Fixed Width (position-based)

**Configuration:**

* Regular expression patterns
* Data type specifications
* Parsing parameters
* Attribute path filters

**Important:** Transformations are applied in the order they appear in the grid. Order matters when multiple transformations affect the same attributes.

For schema filtering, see [Schema Filters](/core-concepts/data-sources/schema-filters). For source object configuration, see [Source Object Settings](/core-concepts/data-sources/source-object-settings).


# Secure View Settings

Configuration for generating secure views (secure view layer) from materialized Dynamic Tables.

## Overview

Secure View Settings configure the generation of secure views or materialized views that provide a secure view layer on top of materialized Dynamic Tables. These views can incorporate Row Access Policies for security and are used for secure view layer access and Cortex Analyst integration.

**Feature Requirements:**

* Semantic Model Generator feature must be enabled (automatically enables Pipeline Designer, SQL Code Generation, and Data Dictionary Builder)
* SQL Code Generation automatically enabled with Semantic Model Generator

## View Type

The type of view object to generate for the secure view layer.

**Options:**

* **View** (Recommended) - Standard Snowflake views (virtual objects, no storage, always reflect current Dynamic Table data)
* **Materialized View** - Pre-computed views stored as tables (faster query performance, requires refresh, additional storage cost)

## Root View Name

The base name for the root-level secure view.

**Purpose:**

* Name for the root-level view
* Prefix for all nested array views (system automatically adds underscores for nested views)

**Requirements:**

* Required when View Type is selected
* Should be unique within deployment database/schema
* Must be valid Snowflake identifier

**Naming Pattern:**

* Root View: Uses the exact name provided (e.g., `CUSTOMER_EVENTS_VIEW`)
* Nested Array Views: Uses prefix with underscore and array attribute name (e.g., `CUSTOMER_EVENTS_VIEW_ITEMS` for items array)

## Deployment Location

The database and schema where secure views will be created.

**Secure View Deployment Database Name:**

* Optional field (if empty, uses Dynamic Table database)
* Should exist before code generation

**Secure View Deployment Schema Name:**

* Optional field (if empty, uses Dynamic Table schema)
* Should exist before code generation

**Note:** Deployment location can be different from Dynamic Table deployment location to separate materialized objects from the secure view layer.

## Row Access Policy

Configuration for Row-Level Security (RLS) on secure views.

**Primary Row Access Policy Name:**

* Name of the Row Access Policy applied to root secure view
* Enables row-level security based on user context
* Policy is applied in CREATE VIEW statement

**Requirements:**

* Policy must exist before code generation (or be created separately)
* Policy must be compatible with view structure
* Policy should reference attributes available in view

For more information: See [Snowflake Row Access Policies documentation](https://docs.snowflake.com/en/user-guide/security-row-intro)

## Optional Parameters

Additional parameters included in CREATE VIEW or CREATE MATERIALIZED VIEW statement. Allows fine-grained control over view behavior.

**Format:**

* Key-value pairs or SQL syntax
* Depends on view type
* See Snowflake documentation for available parameters

**Example:**

```
COMMENT='Customer Events Secure View'
```

## Configuration Requirements

**When View Type is Selected:**

* Root View Name is required
* Deployment location optional (defaults to Dynamic Table location)
* Row Access Policy optional but recommended for security

## Use Cases

**Secure View Layer:**

* Provide business-friendly view of data
* Abstract underlying Dynamic Table complexity
* Enable self-service analytics
* Standardize data access patterns

**Security Enforcement:**

* Apply Row Access Policies for data security
* Control data access by user/role
* Meet compliance requirements

**Cortex Analyst Integration:**

* Provide secure view layer for Cortex Analyst
* Enable natural language queries
* Support AI-powered analytics

## Summary

**Core Settings:**

* View Type (View or Materialized View)
* Root View Name (required when type selected)
* Deployment Location (optional, defaults to Dynamic Table location)

**Security Settings:**

* Primary Row Access Policy Name (optional but recommended)

**Advanced Settings:**

* Optional Parameters (optional)

**Requirements:**

* Semantic Model Generator feature must be enabled (automatically enables Pipeline Designer, SQL Code Generation, and Data Dictionary Builder)

For materialization settings, see [Materialization Settings](/core-concepts/data-sources/materialization-settings). For Dynamic Table configuration, see [Dynamic Table Settings](/core-concepts/data-sources/dynamic-table-settings).


# Source Object Settings

Configuration for the Snowflake database object that serves as the data source.

## Overview

Source Object Settings define the connection to the actual Snowflake object containing your data. These settings specify the database, schema, object, and column (for semi-structured data) that DataPancake will scan and process. Additional settings configure platform-specific options for streaming data sources.

***

## Object Type Selection

The type of Snowflake object that contains your data. DataPancake uses this to construct proper SQL queries and grant statements.

### Supported Object Types

**For Semi-Structured Data Sources:**

* **Dynamic Table** - VARIANT columns only
* **External Table** - JSON format only
* **Iceberg Table** - VARIANT or STRING columns, JSON format only (STRING type supports JSON only, not XML)
* **Materialized View** - VARIANT columns
* **Table** - VARIANT columns
* **View** - VARIANT columns

**For Structured Data Sources:**

* **Materialized View**
* **Table**
* **View**

***

## Database, Schema, and Object Selection

The three-part identifier for locating your source object in Snowflake.

### Database Selection

* Dropdown populated from databases accessible to your user (requires USAGE privilege)
* Case-sensitive names are automatically quoted
* Selection required before schema selection

### Schema Selection

* Dropdown populated after database selection
* Shows schemas in selected database (requires USAGE privilege)
* Refreshes when database changes
* Case-sensitive names are automatically quoted

### Object Name Selection

* Dropdown populated after schema selection
* Shows objects of selected type in selected schema
* Only objects matching selected Object Type are shown
* Refreshes when schema or object type changes
* Requires SELECT privilege on object (for semi-structured) or appropriate privileges
* Case-sensitive names are automatically quoted

***

## Column Configuration (Semi-Structured Only)

For semi-structured data sources, you must specify the column containing the VARIANT or String data.

### Column Name

Requirements:

* Column must exist in the source object
* Column must be of type VARIANT or String (VARCHAR/TEXT)
* Required field for semi-structured data sources

Input:

* Text field for column name
* Case-sensitive if column name is quoted in Snowflake
* Can include parsing expressions for String columns

Examples:

* Simple column: `JSON_DATA`
* Quoted column: `"JsonData"`
* Parsing expression: `parse_json(RECORD_CONTENT:"fullDocument")`

### Column Data Type

* **VARIANT** (Recommended)
  * Native Snowflake semi-structured type
  * Automatically parses JSON, Avro, Parquet, ORC, XML
  * Best performance
  * No parsing expressions needed
* **String**
  * Text column containing JSON/XML strings
  * Requires parsing functions in Column Name field
  * Useful for streaming platforms
  * For Iceberg tables: STRING type supports JSON only (not XML)

**Parsing Expressions (String columns only):**

Enter parsing expressions in the Column Name field when using String column type. Example for Kafka/MongoDB:

```sql
parse_json(RECORD_CONTENT:"fullDocument")
```

***

## Format Type (Semi-Structured Only)

The data format stored in the VARIANT or String column. Format type must match actual data format—incorrect format selection may cause scan failures.

### Supported Formats

* **JSON** - Standard JSON format
* **Avro** - Apache Avro binary format
* **Parquet** - Columnar storage format
* **ORC** - Optimized Row Columnar format
* **XML** - XML document format

**Format Restrictions:**

* External Tables: JSON format only
* Iceberg Tables: JSON format only (STRING type supports JSON only, not XML)

***

## Schema Sample (Semi-Structured Only)

Optional JSON or XML document representing the complete schema of your data source.

**Purpose:**

* Use "Schema" attribute create type in scan configurations (skips data scanning)
* Faster initial setup for prototyping and testing
* Can be updated when full scans are performed

**Requirements:**

* Valid JSON or XML document
* Should represent complete schema structure with all attributes and nested structures
* Can be a single representative record

**Usage:** When Attribute Create Type is set to "Schema" in scan configurations, the system uses the schema sample instead of scanning data.

***

## Platform/Application Settings (Semi-Structured Only)

Configuration for data sources from streaming platforms or document databases.

### Source Platform/Application

**Supported Platforms:**

* Kafka — Apache Kafka streaming platform
* DynamoDB — Amazon DynamoDB document database
* Other — Custom platforms can be configured

**Purpose:**

* Identifies data source platform for specialized handling
* Enables platform-specific features (e.g., stream message metadata inclusion)

**Selection:**

* Dropdown of available platforms
* Optional field (can be left blank)
* Only relevant for streaming/document database sources

### Data Deduplication

**Toggle:** Data Deduplication (By Primary Key)

**When Enabled:**

* Creates two dynamic tables:
  1. First table: Flattens root attributes
  2. Second table: Filters to most recent record per primary key

**Requirements:**

* SQL Code Generation feature must be enabled
* Deduplication SQL Expression must be provided

**Use Cases:**

* Streaming data sources with duplicate records
* Need to maintain only latest record per key

### Deduplication SQL Expression

**Format:**

* QUALIFY clause with ROW\_NUMBER() window function
* PARTITION BY primary key
* ORDER BY sort field (typically timestamp or offset)

**Example — Kafka (with Stream Metadata):**

```sql
QUALIFY ROW_NUMBER() OVER (PARTITION BY message_key ORDER BY message_offset DESC) = 1
```

**Example — Timestamp-based:**

```sql
QUALIFY ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY event_timestamp DESC) = 1
```

**Requirements:**

* Required when Data Deduplication is enabled
* Must use valid Snowflake SQL syntax
* Should reference attributes available in flattened data

***

## Source Object Validation

The system validates source object connection when creating new data sources, saving settings, or before initiating scans.

**Validation Checks:**

* Object exists and is accessible
* Required privileges are granted
* Column exists (for semi-structured)
* Object type matches selection

**Error Handling:**

* Connection Failed: System displays specific error message and provides SQL statements to grant privileges
* Object Not Found: Error indicates object doesn't exist—verify database, schema, and object names
* Column Not Found: Error indicates column doesn't exist—verify column name spelling and data type

***

## Summary

**Required Settings:**

* Object Type
* Database
* Schema
* Object Name
* Column Name (semi-structured)
* Format Type (semi-structured)
* Column Data Type (semi-structured)

**Optional Settings:**

* Schema Sample
* Source Platform/Application
* Data Deduplication
* Deduplication SQL Expression

For information on data source types, see [Data Source Types](/core-concepts/data-sources/data-source-types). For materialization settings, see [Materialization Settings](/core-concepts/data-sources/materialization-settings).


# Scan Configurations

Introduction to scan configurations - learn and control how DataPancake scans your data.

## Overview

Scan configurations control how DataPancake scans data sources. Each configuration defines compute resources, scanning strategy, scheduling, and attribute discovery method.

## Configuration Sections

* [**Basic Configuration Settings**](/core-concepts/scan-configurations/basic-configuration-settings) - `CONFIGURATION_NAME`, `ATTRIBUTE_CREATE_TYPE`, `RECORD_STATUS`, `CODE_GENERATE_ON_VERSION_CHANGE`
* [**Scheduling Settings**](/core-concepts/scan-configurations/scheduling-settings) - `MONITOR_ENABLED`, `MONITOR_CRON_SCHEDULE`, `MONITOR_CRON_TIMEZONE`
* [**Data Source & Warehouse Settings**](/core-concepts/scan-configurations/data-source-and-warehouse-settings) - `SCAN_RECORD_LIMIT`, `SCAN_WHERE_CLAUSE`, warehouse selection
* [**Vertical Scale Settings**](/core-concepts/scan-configurations/vertical-scale-settings) - Thread count, `PROCEDURE_INSTANCE_COUNT`, `PROCEDURE_INSTANCE_ROW_COUNT`, `SCAN_ORDER_BY`, `THREAD_PROCESS_RECORD_COUNT` (semi-structured only)
* [**Source Stream Settings**](/core-concepts/scan-configurations/source-stream-settings) - `SOURCE_STREAM_LAST_SCANNED_TIMESTAMP` for incremental scanning
* [**Common Patterns & Best Practices**](/core-concepts/scan-configurations/common-patterns-and-best-practices) - Configuration patterns and optimization

## Quick Reference

**Essential:**

* `CONFIGURATION_NAME` - Unique identifier
* `ATTRIBUTE_CREATE_TYPE` - `'Discover'` (production) or `'Schema'` (prototyping)
* Virtual Warehouse - Compute resource
* `SCAN_RECORD_LIMIT` - Number of records (0 = unlimited)

**Advanced:**

* Number of Threads - Parallel processing (defaults to warehouse max, semi-structured only)
* `PROCEDURE_INSTANCE_COUNT` - Split scans across multiple calls (60-minute timeout)
* `MONITOR_CRON_SCHEDULE` - Automated scanning with cron expressions

See [Scan Processing](/core-concepts/scan-processing) for scanning details. See [Warehouses](/core-concepts/warehouses) for warehouse selection.


# Basic Configuration Settings

Core settings for naming, attribute discovery method, status, and auto code generation.

## Configuration Name (`CONFIGURATION_NAME`)

Unique, descriptive name for the scan configuration. Use names that indicate purpose (e.g., "Quick Onboarding Scan", "Daily Full Scan", "Incremental Updates").

***

## Attribute Create Type (`ATTRIBUTE_CREATE_TYPE`)

Determines how attributes are discovered and created during scanning.

**Values:**

* `'Discover'` - Uses actual scanned data to create attribute metadata. Discovers all attributes, creates all 7 polymorphic versions proactively, activates versions based on actual data types found. Recommended for production.
* `'Schema'` - Uses Data Source Object Schema Sample to create attribute metadata. Faster for rapid prototyping without scanning full datasets. Best for quick onboarding and testing.

***

## Status (`RECORD_STATUS`)

Controls whether scan configuration is active and available for use.

**Values:**

* `'Active'` - Configuration available for scanning
* `'Inactive'` - Configuration disabled but preserved
* `'Deleted'` - Configuration marked for deletion

***

## Auto Code Generate (`CODE_GENERATE_ON_VERSION_CHANGE`)

Automatically generates Dynamic Table SQL code when data source schema or polymorphic state changes after a scan.

**When enabled:**

* SQL code automatically generated after scans that detect schema changes
* New polymorphic versions trigger code regeneration
* Attribute additions or changes update generated SQL

**When disabled:**

* Code generation must be triggered manually
* Useful for reviewing changes before generating code


# Scheduling Settings

Configure automated scanning with cron schedules and time zones.

## Enable Schedule (`MONITOR_ENABLED`)

Toggles automated scanning based on cron schedule. When enabled, scans run automatically at specified times.

**Use cases:** Regular full scans (daily, weekly), incremental update scans, schema monitoring and drift detection, automated pipeline updates.

***

## Cron Schedule (`MONITOR_CRON_SCHEDULE`)

Cron expression defining when scans run automatically. Required when `MONITOR_ENABLED = TRUE`.

**Cron format:** `minute hour day-of-month month day-of-week`

**Examples:**

```
30 * * * *    # Hourly at 30 minutes after the hour
0 3 * * *     # Daily at 3:00 AM
0 3 * * MON   # Weekly at 3:00 AM every Monday
0 3 1 * *     # Monthly at 3:00 AM on the 1st
```

**Note:** Schedule during low-usage periods. Avoid overlapping scans on the same warehouse.

***

## Cron Time Zone (`MONITOR_CRON_TIMEZONE`)

Time zone for cron schedule. Required when `MONITOR_ENABLED = TRUE`.

**Available time zones:** `Etc/UTC`, `America/Los_Angeles`, `America/Phoenix`, `America/Denver`, `America/Boise`, `America/Mexico_City`, `America/Indiana/Knox`, `America/Chicago`, `America/Toronto`, `America/Detroit`, `America/New_York`

**Note:** Use organization's primary time zone or UTC for consistency across regions.


# Data Source & Warehouse Settings

Configure record limits, WHERE clauses, and warehouse selection for scan operations.

## Data Source Settings

**Record Limit (`SCAN_RECORD_LIMIT`)**

* Limits number of records scanned. Set to `0` for unlimited (full scan).
* Use cases: Quick scans (e.g., 10,000 for rapid discovery), full scans (`0`), testing (small limits), sampling
* Monitor scan duration to ensure it stays under 60 minutes

***

**Where Clause (`SCAN_WHERE_CLAUSE`)**

* SQL WHERE clause to filter records during scanning
* **Constraint:** Only available when `PROCEDURE_INSTANCE_COUNT = 1` (cannot use with multiple procedure calls)
* Use cases: Incremental scanning (timestamp filters), partitioned scanning, data filtering

**Examples:**

```sql
WHERE created_date >= CURRENT_DATE - 7
WHERE partition_key = '2024-01'
WHERE status = 'active'
```

**Note:** Combine with `SOURCE_STREAM_LAST_SCANNED_TIMESTAMP` for delta scans. Test WHERE clauses before enabling scheduled scans.

***

## Warehouse Settings

**Virtual Warehouse**

* Snowflake virtual warehouse assigned to this scan configuration
* Each configuration must be assigned to exactly one warehouse
* Only warehouses registered in DataPancake are available
* Warehouse must be connected and active
* Each warehouse can only run one scan at a time
* Warehouse size affects scan performance

**Warehouse status indicators:**

* Connected - Available and ready
* Not Connected - Connection issue (cannot save configuration)
* Inactive - Disabled (warning shown)
* Deleted - Marked for deletion (cannot save configuration)


# Vertical Scale Settings

Control thread count, procedure calls, and memory management for optimal scan performance.

Vertical scale settings control how DataPancake utilizes compute resources within a single warehouse. These settings are only available for semi-structured data sources.

***

## Number of Threads

Number of parallel threads used during scanning. Defaults to maximum threads available for chosen warehouse size.

**Default behavior:**

* Automatically set to warehouse maximum
* Small: 1-2 threads, Medium: 4-8 threads, Large: 8-16 threads, 2X-Large: 16+ threads

**Manual override:**

* Can be reduced for memory-constrained scenarios
* Lower thread count = less memory usage, slower processing
* Higher thread count = more memory usage, faster processing (up to warehouse max)

**Note:** Use default (maximum) for most scenarios. Reduce only if experiencing memory errors.

***

## Number of Procedure Calls (`PROCEDURE_INSTANCE_COUNT`)

Total number of procedure calls required to process entire dataset. Use multiple calls when a single call cannot complete within 60 minutes.

**When to use multiple calls:**

* Data source takes longer than 60 minutes to scan
* Very large datasets (millions of records)
* Complex nested structures requiring more processing time

**Configuration:**

* Set to `1` for single procedure call (default)
* Set to `2` or more to split scan across multiple calls
* Each call must complete within 60-minute timeout
* Calls execute sequentially via Snowflake Tasks

**Important constraints:**

* **WHERE clause not available** - Cannot use `SCAN_WHERE_CLAUSE` when `PROCEDURE_INSTANCE_COUNT > 1`
* **ORDER BY required** - Must specify `SCAN_ORDER_BY` when `PROCEDURE_INSTANCE_COUNT > 1`
* **Record count required** - Must set `PROCEDURE_INSTANCE_ROW_COUNT` when `PROCEDURE_INSTANCE_COUNT > 1`

**Note:** Start with single call (`1`) and monitor scan duration. Use multiple calls only if scans exceed 60 minutes.

***

## Record Count Per Procedure Call (`PROCEDURE_INSTANCE_ROW_COUNT`)

Number of records processed per procedure call. Required when `PROCEDURE_INSTANCE_COUNT > 1`.

**Calculation:**

* Total records ÷ Number of procedure calls = Records per call
* Must be large enough to process all rows
* Cannot be so large that some calls have zero rows

**Example:**

* Dataset: 2,000,000 records, 2 procedure calls
* Valid: 1,000,000 records per call (2,000,000 ÷ 2 = 1,000,000)
* Invalid: 500,000 records per call (would only process 1,000,000 total)
* Invalid: 2,500,000 records per call (exceeds total, would leave empty calls)

**Note:** Calculate: Total records ÷ Number of calls. Add small buffer (5-10%) to account for data growth.

***

## Order By (`SCAN_ORDER_BY`)

One or more attributes used to order the data source.

**When required:**

* `PROCEDURE_INSTANCE_COUNT > 1` - Ensures consistent record partitioning across calls, prevents duplicate or missed records

**When optional:**

* `PROCEDURE_INSTANCE_COUNT = 1` and `SCAN_RECORD_LIMIT > 0` - Can improve performance for limited scans

**When not required:**

* `PROCEDURE_INSTANCE_COUNT = 1` and `SCAN_RECORD_LIMIT = 0` - Full table scan in single call

**Format examples:**

* Single attribute: `json_data:"_id"` or `customer_id`
* Multiple attributes: `customer_id, json_data:"_id"`

**Note:** Use unique or nearly-unique attributes. Prefer indexed columns for performance.

***

## Record Count Per Thread Worker Process (`THREAD_PROCESS_RECORD_COUNT`)

Number of records passed to each thread worker process during a scan procedure call. Controls how much data is loaded into memory at one time.

**Memory calculation:**

```
Memory Used = Avg document size (bytes) × 2 × Thread Count × Record Count Per Thread
```

**Default behavior:**

* Automatically set based on warehouse size and data complexity
* Typically defaults to 1,000 records per thread
* Can be adjusted if memory errors occur

**Optimization:**

* Reduce if experiencing memory errors
* Increase if memory allows and you want faster processing
* Balance between memory usage and processing efficiency

**Note:** Start with default value. Reduce if memory errors occur during scanning.


# Source Stream Settings

Configure incremental scanning with timestamp tracking for efficient delta updates.

## Last Scanned Timestamp (`SOURCE_STREAM_LAST_SCANNED_TIMESTAMP`)

Last timestamp scanned from this data source. Used as part of `SCAN_WHERE_CLAUSE` for incremental scanning.

**How it works:**

* Stored after each successful scan
* Automatically updated when scans complete
* Used to filter records in subsequent scans
* Enables delta/incremental scanning

**Incremental scanning:**

* Set `SCAN_WHERE_CLAUSE` to include timestamp filter (e.g., `WHERE created_date > '<last_scanned_timestamp>'`)
* Scans only new or changed records
* Faster than full scans
* Schema discovery still runs for new data

**Resetting:**

* Remove timestamp from configuration to scan entire data source
* Useful for full re-scanning after schema changes
* Can be cleared manually in configuration


# Common Patterns & Best Practices

Pre-configured patterns and optimization recommendations for common scan scenarios.

## Common Configuration Patterns

**Quick Onboarding Scan:**

* `ATTRIBUTE_CREATE_TYPE`: `'Schema'` (if schema sample available) or `'Discover'`
* `SCAN_RECORD_LIMIT`: `10,000` (or small sample)
* `PROCEDURE_INSTANCE_COUNT`: `1`
* Number of Threads: Default (maximum)
* `CODE_GENERATE_ON_VERSION_CHANGE`: `FALSE` (review first)
* `MONITOR_ENABLED`: `FALSE`
* Use case: Initial data source setup, testing, quick schema validation

**Full Production Scan:**

* `ATTRIBUTE_CREATE_TYPE`: `'Discover'`
* `SCAN_RECORD_LIMIT`: `0` (unlimited)
* `PROCEDURE_INSTANCE_COUNT`: `1` (or multiple if needed)
* Number of Threads: Default (maximum)
* `CODE_GENERATE_ON_VERSION_CHANGE`: `TRUE`
* `MONITOR_ENABLED`: `TRUE` (daily/weekly as needed)
* Use case: Production data sources, complete attribute discovery, automated pipeline updates

**Incremental Scan:**

* `ATTRIBUTE_CREATE_TYPE`: `'Discover'`
* `SCAN_RECORD_LIMIT`: `0` (unlimited)
* `SCAN_WHERE_CLAUSE`: `created_date > '<last_scanned_timestamp>'`
* `SOURCE_STREAM_LAST_SCANNED_TIMESTAMP`: Auto-updated after scans
* `PROCEDURE_INSTANCE_COUNT`: `1`
* Number of Threads: Default (maximum)
* `CODE_GENERATE_ON_VERSION_CHANGE`: `TRUE`
* `MONITOR_ENABLED`: `TRUE` (hourly/daily)
* Use case: Regularly updated data sources, delta scanning workflows, schema monitoring

**Large Dataset Scan:**

* `ATTRIBUTE_CREATE_TYPE`: `'Discover'`
* `SCAN_RECORD_LIMIT`: `0` (unlimited)
* `PROCEDURE_INSTANCE_COUNT`: `4` (or as needed)
* `PROCEDURE_INSTANCE_ROW_COUNT`: `1,000,000` (or calculated)
* `SCAN_ORDER_BY`: `unique_id` (or appropriate attribute)
* Number of Threads: Default (maximum)
* `CODE_GENERATE_ON_VERSION_CHANGE`: `TRUE`
* `MONITOR_ENABLED`: `TRUE` (as needed)
* Use case: Data sources exceeding 60-minute scan time, very large datasets (millions+ records), complex nested structures

**Memory-Constrained Scan:**

* `ATTRIBUTE_CREATE_TYPE`: `'Discover'`
* `SCAN_RECORD_LIMIT`: `0` (unlimited) or limited
* `PROCEDURE_INSTANCE_COUNT`: `1` or multiple
* Number of Threads: Reduced (e.g., 2-4 instead of max)
* `THREAD_PROCESS_RECORD_COUNT`: Reduced
* `CODE_GENERATE_ON_VERSION_CHANGE`: `TRUE`
* `MONITOR_ENABLED`: `FALSE` or `TRUE`
* Use case: Memory errors during scanning, very complex nested structures, large arrays and polymorphic variations, smaller warehouse sizes

***

## Best Practices

**Configuration management:**

* Use descriptive, consistent names (e.g., `customer_events_daily_full`)
* Create separate configurations for different use cases (quick scan, full scan, incremental scan)
* Keep only active configurations visible; use Inactive status for configurations you may reuse

**Performance optimization:**

* Use medium warehouses for most use cases; reserve larger warehouses for complex data sources
* Use default (maximum) threads unless memory constrained
* Start with single procedure call (`PROCEDURE_INSTANCE_COUNT = 1`); use multiple calls only if exceeding 60 minutes

**Scheduling strategy:**

* Schedule during low-usage periods
* Avoid overlapping scans on same warehouse
* Use `SCAN_WHERE_CLAUSE` with timestamp filters for incremental scanning
* Leverage `SOURCE_STREAM_LAST_SCANNED_TIMESTAMP`; clear timestamp for full re-scans

**Error prevention:**

* Monitor scan duration; use multiple procedure calls if needed
* Start with default settings; reduce thread count or `THREAD_PROCESS_RECORD_COUNT` if memory errors occur
* Validate `SCAN_WHERE_CLAUSE` and test `SCAN_ORDER_BY` attributes before use
* Ensure `PROCEDURE_INSTANCE_ROW_COUNT` is accurate when using multiple procedure calls


# Attribute Metadata

## Overview

Attributes are discovered during scanning and serve as the metadata foundation for generating Dynamic Tables and Views. DataPancake discovers every attribute path at any nesting depth, including:

* All nested structures (any depth)
* Embedded/stringified JSON (recursively parsed)
* Polymorphic variations (same path, different data types)

**Key DataPancake Behavior:** When an attribute is first discovered, DataPancake **proactively creates all 7 polymorphic versions** immediately. Only versions matching discovered data types are activated (`VERSION_STATUS = 'active'`). Inactive versions remain ready for future activation, enabling seamless schema evolution.

***

## Documentation

* [**Attribute Discovery**](/core-concepts/attribute-metadata/attribute-discovery-process) - Discovery process and embedded JSON handling
* [**Attribute Types**](/core-concepts/attribute-metadata/attribute-metadata-types) - Discovered, Schema, and Virtual attributes
* [**Polymorphic Versions**](/core-concepts/attribute-metadata/polymorphic-versions) - The 7 polymorphic variations and proactive creation
* [**Attribute Metadata Fields**](/core-concepts/attribute-metadata/datapancake-metadata-fields) - Complete field reference
* [**Arrays & Nested Structures**](/core-concepts/attribute-metadata/arrays-and-nested-structures) - Array handling and relationships
* [**Attribute Lifecycle**](/core-concepts/attribute-metadata/attribute-lifecycle) - Creation, versioning, and schema evolution
* [**Attributes in Code Generation**](/core-concepts/attribute-metadata/attributes-in-code-generation) - How attributes become SQL columns
* [**Integration & API**](/core-concepts/attribute-metadata/integration-and-api) - Stored procedures and views

***

## Quick Reference

**Attribute Types:**

* `'Discovered'` - Found during scanning (`ATTRIBUTE_CREATE_TYPE = 'Discover'`)
* `'Schema'` - Created from schema samples (`ATTRIBUTE_CREATE_TYPE = 'Schema'`)
* `'Virtual'` - User-created via UI/API

**The 7 Polymorphic Versions** (created proactively for every attribute):

1. `str` → `{name}_str`
2. `int` → `{name}_int`
3. `float` → `{name}_float`
4. `bool` → `{name}_bool`
5. `object` → `{name}_object`
6. `array_primitive` → `{name}_array_primitive`
7. `array_object` → `{name}_array_object`

**Key Tables:**

* `core.datasource_attribute` - Core attribute metadata
* `core.datasource_attribute_polymorphic_version` - Version-specific metadata


# Attribute Discovery Process

How DataPancake discovers attributes during scanning, including polymorphic detection and recursive parsing of stringified JSON.

## Discovery Process

1. **Recursively traverse records** - Every nested level is visited
2. **Track attribute paths** - Complete paths from root to leaf (e.g., `customer.contact.email`)
3. **Identify data types** - Source data type inferred for each path occurrence
4. **Create all 7 polymorphic versions** - Proactively created when attribute first discovered
5. **Activate matching versions** - Only versions matching discovered types set to `VERSION_STATUS = 'active'`
6. **Create attribute records** - Records created in `core.datasource_attribute` and `core.datasource_attribute_polymorphic_version`

***

## What Gets Discovered

* **All attribute paths** - Complete paths from root to leaf (e.g., `customer.contact.email`)
* **Nested objects** - Every level of object nesting
* **Nested arrays** - Both object arrays (`ARRAY_TYPE = 'object'`) and primitive arrays (`ARRAY_TYPE = 'primitive'`)
* **Embedded JSON** - JSON stored as strings (`HAS_EMBEDDED_CONTENT = TRUE`); recursively parsed
* **Polymorphic variations** - All data type variations for the same path (handled via polymorphic versions)

***

## Example: Polymorphic Discovery

**Record 1:**

```json
{
  "customer_id": "C001",
  "customer": {
    "address": "123 Main St, Anytown, ST 12345",
    "metadata": "{\"source\":\"web\",\"tags\":[\"vip\"]}"
  }
}
```

**Record 2:**

```json
{
  "customer_id": "C002",
  "customer": {
    "address": {"street": "456 Oak Ave", "city": "Springfield"},
    "metadata": "{\"source\":\"mobile\",\"tags\":[\"new\"]}"
  }
}
```

**Discovery Results:**

* `customer.address`:
  * Record 1: `str` → `address_str` activated
  * Record 2: `object` → `address_object` activated (existing version)
* `customer.metadata`:
  * `HAS_EMBEDDED_CONTENT = TRUE`
  * Recursively parsed to discover: `metadata.source`, `metadata.tags[]`


# Attribute Metadata Types

Overview of the three attribute types and where they come from: Discovered (from scans), Schema (from samples), and Virtual (user-created).

DataPancake categorizes attributes into three types based on their origin:

***

## Discovered Attributes

**Definition:** Attributes automatically discovered during the scanning process.

**Characteristics:**

* Created when `ATTRIBUTE_CREATE_TYPE = 'Discover'` in scan configuration
* Represents actual fields found in source data
* Cannot be deleted (only `RECORD_STATUS = 'inactive'`)
* All 7 polymorphic versions created proactively

**Creation:** During scan process via `sp_upsert_attribute`. All 7 polymorphic versions created in `core.datasource_attribute_polymorphic_version`; only matching versions set to `VERSION_STATUS = 'active'`.

***

## Schema Attributes

**Definition:** Attributes created from a schema sample rather than full data scanning.

**Characteristics:**

* Created when `ATTRIBUTE_CREATE_TYPE = 'Schema'` in scan configuration
* Based on schema sample from `DATASOURCE_OBJECT_SCHEMA_SAMPLE` field
* All 7 polymorphic versions created proactively
* Can be updated when full scans are performed

**Use Cases:** Rapid prototyping without full data scans; testing configurations with sample schemas.

***

## Virtual Attributes

**Definition:** User-created custom attributes that don't exist in the source data.

**Characteristics:**

* Created via UI or `sp_upsert_virtual_datasource_attribute` stored procedure
* Single polymorphic version (no polymorphism)
* Automatically set to `INCLUDE_IN_CODE_GEN = TRUE`
* `ATTRIBUTE_TYPE = 'Virtual'`

**Required fields:**

* Attribute name (no spaces)
* Source data type
* Snowflake data type
* Transformation expression (SQL)

**Optional fields:**

* Parent array (for array-level virtual attributes)
* `W_QUESTION_CATEGORY` (for Cortex Analyst semantic models)

**Use Cases:**

* Derived fields (e.g., `full_name = first_name || ' ' || last_name`)
* Semantic model metrics/filters/dimensions
* Business logic not in source data

***

## Comparison

| Feature                     | Discovered         | Schema             | Virtual        |
| --------------------------- | ------------------ | ------------------ | -------------- |
| **Source**                  | Full data scan     | Schema sample      | User-created   |
| **ATTRIBUTE\_CREATE\_TYPE** | `'Discover'`       | `'Schema'`         | N/A            |
| **Polymorphic Versions**    | All 7 created      | All 7 created      | Single version |
| **Can Delete**              | No (mark inactive) | No (mark inactive) | Yes            |
| **Update Method**           | Re-scan            | Re-scan or update  | UI/API update  |


# Attribute Metadata Details

Complete reference for attribute metadata, covering discovered source schema fields and configurable extended metadata that controls SQL transformation, security policies, and code generation.

## Overview

Attribute metadata is stored in:

* `core.datasource_attribute` - Core attribute information
* `core.datasource_attribute_polymorphic_version` - Version-specific metadata

**Source Schema Metadata:** Automatically discovered during scanning (read-only except `RECORD_STATUS`).

**Extended Metadata:** User-configurable fields for transformation, security, and code generation.

## Metadata Organization

Pipeline Designer organizes metadata by UI tabs:

* [**Source Schema**](/core-concepts/attribute-metadata/attribute-metadata-details/source-schema) - Discovered attributes, paths, types, structure
* [**Destination Schema**](/core-concepts/attribute-metadata/attribute-metadata-details/destination-schema) - Snowflake data type configuration, keys
* [**Transformation & Security**](/core-concepts/attribute-metadata/attribute-metadata-details/transformation-security) - Column naming, transformations, security policies
* [**Arrays**](/core-concepts/attribute-metadata/attribute-metadata-details/arrays) - Array-specific configuration and relationships
* [**Foreign Keys**](/core-concepts/attribute-metadata/attribute-metadata-details/foreign-keys) - Foreign key relationships for array tables

***

## Core Attribute Fields

Stored in `core.datasource_attribute` (applies to all polymorphic versions):

* `ATTRIBUTE_PATH` - Full path in source data (e.g., `customer.contact.email`)
* `ATTRIBUTE_PATH_EMBEDDED` - Path for attributes within embedded/stringified JSON
* `ATTRIBUTE_NAME` - Leaf name (e.g., `email` from `customer.contact.email`)
* `ATTRIBUTE_LEVEL` - Nesting depth (0 = root, increments per level)
* `ATTRIBUTE_ORDER` - Ordering for attributes at same level
* `PARENT_OBJECT` - Parent object path (e.g., `customer.contact` for `customer.contact.email`)
* `PARENT_ARRAY` - Parent array path if within array (e.g., `orders` for `orders[0].order_id`)
* `PARENT_ARRAY_EMBEDDED` - Parent array path for embedded JSON arrays
* `RECORD_STATUS` - `'active'` or `'inactive'` (editable)
* `ATTRIBUTE_TYPE` - `'Discovered'`, `'Schema'`, or `'Virtual'`
* `ATTRIBUTE_SCHEMA_COMPONENT_TYPE` - Internal classification
* `IS_PRIMARY_KEY` - Boolean for primary key identification

***

## Polymorphic Version Fields

Stored in `core.datasource_attribute_polymorphic_version` (version-specific):

**Type Information:**

* `SOURCE_DATA_TYPE` - Inferred type (`'str'`, `'int'`, `'float'`, `'bool'`, `'object'`, `'array'`, `'null'`)
* `POLYMORPHIC_ATTRIBUTE_NAME` - Unique version name (e.g., `email_str`, `orders_array_object`)
* `VERSION_STATUS` - `'active'` or `'inactive'`
* `IS_ARRAY` - Boolean for array type
* `ARRAY_TYPE` - `'object'`, `'primitive'`, or `'primitive,object'`
* `ARRAY_PRIMITIVE_TYPE` - Element type for primitive arrays (`'str'`, `'int'`, `'float'`, `'bool'`)
* `HAS_EMBEDDED_CONTENT` - Boolean for embedded/stringified JSON
* `SAMPLE_VALUE` - Sample value (strings default to `"string value"` for privacy)
* `VERSION_STATUS_DATE` - Timestamp when version was created/last activated

**Snowflake Data Type:**

* `DATA_PLATFORM_DATA_TYPE` - Snowflake data type (editable)
* `DATA_PLATFORM_DATA_TYPE_PRECISION` - Precision for numeric types (editable)
* `DATA_PLATFORM_DATA_TYPE_SCALE` - Scale for numeric types (editable)
* `DATA_PLATFORM_DATA_TYPE_DATETIMEFORMAT` - DateTime format strings (editable)
* `USE_DATETIME_FORMAT` - Boolean for using formats (editable)

**Transformation & Naming:**

* `ALIAS_NAME` - Custom column alias (editable)
* `CODE_GENERATED_COLUMN_NAME` - Final column name (read-only, auto-generated)
* `NULL_VALUE_EXPRESSION` - SQL for null handling (editable, only when `TRANSFORMATION_TYPE = 'No Transformation'`)
* `TRANSFORMATION_TYPE` - `'No Transformation'` or `'SQL Expression'` (editable)
* `TRANSFORMATION_EXPRESSION` - Custom SQL transformation (editable)
* `TRANSFORMATION_EXPRESSION_COMMENT` - Documentation (editable)

**Semantic Layer:**

* `INCLUDE_IN_SEMANTIC_LAYER` - Boolean for view inclusion (editable)
* `SEMANTIC_LAYER_EXPRESSION` - View-level transformation (editable)
* `SEMANTIC_LAYER_EXPRESSION_COMMENT` - Documentation (editable)
* `SEMANTIC_LAYER_ALIAS_NAME` - View column alias (editable)

**Security:**

* `INCLUDE_IN_SECURITY_ROW_LEVEL_POLICY` - Boolean for row-level security (editable)
* `MASKING_POLICY_NAME` - Masking policy name (editable)
* `MASKING_POLICY_PARAMETERS` - Policy parameters (editable)

**Schema Consolidation:**

* `SCHEMA_INSERT_REGULAR_EXPRESSION_SEARCH` - Regex pattern (editable)
* `SCHEMA_INSERT_SQL_EXPRESSION` - SQL expression (editable)

**Code Generation:**

* `INCLUDE_IN_CODE_GEN` - Boolean for code generation (editable)
* `PARENT_INCLUDE_IN_CODE_GEN` - Boolean for parent inclusion (read-only)

**Additional:**

* `IS_ENUM` - Boolean for enum values (editable)
* `HAS_ALL_UNIQUE_VALUES` - Boolean for unique values (editable)
* `HAS_ALL_NULL_VALUES` - Boolean for null values (read-only)
* `ADD_TO_CLUSTER_BY` - Boolean for CLUSTER BY clause (editable)

***

## Metadata Workflow

1. **Discovery** - Source schema metadata discovered during scanning
2. **Configuration** - Extended metadata configured in Pipeline Designer
3. **Code Generation** - Metadata drives SQL generation for Dynamic Tables and Views
4. **Materialization** - Generated SQL creates materialized tables with transformations
5. **Semantic Layer** - Additional transformations applied in views

## Quick Reference

See individual pages for complete field details:

* [Source Schema](/core-concepts/attribute-metadata/attribute-metadata-details/source-schema) - `RECORD_STATUS` (editable)
* [Destination Schema](/core-concepts/attribute-metadata/attribute-metadata-details/destination-schema) - Data types, precision, scale, datetime formats, keys
* [Transformation & Security](/core-concepts/attribute-metadata/attribute-metadata-details/transformation-security) - Naming, transformations, semantic layer, security
* [Arrays](/core-concepts/attribute-metadata/attribute-metadata-details/arrays) - Array configuration, relationships, aliases
* [Foreign Keys](/core-concepts/attribute-metadata/attribute-metadata-details/foreign-keys) - Foreign key relationships


# Source Schema

Read-only metadata discovered during scanning, including attribute paths, nesting levels, data types, structure information, and sample values representing what DataPancake found in your source data.

## Overview

Source Schema metadata represents what DataPancake discovered during scanning. Primarily read-only (except `RECORD_STATUS`). Provides structure, types, and content information.

***

## Source Schema Fields

### Path Information

**Attribute Path (`ATTRIBUTE_PATH`)**

* The full path to the attribute in the source data
* Example: `customer.contact.email`
* Used to reference the attribute in source queries
* **Read-only** - Set during discovery

**Attribute Path Embedded (`ATTRIBUTE_PATH_EMBEDDED`)**

* Path for attributes found within embedded/stringified JSON
* Tracks nested JSON structures within string fields
* Example: For JSON stored as a string, this tracks the path within that JSON
* **Read-only** - Set during discovery

**Attribute Name (`ATTRIBUTE_NAME`)**

* The leaf name of the attribute
* Example: For path `customer.contact.email`, the name is `email`
* **Read-only** - Extracted from attribute path

***

### Structure Information

**Attribute Level (`ATTRIBUTE_LEVEL`)**

* The nesting depth of the attribute
* Root level attributes have level 0
* Each nested level increments the count
* Example: `customer` = level 0, `customer.contact` = level 1, `customer.contact.email` = level 2
* **Read-only** - Calculated during discovery

**Attribute Order (`ATTRIBUTE_ORDER`)**

* Ordering information for attributes at the same level
* Used for consistent presentation in the UI
* **Read-only** - Set during discovery

**Parent Object (`PARENT_OBJECT`)**

* The parent object path containing this attribute
* Example: For `customer.contact.email`, parent object is `customer.contact`
* Empty for root-level attributes
* **Read-only** - Set during discovery

**Parent Array (`PARENT_ARRAY`)**

* The parent array path if this attribute is within an array
* Example: For `orders[0].order_id`, parent array is `orders`
* Used for foreign key relationship configuration
* Empty for non-array attributes
* **Read-only** - Set during discovery

**Parent Array Embedded (`PARENT_ARRAY_EMBEDDED`)**

* Parent array path for attributes within embedded JSON arrays
* Tracks arrays within stringified JSON
* **Read-only** - Set during discovery

***

### Type Information

**Source Data Type (`SOURCE_DATA_TYPE`)**

* Inferred data type from source data
* Values: `'str'`, `'int'`, `'float'`, `'bool'`, `'object'`, `'array'`, `'null'`
* **Read-only** - Inferred during scanning

**Polymorphic Attribute Name (`POLYMORPHIC_ATTRIBUTE_NAME`)**

* Unique name for this polymorphic version
* Format: `{attribute_name}_{type}` or `{attribute_name}_array_{array_type}`
* Examples: `email_str`, `price_float`, `orders_array_object`
* **Read-only** - Generated based on source data type

**Array Type (`ARRAY_TYPE`)**

* For array attributes, the type of array elements
* Values: `'object'`, `'primitive'`, `'primitive,object'`
* Only applicable when `SOURCE_DATA_TYPE = 'array'`
* **Read-only** - Determined during discovery

**Array Primitive Type (`ARRAY_PRIMITIVE_TYPE`)**

* For primitive arrays, the data type of array elements
* Values: `'str'`, `'int'`, `'float'`, `'bool'`
* Only applicable when `ARRAY_TYPE = 'primitive'` or `ARRAY_TYPE = 'primitive,object'`
* **Read-only** - Determined during discovery

***

### Content Information

**Sample Value (`SAMPLE_VALUE`)**

* A sample value from the source data
* For string types, defaults to `"string value"` for privacy/security
* Helps users understand the data content
* **Read-only** - Captured during scanning

**Has Embedded Content (`HAS_EMBEDDED_CONTENT`)**

* Boolean indicating if this attribute contains embedded/stringified JSON
* Triggers recursive parsing of the embedded content
* When `TRUE`, DataPancake recursively parses the JSON string to discover nested attributes
* **Read-only** - Detected during scanning

***

### Attribute Classification

**Attribute Type (`ATTRIBUTE_TYPE`)**

* The origin of the attribute
* Values:
  * `'Discovered'` - Found during scanning
  * `'Schema'` - Created from schema sample
  * `'Virtual'` - User-created custom attribute
* **Read-only** - Set based on how attribute was created

**Attribute Schema Component Type (`ATTRIBUTE_SCHEMA_COMPONENT_TYPE`)**

* Classifies the schema component type
* Used for internal organization and categorization
* **Read-only** - Set during discovery

**Version Status Date (`VERSION_STATUS_DATE`)**

* Timestamp when polymorphic version was created or last activated
* Used for tracking schema evolution
* **Read-only** - Set when version is created/activated

***

### Status Control

**Attribute Record Status (`RECORD_STATUS`)**

* Controls whether attribute is active or inactive
* Values: `'active'`, `'inactive'`
* **Editable** - Only editable field in Source Schema tab
* Active attributes included in code generation (if `INCLUDE_IN_CODE_GEN = TRUE`)
* Inactive attributes excluded from code generation

***

## Virtual Attributes

User-created custom attributes (created via UI or `sp_upsert_virtual_datasource_attribute`).

**Required fields:**

* Attribute Name (no spaces)
* Source Data Type
* Snowflake Data Type
* Transformation Expression (SQL)

**Optional fields:**

* Parent Array (for array-level virtual attributes)
* `W_QUESTION_CATEGORY` (for Cortex Analyst semantic models)
* Description

**Characteristics:**

* Single polymorphic version (no polymorphism)
* Automatically set to `INCLUDE_IN_CODE_GEN = TRUE`
* `ATTRIBUTE_TYPE = 'Virtual'`
* Can reference other attributes using `{attribute_name}` placeholder in expressions

***

## Common Scenarios

**Understanding nested structure:**

* Use `ATTRIBUTE_LEVEL` (0 = root, increments per level) and `PARENT_OBJECT` to understand nesting

**Identifying embedded JSON:**

* Check `HAS_EMBEDDED_CONTENT = TRUE` for stringified JSON
* `ATTRIBUTE_PATH_EMBEDDED` shows nested structure within string fields

**Working with arrays:**

* `ARRAY_TYPE` indicates `'object'`, `'primitive'`, or `'primitive,object'`
* `ARRAY_PRIMITIVE_TYPE` (if applicable) shows element type
* `PARENT_ARRAY` shows containing array for nested attributes

**Deactivating attributes:**

* Set `RECORD_STATUS = 'inactive'` to exclude from code generation without deleting
* Useful for temporarily excluding, preserving history, or testing


# Destination Schema

Configuration for mapping source attributes to Snowflake data types, including precision, scale, datetime formats, primary key identification, and data quality indicators for Dynamic Tables.

## Overview

Destination Schema metadata controls how source attributes map to Snowflake data types and identifies key characteristics for Dynamic Tables. Configure target schema here.

***

## Snowflake Data Type Configuration

### Data Platform Data Type

**Data Platform Data Type (`DATA_PLATFORM_DATA_TYPE`)**

* Snowflake data type for this attribute
* Examples: `VARCHAR`, `VARCHAR(n)`, `NUMBER`, `NUMBER(p,s)`, `TIMESTAMP_NTZ`, `DATE`, `BOOLEAN`, `VARIANT`
* **Editable** - Override inferred type
* DataPancake infers from source data; override when inference is incorrect or you need specific types/precision

***

### Numeric Type Configuration

**Data Platform Data Type Precision (`DATA_PLATFORM_DATA_TYPE_PRECISION`)**

* For numeric types, precision (total number of digits)
* **Editable** - Applies to `DECIMAL`, `DEC`, `NUMERIC`, `NUMBER`
* Example: For `NUMBER(10,2)`, precision is 10

**Data Platform Data Type Scale (`DATA_PLATFORM_DATA_TYPE_SCALE`)**

* For numeric types, scale (number of decimal places)
* **Editable** - Applies to `DECIMAL`, `DEC`, `NUMERIC`, `NUMBER`
* Example: For `NUMBER(10,2)`, scale is 2

**Note:** Set based on known data ranges; avoid over-sizing (wastes storage).

***

### DateTime Configuration

**Data Platform Data Type DateTime Format (`DATA_PLATFORM_DATA_TYPE_DATETIMEFORMAT`)**

* Comma-separated list of valid Snowflake datetime formats
* Used for accurate datetime parsing
* **Editable** - Users can specify formats if inference is incorrect
* Example: `'MM/DD/YYYY', 'YYYY-MM-DD', 'MM-DD-YYYY HH24:MI:SS'`
* See [Snowflake datetime formats documentation](https://docs.snowflake.com/en/sql-reference/data-types-datetime#date-and-time-formats)

**Use DateTime Format (`USE_DATETIME_FORMAT`)**

* Boolean for using datetime formats in Dynamic Table SQL generation
* **Editable**
* `FALSE`: Uses `try_to_{data_type}` with `AUTO` detection
* `TRUE`: Uses `DATA_PLATFORM_DATA_TYPE_DATETIMEFORMAT` for parsing

**When to use formats:** Consistent formats, need precise control, `AUTO` unreliable.

**When to use AUTO:** Inconsistent/unknown formats, want Snowflake auto-detection.

***

### Key Identification

**Is Primary Key (`IS_PRIMARY_KEY`)**

* Boolean indicating if attribute is part of primary key
* **Editable** - Multiple attributes can be marked (composite keys)
* Used for metadata table generation and relationship tracking

**Has All Unique Values (`HAS_ALL_UNIQUE_VALUES`)**

* Boolean indicating if all values in this version are unique
* **Editable** - Mark based on data analysis
* Useful for identifying potential primary keys

***

### Data Quality Indicators

**Is Enum (`IS_ENUM`)**

* Boolean indicating if version contains only enum values
* **Editable** - Mark for categorical data (e.g., status codes)
* Useful for validation and documentation

**Has All Null Values (`HAS_ALL_NULL_VALUES`)**

* Boolean indicating if all values are null
* **Read-only** - Detected during scanning
* Useful for identifying unused attributes

***

## Reference Fields (Read-only)

Shown for reference in Destination Schema tab:

* `ATTRIBUTE_PATH` - Attribute identification
* `POLYMORPHIC_ATTRIBUTE_NAME` - Version name
* `SOURCE_DATA_TYPE` - Source type reference
* `SAMPLE_VALUE` - Data content reference
* `ATTRIBUTE_FOREIGN_KEY_COLUMNS` - Configured in Foreign Keys section

***

## Data Type Selection

**String types:**

* `VARCHAR` - Variable length without constraints
* `VARCHAR(n)` - Known maximum length
* `VARIANT` - Truly variable type, preserve original structure

**Numeric types:**

* Set precision/scale based on known data ranges
* Balance flexibility vs. storage efficiency
* Financial data: Use appropriate scale (typically 2-4 decimal places)

**DateTime types:**

* `DATE` - Date only
* `TIME` - Time only
* `TIMESTAMP_NTZ` - Timestamp without timezone
* `TIMESTAMP_LTZ` - Timestamp with local timezone
* `TIMESTAMP_TZ` - Timestamp with timezone

See [Snowflake data types documentation](https://docs.snowflake.com/en/sql-reference/data-types.html) for details.

***

## Common Scenarios

**Correcting incorrect type inference:**

1. Change `DATA_PLATFORM_DATA_TYPE` to correct type
2. Set `DATA_PLATFORM_DATA_TYPE_PRECISION` and `DATA_PLATFORM_DATA_TYPE_SCALE` if numeric
3. Verify with sample data

**Configuring datetime formats:**

1. Check `SAMPLE_VALUE` for actual format
2. Set `DATA_PLATFORM_DATA_TYPE_DATETIMEFORMAT` with correct format(s)
3. Set `USE_DATETIME_FORMAT = TRUE`
4. Test with code generation

**Setting primary keys:**

1. Identify attributes that uniquely identify records
2. Set `IS_PRIMARY_KEY = TRUE` (multiple for composite keys)
3. Verify uniqueness with `HAS_ALL_UNIQUE_VALUES`

**Optimizing numeric types:**

1. Analyze actual data ranges
2. Set `DATA_PLATFORM_DATA_TYPE_PRECISION` to minimum needed
3. Set `DATA_PLATFORM_DATA_TYPE_SCALE` appropriately




---

[Next Page](/llms-full.txt/1)

