Get Query Schema (From SQL)
Name
get_query_schema
Description
Runs a BigQuery SQL query synchronously and returns query schema [API reference]
Parameters
Parameter | Label | Required | Options | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sql | SQL Query | YES | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filter | Filter | YES | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
useLegacySql | Use Legacy SQL Syntax? | NO |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeoutMs | timeout (Milliseconds) | NO |
|
Wait until timeout is reached. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Location | Job Location | NO |
|
The geographic location where the job should run. For Non-EU and Non-US datacenters we suggest you to supply this parameter to avoid any error. [API reference] |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
name |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
type |
DT_WSTR
|
nvarchar(255)
|
255 | False |
If the column you are looking for is missing, consider customizing Google BigQuery Connector.
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Google BigQuery Connector in API Source component to read data or in API Destination component to read/write data:
Get Query Schema (From SQL) using API Source
Google BigQuery
Get Query Schema (From SQL)

Get Query Schema (From SQL) using API Destination
Google BigQuery
Get Query Schema (From SQL)

ODBC application
Use these SQL queries in your ODBC application data source:
Get query schema
SELECT * FROM get_query_schema
WITH
(
"Sql" = 'SELECT title,id,language,wp_namespace,reversion_id ,comment,num_characters FROM bigquery-public-data.samples.wikipedia LIMIT 1000',
"Filter" = '$.schema.fields[*]'
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get query schema
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_query_schema
WITH
(
"Sql" = ''SELECT title,id,language,wp_namespace,reversion_id ,comment,num_characters FROM bigquery-public-data.samples.wikipedia LIMIT 1000'',
"Filter" = ''$.schema.fields[*]''
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_BIGQUERY_IN_GATEWAY];