> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Snowflake

Supports:
* ✅ Models
* ✅ Model sync destination
* ✅ Bulk sync source
* ✅ Bulk sync destination




## Connection

### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>account</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Account identifier<br/><br/>e.g. FRXJLEC-UJA94780</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>dbname</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Database</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>key_pair_auth</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Use key pair authentication  <a href="#key-pair-auth">↓</a></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>params</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Additional parameters (optional)<br/><br/>Additional connection parameters, formatted as a query string</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Password</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>use_bulk_sync_staging_schema</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Use custom bulk sync staging schema <a href="#use-bulk-sync-staging-schema">↓</a></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>username</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Username</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>warehouse</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Compute warehouse (optional)</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>

<h4 id="use-bulk-sync-staging-schema">`use_bulk_sync_staging_schema`</h4>

<h5 id="use-bulk-sync-staging-schema-true">When `use_bulk_sync_staging_schema` is `true`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bulk_sync_staging_schema</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Staging schema name</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>


<h4 id="key-pair-auth">`key_pair_auth`</h4>

<h5 id="key-pair-auth-true">When `key_pair_auth` is `true`</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>private_key</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Private key</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>private_key_passphrase</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Private key passphrase (optional)</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>



#### Example

```json
{
  "name": "Snowflake connection",
  "type": "snowflake",
  "configuration": {
    "account": "FRXJLEC-UJA94780",
    "dbname": "database_name",
    "key_pair_auth": false,
    "params": "",
    "password": "password",
    "use_bulk_sync_staging_schema": false,
    "username": "user",
    "warehouse": "warehouse"
  }
}
```

## Model Sync
### Source
#### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>query</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;"></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>schema</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Schema</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>table</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Table</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>view</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">View</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>


#### Example
```json
{
  ...
  "configuration": {
    "query": "SELECT * FROM sampledata.users",
    "schema": "sampledata",
    "table": "users",
    "view": "active_users"
  }
}
```

### Target
Snowflake connections may be used as the destination in a model sync.
#### All targets

##### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>created_column</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">'Created at' timestamp column</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>preserve_table_on_resync</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Preserve destination table when resyncing</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>updated_column</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">'Updated at' timestamp column</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>write_null_values</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Copy null values<br/><br/>When enabled updates will set fields to NULL when the source value is null</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>write_record_timestamps</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Write row timestamp metadata</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>


##### Example
```json
{
  ...
  "target": {
      "configuration": {
        "created_column": "",
        "preserve_table_on_resync": false,
        "updated_column": "",
        "write_null_values": false,
        "write_record_timestamps": false
    }
  }
}
```





### Target creation

Snowflake connections may be used to create a new target for a model sync. The
following parameters are required to create a new target:

<table>
<thead>
<tr>
  <th>NAME</th>
  <th>DESCRIPTION</th>
  <th>ENUM</th>
</tr></thead>
<tbody>
<tr>
  <td>name</td>
  <td>Table name</td>
  <td>false</td>
</tr>

</tbody>
</table>




## Bulk Sync
### Source
Snowflake connections may be used as a bulk sync source. No additional configuration options are required.

### Destination
#### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>advanced</code></td>
<td><code>object</code></td>
<td style="vertical-align: top;"></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>mirror_schemas</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Mirror schemas</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>schema</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Output schema</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>


#### Example
```json
{
  ...
  "destination_configuration": {
    "advanced": {
        "empty_strings_null": false,
        "hard_deletes": false,
        "initial_execution": "",
        "set_output_table_as_transient": false,
        "table_prefix": "",
        "truncate_existing": false
    },
    "mirror_schemas": false,
    "schema": "schema"
  }
}
```



## Type handling
### Destination types
|       POLYTOMIC TYPE        |      SNOWFLAKE TYPE       |
|-----------------------------|---------------------------|
| `array<>`                   | `ARRAY`                   |
| `bigint`                    | `NUMBER(38,0)`            |
| `boolean`                   | `BOOLEAN`                 |
| `date`                      | `DATE`                    |
| `datetime`                  | `TIMESTAMP_NTZ(9)`        |
| `decimal(precision, scale)` | `NUMBER(precision,scale)` |
| `double`                    | `FLOAT`                   |
| `int`                       | `NUMBER(38,0)`            |
| `json`                      | `VARIANT`                 |
| `jsonarray`                 | `ARRAY`                   |
| `number`                    | `NUMBER(38,18)`           |
| `object{}`                  | `VARIANT`                 |
| `single`                    | `FLOAT`                   |
| `smallint`                  | `NUMBER(38,0)`            |
| `string`                    | `VARCHAR(134217728)`      |
| `time`                      | `TIME`                    |


### Source types
|       SNOWFLAKE TYPE       |       POLYTOMIC TYPE        |
|----------------------------|-----------------------------|
| `BIGINT`                   | `bigint`                    |
| `BYTEINT`                  | `smallint`                  |
| `DATE`                     | `date`                      |
| `DEC`                      | `number`                    |
| `DECIMAL`                  | `number`                    |
| `DOUBLE`                   | `double`                    |
| `DOUBLE PRECISION`         | `double`                    |
| `FIXED`                    | `number`                    |
| `FLOAT`                    | `double`                    |
| `FLOAT4`                   | `double`                    |
| `FLOAT8`                   | `double`                    |
| `INT`                      | `int`                       |
| `INTEGER`                  | `int`                       |
| `NUMBER`                   | `number`                    |
| `NUMBER(precision, scale)` | `decimal(precision, scale)` |
| `NUMERIC`                  | `number`                    |
| `OBJECT`                   | `json`                      |
| `REAL`                     | `double`                    |
| `SMALLINT`                 | `smallint`                  |
| `TIME`                     | `time`                      |
| `TIMESTAMP_LTZ`            | `datetime_tz`               |
| `TIMESTAMP_NTZ`            | `datetime`                  |
| `TIMESTAMP_TZ`             | `datetime_tz`               |
| `TINYINT`                  | `smallint`                  |