Nested and Repeated Records
The Simba Google BigQuery ODBC Connector partially supports nested and repeated records.
In Standard SQL, the record is returned as a BigQuery string, and converted to SQL_VARCHAR. The Standard SQL syntax represents the sub-components of record data as nested sub-types. In the example below, city
and years
belong to the base record type of address
, and name
does not.
{
"v": { // "column" object
"f": [
{ // "address" value
"v": [ // "address" array
{ // "city" value
"v": "Vancouver"
},
{ // "years" value
"v": "5"
}
]
},
{ // "name" value
"v": "Google"
}
]
}
}
In Legacy SQL, the record is flattened by BigQuery before it is returned by the connector. The query returns the data as the schema of a flat table. All STRUCT members are their own columns, and all ARRAY members are expanded into as many rows as there are array elements.
- Features
- Data Types
- Language Dialect
- Configuring the Driver on page 1