Skip to main content
The SQL connector allows ingestion from a SQL table (E.g. Snowflake or BigQuery) into Pinot. This is done through the Pinot Minion framework, which will ingest data on a scheduled basis. The connector follows a pull model which will ingest data over a given time period. Currently, SQL ingestion from Snowflake and BigQuery is supported. A templatized SQL query must provided that contains a time filter using the BETWEEN operator like the following:
The filter BETWEEN $START AND $END must exist somewhere in the query. Joins in the templatized SQL are not supported at the moment.
The connector will continually ingest data from a user provided start time until the current time. The connector will attempt to process time periods since the last execution time.

Prerequisites

  • Data is assumed to be immutable after ingestion, since the connector uses watermark and segment time boundary metadata for one time ingestion.
  • SQL ingestion can only be enabled for offline Pinot tables.
  • The SQL source table should have a time column and the user must know the format of the time column (millisecondsSinceEpoch, secondsSinceEpoch, hoursSinceEpoch, or ISO format e.g. yyyy-MM-dd).

Pinot Table Configuration

The offline table task configs can be manually set with the following connection and ingestion parameters.

Snowflake connection parameters

All the following properties are required to establish connection with Snowflake.

BigQuery connection parameters

All the following properties are required to establish connection with BigQuery. In addition, a Google service account key must be exposed through the environment variable GOOGLE_APPLICATION_CREDENTIALS. For instructions on how to create a sercice account key, reference the Google cloud documentation.

Ingestion parameters

These ingestion parameters apply to all SQL connectors. Below is a sample task configuration for Snowflake ingestion: