Skip to main content

Filters

Filters restrict the data returned from a table or SQL query to match specific conditions. They can be applied to any table or query in an extraction.

Apply filters

  1. From the welcome screen or left navigation pane, select Extractions.
  2. Select an extraction from the list.
  3. Select the link under the Tables column.
  4. Select a table, then click the pencil icon in the Filter column.
  5. In the SQL Expression Builder, enter your filter condition. You can also use variables in conditions.
  6. Click Save.

Example

Use variables for dynamic filtering. For example, to return data for a specific year, use the @Year variable. DataSync returns only records where the Year field matches its value.

YEAR = @Year

Google Analytics filters

When using a Google Analytics source connection for View‑type tables, note these Google API limits:

  • Maximum: 10 metrics (measures) and 7 dimensions in a single query.
  • All columns are selected by default when adding a view.

To comply with these limits, review the selected columns and ensure they do not exceed the stated maximums. You can also filter data by date range in your query. Replace DATE_VALUE with the desired start and end dates:

StartDate='DATE_VALUE' AND EndDate='DATE_VALUE'
note

For details about Google Analytics query parameters, metrics, dimensions, and API responses, see the Google Analytics API documentation.