Reference

Endpoint Get Table Schema


Name

get_table_schema

Description

Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. [API reference]

Parameters

Parameter Required Options
Name: DatasetId

Label: DatasetId

YES
Name: TableId

Label: TableId

YES
Name: Filter

Label: Filter

YES
Option Value
All Columns $.schema.fields[*]
Timestamp Columns $.schema.fields[?(@type=='TIMESTAMP')]

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
name DT_WSTR nvarchar(255) 255
type DT_WSTR nvarchar(255) 255
If the column you are looking for is missing, consider customizing Google BigQuery Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length 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 or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - Google BigQuery
Read / write Google BigQuery data inside your app without coding using easy to use high performance API Connector
Google BigQuery
Get Table Schema
Required Parameters
DatasetId Fill-in the parameter...
TableId Fill-in the parameter...
Filter Fill-in the parameter...
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Google BigQuery
Read / write Google BigQuery data inside your app without coding using easy to use high performance API Connector
Google BigQuery
Get Table Schema
Required Parameters
DatasetId Fill-in the parameter...
TableId Fill-in the parameter...
Filter Fill-in the parameter...
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Get table schema

SELECT * FROM get_table_schema
WITH
(
    "DatasetId" = 'abcd-1234-datasetid',
    "TableId" = 'abcd-1234-tableid',
    "Filter" = '$.schema.fields[*]'
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Get table schema

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_table_schema
WITH
(
    "DatasetId" = ''abcd-1234-datasetid'',
    "TableId" = ''abcd-1234-tableid'',
    "Filter" = ''$.schema.fields[*]''
)';

EXEC (@MyQuery) AT [LS_TO_GOOGLE_BIGQUERY_IN_GATEWAY];