Connect your warehouse
Everything in Asemic runs against your own warehouse: the model is derived there, queries execute there, and results are served from there. Connecting it is step one because nothing else can happen without it. It is also the reason your raw event data never leaves your infrastructure.
On a new project, the Data Model page shows a connection strip (“Step 0 — connect your warehouse to load tables”) and a single card: “Connect your database”. Select “Connect warehouse…” to open the “Connect your warehouse” dialog, then pick your provider.
BigQuery
Enter the “GCP Project ID” of the project that holds your event data, then choose an auth method:
Service account key (recommended)
Paste the service account’s JSON key. This is the right choice for anything durable: the connection is a workload identity that belongs to the project, not to a person, so it keeps working when individuals change teams or lose access.
The service account needs three grants:
- BigQuery Job User (
roles/bigquery.jobUser) on the project, so it can run queries. - BigQuery Data Viewer (
roles/bigquery.dataViewer) on your raw event datasets. - BigQuery Data Editor (
roles/bigquery.dataEditor) on the dataset where Asemic builds the model (you choose it during event setup).
The model’s dataset must be in the same BigQuery location as your event datasets: BigQuery cannot read from one location and write to another in a single query.
Google account (OAuth)
Select “Sign in with Google” and authorize. No key file; this is the fastest path when you’re evaluating. The signed-in account needs BigQuery access to the project’s data. For a connection your team relies on, prefer a service account.
Snowflake
Enter “Username”, “Password”, and the “JDBC URL” of your Snowflake account.
Test, then save
Select “Test connection” first (it verifies that Asemic can reach the warehouse with the credentials given), then “Save connection”. Testing before saving turns a mistyped project ID into a ten-second fix instead of a confusing failure later, during event discovery.
Once saved, the Data Model page loads your datasets and the next card appears: Set up events.
“Test connection” proves the warehouse answers; it does not prove the account can do everything a build needs. That check comes during event setup, once you have chosen the events dataset and the “Data model schema”: “Test destination” runs four probes and reports each one that fails, with the same message the real failure would produce:
- “Run queries”: the account can start a query job.
- “Read” the events dataset: it can list the dataset and read one of its tables (a dry run, so nothing is billed).
- “Create tables in” the model’s dataset: it creates and drops a scratch table there.
- “Same location”: both datasets are in the same location.
When all pass, it reports “Ready: the connected account can run queries”, followed by the datasets it checked.
When the warehouse refuses access
On BigQuery, a permission or setup problem is reported as a warehouse access error that names the account, the resource, and the role to grant. The publish console prefixes it with “warehouse access (code) — fix it in your warehouse:”, and a failed backfill shows the same message with the code in brackets. These errors are yours to fix in Google Cloud; running the same request again fails the same way until the setup changes.
| Code | What it means | Fix |
|---|---|---|
cannot_run_jobs | The account can’t start queries in the project (missing bigquery.jobs.create). | Grant BigQuery Job User (roles/bigquery.jobUser) on the project. |
cannot_read | The account can’t read a source table or see a dataset. | Grant BigQuery Data Viewer (roles/bigquery.dataViewer) on the dataset named. If the message is about BigQuery Storage read sessions, grant BigQuery Read Session User (roles/bigquery.readSessionUser) on the project. |
cannot_write | The account can’t create or write tables in the model’s dataset. | Grant BigQuery Data Editor (roles/bigquery.dataEditor) on that dataset. |
table_not_found | A table doesn’t exist, or the account can’t see it. | If it is one of Asemic’s model tables, publish the data model to create it. If it is a source table, check its name in the data model. |
dataset_not_found | A dataset doesn’t exist, or the account can’t see it. | Create it, or fix the dataset name in the data model. |
location_mismatch | The model’s dataset and your event datasets are in different BigQuery locations. | Create the model’s dataset in the same location as your events and point the data model at it. |
billing_disabled | The project has no billing, so it can’t run queries. | Enable billing for the project in the Google Cloud console. |
api_disabled | The BigQuery API is switched off in the project. | Enable it under APIs & Services in the Google Cloud console. |
credentials_invalid | BigQuery rejected the stored credentials: the key was deleted or rotated, or the Google sign-in was revoked. | Reconnect the warehouse in the project’s settings. |
access_denied | Denied for a reason not covered above. | Grant the permission named in the message. |
One related code is not a setup problem: quota_exceeded means BigQuery refused the query because a quota or rate limit was exceeded. It usually clears on its own and is safe to retry after a few minutes; if it keeps happening, raise the quota in the Google Cloud console.