Before connecting BigQuery
Configure the Google Cloud project and BigQuery dataset. TTSQL's adapter uses GoogleSQL through the BigQuery API and obtains an application-default Google credential through Goth on the TTSQL server. Your deployment operator must configure that cloud identity and its permissions; entering a dataset name alone does not supply authentication.
The identity needs permission to create query jobs in the billing project and read the target data. Set the dataset location correctly. The adapter accepts location and maximum_bytes_billed connection settings; availability of a setting in your interface depends on the deployed configuration.
Give the prompt the right dialect and context
Use backticks around fully qualified names such as `your-project.analytics.orders`. Replace this example project and dataset with yours. GoogleSQL single quotes delimit string values; PostgreSQL's ::date shorthand is not the syntax used here.
These examples use ordered_at as a BigQuery TIMESTAMP. DATE(ordered_at, 'UTC') explicitly defines the calendar day. Use the business's IANA time zone instead of UTC only when that is the agreed reporting definition.
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 BigQuery details
A LIMIT is not a dependable cost control for a scan. Use appropriate partition filters, inspect estimated bytes with BigQuery's planning or dry-run facilities, and apply a bytes-billed limit where configured.
UNNEST multiplies parent rows when arrays contain several elements. Before summing an order-level total across nested items, determine whether to aggregate the items first or use item-level measures. TTSQL generation does not prove the query's cost or nested-data grain.
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 BigQuery references
Check your engine version and account configuration when adapting a function or connection setting.