SyncStudio
Documentation menu

Choosing the data

Tables, fields and filters, or a SQL query; templates; reshaping rows with SQL.

The second step of an import says what to read. There are three ways, and the preview at the end of the step shows the first rows, with each column's type, before anything is written to your sheet.

A table, its columns and filters

  1. Choose what to read A table, an object (such as Stripe's invoices) or a report, depending on the source. Its list comes from the source itself.
  2. Tick the columns Only ticked columns are read and written, in the order shown. Find a column narrows a long list.
  3. Add filters Under Filters, choose a column, a condition and a value. Every filter must hold for a row to be kept.
ConditionKeeps rows where the column…
is / is notequals, or does not equal, the value
> / <is greater, or smaller, than the value: numbers and dates
hascontains the value as text
= cellequals what a cell of your spreadsheet holds, read at each refresh. Write the cell as Config!B2. Change the cell, and the next refresh follows it.

A SQL query

For databases and warehouses you can write one SELECT statement instead. It runs read-only, so a statement that would change anything is refused by the source itself.

SELECT order_id, customer, total, created_at
FROM sales.orders
WHERE status = 'paid'
  • BigQuery shows what a query will scan, and roughly what that costs, before it runs. A query that would scan more than the connection's byte cap (10 GiB unless an admin changes it) is stopped before it runs. Sample rows are not shown for a query, because fetching them would run the query and bill it.
  • Only what changed (BigQuery): @syncstudio_last_run in a query is the time of the import's last refresh, so WHERE created_at >= @syncstudio_last_run reads only new rows. Use it with Append or Update by key.

Templates

Some sources offer templates for common reports. Start from a template fills in the table, columns and settings; you then choose which connection to read from. A template keeps only what your plan includes, such as its schedule.

Describe it instead

Where AI drafts are switched on, Describe what you need turns a sentence such as “revenue by month for the last year, excluding refunded orders” into a query for you to review. Only table and column names are sent to the model, never your rows. See AI that drafts imports.

Reshaping the rows with SQL

Reshape the rows with SQL (optional) runs a query over the rows an import has just read, from any source, before they are written. The rows are the table source.

SELECT customer_email, SUM(amount) AS total
FROM source
GROUP BY customer_email

It runs in a private, in-memory database that exists for one refresh; nothing is kept.

How much one import can hold

An import may write up to its plan's cells per import: rows multiplied by columns. On Free that is 50,000 cells; on Solo, 100,000. A larger result is not cut short: the refresh stops and says so, so filter or choose fewer columns. See Plans, limits and billing.