> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake Connector

> Store MQTT data in Snowflake cloud data warehouse for large-scale analytics

## Snowflake Overview

The `SNOWFLAKE` connector stores MQTT messages in Snowflake, a cloud-native data warehouse. It supports high-volume data ingestion with automatic scaling and powerful SQL analytics.

> [!NOTE]
>
> Snowflake is ideal for large-scale analytics, data lakes, and enterprise reporting. Use it when you need to analyze IoT data alongside other business data in the cloud.

## Basic Syntax

```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
DEFINE CONNECTOR SensorWarehouse WITH TYPE SNOWFLAKE
    ADD SNOWFLAKE_CONFIG
        WITH CONNECTION_STRING "account=myaccount;user=myuser;password=mypassword"
        WITH WAREHOUSE "COMPUTE_WH"
        WITH DATABASE "IOT_DATA"
        WITH SCHEMA "SENSORS"
    ADD EVENT StoreSensorReading
        WITH SOURCE_TOPIC "sensors/+/reading"
        WITH QUERY "INSERT INTO SENSOR_READINGS (TIMESTAMP, SENSOR_ID, VALUE) VALUES (CURRENT_TIMESTAMP(), '{sensor_id}', PARSE_JSON('{value.json}'))"
```

***

## Connection Configuration

### SNOWFLAKE\_CONFIG Parameters

**CONNECTION\_STRING** `string` *required*

Snowflake connection string with account, user, and password.

> [accordion] Connection Options
>
> **WAREHOUSE** `string`
>
> Snowflake compute warehouse name. Sent to Snowflake when the session opens.
>
> **DATABASE** `string`
>
> Target database name. Sent to Snowflake when the session opens.
>
> **SCHEMA** `string`
>
> Target schema name. Sent to Snowflake when the session opens. If you leave it out, the session uses the schema Snowflake gives your user.

> [accordion] Authentication
>
> **ROLE** `string`
>
> Snowflake user role. Sent to Snowflake when the session opens. A role that doesn't exist, or that your user can't use, makes the queries fail.

> [accordion] Performance
>
> **QUERY\_TIMEOUT** `integer`
>
> Query timeout in seconds. Default: 60.
>
> **POOL\_SIZE** `integer`
>
> Connection pool size. Default: 10. A value of 1 works.
>
> **MAX\_RETRY\_SECONDS** `integer`
>
> How long a `STORE IN` row is retried when the connection to Snowflake drops. Default: 300. `0` turns the retry off. See [When a row or query fails](#when-a-row-or-query-fails).

`WAREHOUSE`, `DATABASE`, `SCHEMA`, `ROLE`, and `POOL_SIZE` take effect: the broker adds them to the connection it opens, so you can keep them apart from `CONNECTION_STRING`.

* **The connection string wins.** If `CONNECTION_STRING` already sets the same key (`warehouse`, `db`, `schema`, `role`, or `maxPoolSize`, in any letter case), that value is used and the broker logs a warning at route start that names the ignored setting. `database=` in the connection string counts as `db=`.
* **No semicolons.** A `WAREHOUSE`, `DATABASE`, `SCHEMA`, or `ROLE` value that contains `;` makes adding the route fail with an error that names the setting. A route loaded from a file with such a value doesn't start.

```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
DEFINE CONNECTOR SensorWarehouse WITH TYPE SNOWFLAKE
    ADD SNOWFLAKE_CONFIG
        WITH CONNECTION_STRING "account=myaccount;user=myuser;password=mypassword"
        WITH WAREHOUSE "COMPUTE_WH"
        WITH DATABASE "IOT_DATA"
        WITH SCHEMA "SENSORS"
        WITH ROLE "IOT_WRITER"
```

> [!WARNING]
>
> **Never hardcode credentials in production.** Use environment variables and encrypted secrets to keep sensitive values out of your connector definitions:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> WITH CONNECTION_STRING GET SECRET "SNOWFLAKE_CONNECTION_STRING"
> ```
>
> See [Environment Variables & Secrets](https://docs.coreflux.org/latest/mqtt-broker/secrets-and-env.md) for setup and usage.

The broker log and the error reply of a connector that fails to add mask the `password`, `token`, `private_key_file`, and `private_key_pwd` values inside a quoted `CONNECTION_STRING` as `***`. The rest of the string, such as the account and user, stays readable.

***

## How placeholders are quoted

The broker places each placeholder in an event `QUERY` by the quotes around it. A publisher on the source topic can no longer change the SQL by putting SQL in the payload.

> [!WARNING]
>
> **Action:** Put every placeholder that carries text in single quotes (`WHERE status = '{payload}'`). Put a placeholder that names a table or column in double quotes (`FROM "{topic.2}"`). Quoted identifiers are case-sensitive: match the table's stored case. An unquoted placeholder must be a number, a comma-separated list of numbers, `true`, `false`, or `null`. Anything else, including a bare name such as `line_1`, refuses the event. The message names the placeholder.

| Where the placeholder sits | What happens to the value |
| - | - |
| Inside single quotes: `'{payload}'` | Quotes and backslashes in the value are escaped. |
| Inside double quotes: `"{topic.2}"` | Double quotes in the value are doubled. Use this for a table or column name. |
| Inside a dollar-quoted string: `$$…{payload}…$$` | A value that contains `$` refuses the event. |
| Unquoted: `VALUES ({value})` | Only a number, a comma-separated list of numbers, `true`, `false`, or `null`. |
| In a SQL comment | Left as written. |

`{env.NAME}` and `{secret.NAME}` are placed as written. A value that itself contains `{topic}` is stored as text and is not expanded again. The same rules on the other SQL engines are in [How placeholders are quoted](https://docs.coreflux.org/latest/connectors/data-storage/overview#how-placeholders-are-quoted). MongoDB and OpenSearch JSON queries place each value as one JSON value instead (see [OpenSearch placeholders](https://docs.coreflux.org/latest/connectors/data-storage/opensearch.md#placeholders)).

***

## Snowpipe Streaming

By default, `STORE IN` runs one SQL `INSERT` per message, so a warehouse must be running while data flows. Add an optional `SNOWPIPE_CONFIG` block and `STORE IN` sends its rows through Snowpipe Streaming instead. The broker batches rows per table, compresses them, and appends them over Snowflake's REST API. Storing needs no running warehouse.

Use it for a steady flow of rows from models. Events (`ADD EVENT`) still use the SQL connection and the warehouse, and a route without `SNOWPIPE_CONFIG` behaves as before.

```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
DEFINE CONNECTOR SnowflakeStream WITH TYPE SNOWFLAKE
    ADD SNOWFLAKE_CONFIG
        WITH CONNECTION_STRING "account=myorg-myaccount;user=COREFLUX_SVC;authenticator=snowflake_jwt;private_key_file=/run/secrets/rsa_key.p8;role=COREFLUX_ROLE"
        WITH DATABASE "IOT"
        WITH SCHEMA "RAW"
    ADD SNOWPIPE_CONFIG
        WITH BATCH_MAX_ROWS "1000"
        WITH BATCH_MAX_MS "1000"

DEFINE MODEL Reading
    ADD STRING "sensor_id"
    ADD DOUBLE "value"
    STORE IN "SnowflakeStream"
        WITH TABLE "READINGS"
```

### SNOWPIPE\_CONFIG parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `DATABASE` | string | none | Target database. If omitted, the broker uses `DATABASE` from `SNOWFLAKE_CONFIG`, then `db=` in the connection string. |
| `SCHEMA` | string | none | Target schema. Same fallback order as `DATABASE`. |
| `PIPE` | string | the table's default pipe, `<TABLE>-STREAMING` | A named streaming pipe. |
| `CHANNEL` | string | `ELASTIC` | Only `ELASTIC` is supported. Any other value is refused when you add the route. |
| `BATCH_MAX_ROWS` | integer | `1000` | Send a batch when it reaches this many rows. |
| `BATCH_MAX_MS` | integer | `1000` | Send a batch when its oldest row is this many milliseconds old. Minimum `10`. |
| `MAX_RETRY_SECONDS` | integer | `3600` | How long a batch is retried after a network error, HTTP 408, 429, or 5xx before it counts as failed. |
| `QUEUE_CAPACITY` | integer | `100000` | Rows that can wait to be sent. |

A batch is also cut before it reaches 4 MB. `WITH TABLE` can be `TABLE`, `SCHEMA.TABLE`, or `DB.SCHEMA.TABLE`; a name given there wins over `DATABASE` and `SCHEMA`.

### Requirements

* **Key-pair authentication only.** `CONNECTION_STRING` needs `account=`, `user=`, and `private_key_file=` (or `private_key=`, with `private_key_pwd=` for an encrypted key). Password sign-in isn't used for Snowpipe Streaming.
* **Database and schema.** They must come from one of the places listed above.
* **Privileges.** The role needs `INSERT` on the table. A named `PIPE` needs the privileges Snowflake lists for streaming pipes.
* **Columns.** Every model field needs a column of the same name. The broker adds a `timestamp` field when the model has none, as described in [Values from STORE IN](#values-from-store-in), and that added field needs no column. A `timestamp` field the model defines does need one.

A route with an invalid `SNOWPIPE_CONFIG` is refused when you add it, with the reason. A route loaded from a file with one doesn't start.

### Delivery

* **At least once.** A retried batch is sent again, so a row can arrive twice, for example after a timeout. Give the table a key if duplicates matter.
* **Rows are checked before they are sent.** Snowflake accepts an append before it reads the rows, then ignores a field with no column and drops a value that doesn't fit. So the broker reads the table's columns and checks each row first. A row with a field that has no column, or with text that isn't a number in a `NUMBER` or `FLOAT` column, isn't sent. It counts as failed, and the log and the route status name the column. Numeric text such as `"12"` is sent. A column added with `ALTER TABLE ... ADD COLUMN` is picked up without a restart, at most 30 seconds after a row names it. If the columns can't be read, for example because the role can't describe the table, rows are sent unchecked and the broker logs one warning.
* **Rejected rows are reported.** After sending, the broker reads the channel status and logs the rows Snowflake rejected while loading them, such as text in a `BOOLEAN` column. The route status shows them too.
* **Retries.** Network errors, HTTP 408, 429, and 5xx are retried with a growing delay up to `MAX_RETRY_SECONDS`. An expired token is renewed and the batch retried. Any other 4xx counts the batch as failed and logs Snowflake's error. While a batch is retrying, the route status shows the last error.
* **A full queue drops rows.** When `QUEUE_CAPACITY` rows are waiting, new `STORE IN` rows are dropped and counted instead of held in memory. The broker logs a warning with the running total, at most once a minute.
* **Rows that can't be sent**, such as a payload that isn't a JSON object, an invalid table name, or a row over 4 MB, aren't queued. They're counted and logged.
* **Stopping.** Stopping or removing the route sends queued rows for up to 8 seconds. Rows not acknowledged by then count as failed and are logged with their number.

***

## Writing Data

> [tab] Basic Storage
>
> Store sensor data in Snowflake:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> DEFINE CONNECTOR SensorWarehouse WITH TYPE SNOWFLAKE
>     ADD SNOWFLAKE_CONFIG
>         WITH CONNECTION_STRING "account=myaccount;user=iot_user;password=secure_password"
>         WITH WAREHOUSE "IOT_WH"
>         WITH DATABASE "IOT_DATA"
>         WITH SCHEMA "SENSORS"
>         WITH ROLE "IOT_WRITER"
>     ADD EVENT StoreReading
>         WITH SOURCE_TOPIC "sensors/+/reading"
>         WITH DESTINATION_TOPIC "snowflake/status"
>         WITH QUERY "INSERT INTO SENSOR_READINGS (TIMESTAMP, SENSOR_ID, VALUE) VALUES (CURRENT_TIMESTAMP(), '{sensor_id}', PARSE_JSON('{value.json}'))"
> ```

> [tab] With Connection Pool
>
> Optimized for high throughput:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> DEFINE CONNECTOR HighVolumeWarehouse WITH TYPE SNOWFLAKE
>     ADD SNOWFLAKE_CONFIG
>         WITH CONNECTION_STRING "account=myaccount;user=iot_user;password=secure_password"
>         WITH WAREHOUSE "IOT_WH"
>         WITH DATABASE "IOT_DATA"
>         WITH SCHEMA "EVENTS"
>         WITH QUERY_TIMEOUT '60'
>         WITH POOL_SIZE '20'
>     ADD EVENT StoreEvents
>         WITH SOURCE_TOPIC "events/#"
>         WITH QUERY "INSERT INTO EVENT_LOG (TIMESTAMP, TOPIC, PAYLOAD) VALUES (CURRENT_TIMESTAMP(), '{source_topic}', PARSE_JSON('{value.json}'))"
> ```

> [tab] Multiple Tables
>
> Connector to different tables:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> DEFINE CONNECTOR MultiTableWarehouse WITH TYPE SNOWFLAKE
>     ADD SNOWFLAKE_CONFIG
>         WITH CONNECTION_STRING "account=myaccount;user=iot_user;password=secure_password"
>         WITH WAREHOUSE "IOT_WH"
>         WITH DATABASE "IOT_DATA"
>         WITH SCHEMA "PUBLIC"
>
>     ADD EVENT StoreSensors
>         WITH SOURCE_TOPIC "sensors/#"
>         WITH QUERY "INSERT INTO SENSORS (TS, TOPIC, DATA) VALUES (CURRENT_TIMESTAMP(), '{source_topic}', PARSE_JSON('{value.json}'))"
>
>     ADD EVENT StoreAlerts
>         WITH SOURCE_TOPIC "alerts/#"
>         WITH QUERY "INSERT INTO ALERTS (TS, TOPIC, DATA) VALUES (CURRENT_TIMESTAMP(), '{source_topic}', PARSE_JSON('{value.json}'))"
> ```

> [tab] UPSERT
>
> Snowflake uses `MERGE INTO` to insert or update depending on whether a matching row exists:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> DEFINE CONNECTOR DeviceRegistry WITH TYPE SNOWFLAKE
>     ADD SNOWFLAKE_CONFIG
>         WITH CONNECTION_STRING "account=myaccount;user=iot_user;password=secure_password"
>         WITH WAREHOUSE "IOT_WH"
>         WITH DATABASE "IOT_DATA"
>         WITH SCHEMA "DEVICES"
>     ADD EVENT RegisterDevice
>         WITH SOURCE_TOPIC "devices/+/registered"
>         WITH QUERY "MERGE INTO DEVICES AS target USING (SELECT '{value.json.device_id}' AS device_id, '{value.json.name}' AS name, '{value.json.area}' AS area) AS source ON target.DEVICE_ID = source.device_id WHEN MATCHED THEN UPDATE SET NAME = source.name, AREA = source.area, UPDATED_AT = CURRENT_TIMESTAMP() WHEN NOT MATCHED THEN INSERT (DEVICE_ID, NAME, AREA, ACTIVE, UPDATED_AT) VALUES (source.device_id, source.name, source.area, TRUE, CURRENT_TIMESTAMP())"
> ```

> [tab] UPDATE
>
> Modify existing records when a status change arrives:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> DEFINE CONNECTOR DeviceRegistry WITH TYPE SNOWFLAKE
>     ADD SNOWFLAKE_CONFIG
>         WITH CONNECTION_STRING "account=myaccount;user=iot_user;password=secure_password"
>         WITH WAREHOUSE "IOT_WH"
>         WITH DATABASE "IOT_DATA"
>         WITH SCHEMA "DEVICES"
>     ADD EVENT UpdateDeviceStatus
>         WITH SOURCE_TOPIC "devices/+/status"
>         WITH QUERY "UPDATE DEVICES SET CURRENT_STATUS = '{value.json.status}', LAST_SEEN = CURRENT_TIMESTAMP() WHERE DEVICE_ID = '{value.json.device_id}'"
> ```

> [tab] DELETE
>
> Remove records on a decommission or cleanup event:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> DEFINE CONNECTOR DeviceRegistry WITH TYPE SNOWFLAKE
>     ADD SNOWFLAKE_CONFIG
>         WITH CONNECTION_STRING "account=myaccount;user=iot_user;password=secure_password"
>         WITH WAREHOUSE "IOT_WH"
>         WITH DATABASE "IOT_DATA"
>         WITH SCHEMA "DEVICES"
>     ADD EVENT DecommissionDevice
>         WITH SOURCE_TOPIC "devices/+/decommissioned"
>         WITH QUERY "DELETE FROM DEVICES WHERE DEVICE_ID = '{value.json.device_id}' AND ACTIVE = FALSE"
> ```

> [!NOTE]
>
> **Alternative: STORE IN with Models** — Instead of writing EVENT queries, you can bind a [model](https://docs.coreflux.org/latest/lot-language/models/overview) directly to this connector. Every `PUBLISH MODEL` call automatically inserts a row — no query needed:
>
> ```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> DEFINE MODEL SensorReading
>     ADD STRING "sensor_id"
>     ADD DOUBLE "value"
>     STORE IN "SensorWarehouse"
>         WITH TABLE "SENSOR_READINGS"
> ```
>
> See [Data Storage Overview](https://docs.coreflux.org/latest/connectors/data-storage/overview#with-models-store-in) for the full STORE IN workflow.

### Values from STORE IN

`STORE IN` sends each value to Snowflake as a bound parameter, never as part of the SQL text. The row is stored exactly as published: backslashes (`C:\dados\`, `a\nb`), single and double quotes, `$$`, accents, and emoji arrive unchanged.

* Text stays text. A string such as `2026-11-18T10:00:00+01:00` is stored as published and is not reformatted.
* Numbers and booleans keep their published digits.
* If the payload has no `timestamp` field, the broker adds one in ISO-8601 UTC. A `timestamp` you publish is kept.

```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
DEFINE MODEL FilePath
    ADD STRING "path"
    STORE IN "SensorWarehouse"
        WITH TABLE "FILE_PATHS"
```

Publishing the JSON `{"path": "C:\\dados\\"}` stores `C:\dados\` in the `PATH` column.

> [!NOTE]
>
> The bound values apply to `STORE IN`. Values in an event `QUERY` follow [How placeholders are quoted](#how-placeholders-are-quoted).

### When a row or query fails

These rules apply to a connector without `SNOWPIPE_CONFIG`. Snowpipe Streaming has its own [Delivery](#delivery) rules.

* **A row with no data isn't stored.** If every value of a row is empty or `null`, or the payload is `{}`, empty, or not JSON, no row is written. The failure is logged with the table name and counted in the route status. The added `timestamp` doesn't count as data. A row with at least one value is stored, empty fields included.
* **`null` is stored as SQL `NULL`.** An empty string `""` stays an empty string. A field the model doesn't have is left out of the `INSERT` and takes the column default. `GET JSON ... AS STRING` turns a missing key into `""`, so leave out the type when the column must be `NULL`.
* **A row in flight when the connection drops is retried** with a growing delay for up to `MAX_RETRY_SECONDS` (300 by default). While it retries, the route status shows the error. If time runs out or the connector stops, the row is logged as lost and the model's `ON ERROR` runs. A statement Snowflake refused, such as an unknown column or a `QUERY_TIMEOUT`, isn't retried.
* **A failed event query publishes nothing.** When a `SELECT` fails or exceeds `QUERY_TIMEOUT`, nothing goes to `DESTINATION_TOPIC` and the error is logged. `[]` always means the query ran and returned no rows. Only a lost connection marks the connector Disconnected.

> [!WARNING]
>
> **At least once.** If the connection drops after Snowflake ran the `INSERT` but before the reply arrived, the retried row is stored twice. Give the table a key if duplicates matter. Snowflake also reports a failed sign-in, such as a wrong key, as a connection error, so that is retried for `MAX_RETRY_SECONDS` too. Each retry is logged with Snowflake's error. Rows wait in memory while they retry, so lower `MAX_RETRY_SECONDS` on a connector with a high message rate.

***

## Reading Data

EVENTs also support SELECT queries to read data back from the database. Publish a message to the event's `SOURCE_TOPIC`, and the query result is published to `DESTINATION_TOPIC`:

```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
DEFINE CONNECTOR SensorWarehouse WITH TYPE SNOWFLAKE
    ADD SNOWFLAKE_CONFIG
        WITH CONNECTION_STRING "account=myaccount;user=myuser;password=mypassword"
        WITH WAREHOUSE "COMPUTE_WH"
        WITH DATABASE "IOT_DATA"
        WITH SCHEMA "SENSORS"
    ADD EVENT GetLatestReading
        WITH SOURCE_TOPIC "db/query/latest"
        WITH DESTINATION_TOPIC "db/result/latest"
        WITH QUERY "SELECT SENSOR_ID, VALUE FROM SENSOR_READINGS WHERE SENSOR_ID = '{payload}' ORDER BY TIMESTAMP DESC LIMIT 1"
```

To trigger this query, publish the sensor ID to the source topic:

```
Topic:   db/query/latest
Payload: temp001
```

The query result is published to `db/result/latest`, where your actions or external clients can consume it.

### Timed Polling

EVENTs can also run SELECT queries on a fixed schedule using `WITH EVERY`:

```lot wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
DEFINE CONNECTOR DeviceRegistry WITH TYPE SNOWFLAKE
    ADD SNOWFLAKE_CONFIG
        WITH CONNECTION_STRING "account=myaccount;user=iot_user;password=secure_password"
        WITH WAREHOUSE "IOT_WH"
        WITH DATABASE "IOT_DATA"
        WITH SCHEMA "DEVICES"
    ADD EVENT PollActiveDevices
        WITH EVERY 30 SECONDS
        WITH DESTINATION_TOPIC "dashboard/devices/active"
        WITH QUERY "SELECT DEVICE_ID, NAME, CURRENT_STATUS, LAST_SEEN FROM DEVICES WHERE ACTIVE = TRUE ORDER BY NAME"
```

***

## Table Schema Examples

```sql wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
-- Sensor readings with VARIANT for JSON
CREATE TABLE SENSOR_READINGS (
    ID NUMBER AUTOINCREMENT,
    TIMESTAMP TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP(),
    SENSOR_ID VARCHAR(50),
    VALUE VARIANT
);

-- Event log
CREATE TABLE EVENT_LOG (
    ID NUMBER AUTOINCREMENT,
    TIMESTAMP TIMESTAMP_NTZ DEFAULT CURRENT_TIMESTAMP(),
    TOPIC VARCHAR(255),
    PAYLOAD VARIANT
);
```

***

## Connection String Format

```
account=<account_identifier>;user=<username>;password=<password>
```

| Component | Description |
| - | - |
| `account` | Snowflake account identifier (e.g., `xy12345.us-east-1`) |
| `user` | Snowflake username |
| `password` | User password |

***

## Troubleshooting

> [accordion] Connection Failed
>
> * Verify account identifier is correct
> * Check username and password
> * Ensure warehouse exists and is running
> * Verify network allows Snowflake connections

> [accordion] Permission Errors
>
> * Verify ROLE has INSERT permissions
> * Check user has access to WAREHOUSE
> * Ensure user can access DATABASE and SCHEMA

> [accordion] Query Timeout
>
> * Increase QUERY\_TIMEOUT value
> * Check warehouse size is adequate
> * Verify warehouse is not suspended

***

## Next Steps

> [card] [Data Storage Connectors Overview](https://docs.coreflux.org/latest/connectors/data-storage/overview)
>
> Compare all storage options.

> [card] [File Storage Connector](https://docs.coreflux.org/latest/connectors/data-storage/file-storage.md)
>
> Configure local file storage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.