Before connecting Snowflake
TTSQL's Snowflake adapter uses Snowflex through ODBC. The deployment needs Erlang ODBC and an installed Snowflake ODBC driver. Supply the account, username, password and database; configure the appropriate warehouse, schema and role for your environment.
Confirm that the selected role can use the warehouse and read the intended tables. An available SQL dialect does not imply that the hosted deployment's driver or your account's authentication method has been configured. The current adapter is configured around username/password credentials; do not assume a key-pair or OAuth setup is interchangeable.
Give the prompt the right dialect and context
Use database.schema.table when the session defaults could be ambiguous. Unquoted Snowflake identifiers resolve in uppercase; double quotes preserve exact case. String literals use single quotes.
Distinguish TIMESTAMP_NTZ, TIMESTAMP_LTZ and TIMESTAMP_TZ. These examples assume UTC values stored without a time zone, as TIMESTAMP_NTZ. A local-time timestamp can change reporting boundaries with the session time zone.
Schema used in these examples
customers(id INTEGER PRIMARY KEY, name TEXT, country TEXT); orders(id INTEGER PRIMARY KEY, customer_id INTEGER REFERENCES customers(id), ordered_at TIMESTAMP, status TEXT, total DECIMAL(12,2)). Each order has one customer. total is the order amount in a single reporting currency; paid means recognized revenue in this teaching dataset. Timestamps use UTC. These are example tables, not tables TTSQL creates.
Translate TEXT and TIMESTAMP to equivalent column types for your engine. Use your own database, schema and table qualifiers. Each example states its reporting grain and sorting rule.
Review these Snowflake details
A small result limit does not mean small warehouse work. Review joins, filters and query profiles for large reporting scans, and choose a warehouse appropriate to the workload.
QUALIFY is a Snowflake-supported clause rather than portable ANSI SQL. When moving this query to PostgreSQL or MySQL, place the window expression in a CTE or subquery and filter it outside.
Generate, review, then choose whether to run
Select the matching database type and confirm your project's schema context before generating. Review the returned SQL against the schema and the metric you intended. A successful connection test does not prove that every table or operation is authorized.
TTSQL's POST /api/v1 endpoint generates SQL and returns executed: false. Query execution is a separate manual Run action in the workspace, subject to the configured connection and policies. The examples below are educational SELECT statements, not live results from your database.
Official Snowflake references
Check your engine version and account configuration when adapting a function or connection setting.