How the analytics copy works
Analytics keeps a copy of your Knack app in a database. Your BI tools read the copy instead of calling Knack, so reports are fast and don’t use your Knack API calls.
Set up analytics
- Open the app and click Set up analytics in the Analytics card.
- Choose where the data goes. See Choose a destination.
- Under Which objects?, tick the Knack tables to copy.
- Under Keeping it fresh, choose a schedule and check how changes are found for each table.
- Under Knack schema changes, choose how often VaultLens checks for new fields and tables.
- Review the estimate of API calls and time, then click Continue.
- Install the live sync snippet, then click Start clone. See Install the live sync snippet.
The first copy is called a clone. If it needs more API calls than your daily budget allows, it pauses and continues after each reset. The Cloned data tab then shows each table, its columns and some sample rows.
Tables and columns
- Each Knack table you choose becomes one database table.
- Names become lowercase with underscores.
Date of Appointmentbecomesdate_of_appointment. - Names are fixed once created. If you rename a field or table in Knack later, the column or table keeps its original name, so your reports don’t break.
- Each table has an
idcolumn holding the Knack record ID.
How Knack field types map
| Knack field | In the database |
|---|---|
| Short Text, Paragraph Text, Text Formula, Phone | Text |
| Rich Text | The HTML, plus a _plain column without tags |
| Multiple Choice | Text, or a list of labels when several can be chosen |
| Number, Currency, Rating, Sum, Min, Max, Average | Exact decimal number |
| Count, Auto Increment | Whole number |
| Yes/No | True or false |
| Date/Time | Date and time (or date only if the field ignores time), plus an _end column for date ranges |
| Name | _first, _last, _title, _middle and _full columns |
| Address | Street, city, state, zip, country, latitude, longitude and _full columns |
| Email, Link | The address or URL, plus a _label column |
| File, Image | File name, link, size and type. The file itself isn’t copied |
| Connection | _id and _label for single connections, plus _ids (a list) |
| Password | Never copied |
Connections where a record can link to several others also get a linking table named <table>__<field>. Use it to join the two tables.
Empty text is stored as empty (NULL), not as blank text. A value that can’t be read, such as text in a number field, is stored as empty, and the record is listed under Flagged records. See Scheduled syncs and schema changes.
In HIPAA workspaces, links to files and images aren’t stored. File names and sizes still are.
Columns VaultLens adds
| Column | What it means |
|---|---|
_deleted_at |
When the record was deleted in Knack. Empty means the record is live. |
_archived_at |
When the record was archived by VaultLens Archive. |
_synced_at |
When VaultLens last wrote a change to the row. |
_knack_modified_at |
When the record last changed in Knack, from the change-tracking field. |
_fetched_at |
When VaultLens last read the record from Knack. |
_row_hash |
A fingerprint of the row’s values, so unchanged rows aren’t rewritten. |
For current records only, filter on _deleted_at IS NULL.
Deleted records
By default, a record deleted in Knack stays in the database with _deleted_at set, so reports can still see history. To remove deleted rows instead, go to the app’s Settings tab and edit Records deleted in Knack. The change applies to deletes from then on.
Tables VaultLens uses to describe the copy
Tables starting with _vaultlens_ list each table, field and connection, with their Knack names and keys. _vaultlens_relationships shows how to join tables, which some BI tools can use to find joins automatically.
Plan limits
Each plan includes a number of records in analytics, counted across all apps. See Billing and plans.