Guides
Analytics tables from your code (preview)
How Quayen's analytics agent reads your application's models and migrations, proposes flat BigQuery tables, and keeps approved ones up to date.
Replicated tables are exact copies of MySQL, which makes them correct but not always easy to analyse: status codes need decoding, amounts need their currency, and most questions need joins. Quayen's analytics agent reads the code of the application that writes to your database and proposes flat tables that answer common questions directly.
1. Connect a repository
In Analytics, connect GitHub (install Quayen's app on the repositories you choose) or Bitbucket (read-only), pick the repository and the MySQL source it uses, and confirm the agent may read it.
2. What the agent reads
- Only files that describe data: ORM models, migrations, enums and constants, schema files, dbt models and report SQL.
- Never dependencies, build output, tests, or secret files such as
.envand keys; anything that looks like a credential is removed first. - It matches what it reads with your live MySQL schema and ignores anything that doesn't exist there.
Your code isn't stored. Quayen keeps what the agent learned, and every meaning links to the file and line it came from.
3. Review the proposals
Each proposal has one row per business entity (for example per order), joins only tables that can't multiply rows, summarises one-to-many details (item counts, totals), decodes status codes and leaves out personal data. Quayen writes the SQL itself from the proposal and lists anything it adjusted. Dismiss what you don't need.
4. Create it in BigQuery
Approve a proposal to have Quayen build it next to your replicated tables. After each pipeline refresh, only the rows whose source data changed are rebuilt, and the whole table is rebuilt once a day. The tables it reads must be in the pipeline.
Staying current
Every push to the main branch is analysed again, reading only the data files it changed; pushes that don't touch them cost nothing. Proposals you dismissed stay dismissed, and approved tables keep their definition until you rebuild or replace them.
Limitations
- Proposals are generated with AI and can be wrong. Check the meanings that matter before relying on them.
- Incremental refreshes need a single-column primary key on the base table; other tables are rebuilt on every refresh.