You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "jubebo (via GitHub)" <gi...@apache.org> on 2023/06/19 14:07:38 UTC
[GitHub] [beam] jubebo commented on issue #27166: [Feature Request]: Add support for BigQuery structs in BigQueryIO with BEAM_ROW output type
jubebo commented on issue #27166:
URL: https://github.com/apache/beam/issues/27166#issuecomment-1597257928
I.e. the feature request would enable calling
```python
beam.io.ReadFromBigQuery(
project="your-project",
dataset="your-dataset",
table="your-table"
method=beam.io.ReadFromBigQuery.Method.DIRECT_READ,
flatten_results=False,
output_type="BEAM_ROW"
)
```
for tables with nested entries - e.g. tables with the following schema
```
<TableSchema
fields: [
<TableFieldSchema
fields: []
name: 'primitive_1'
type: 'INTEGER'>,
<TableFieldSchema
fields: []
name: 'primitive_2'
type: 'STRING'>,
<TableFieldSchema
fields: [
<TableFieldSchema
fields: []
name: 'nested_lv1_1'
type: 'STRING'>,
<TableFieldSchema
fields: []
name: 'nested_lv1_2'
type: 'STRING'>,
<TableFieldSchema
fields: [
<TableFieldSchema
fields: []
name: 'nested_lv2_1'
type: 'STRING'>,
<TableFieldSchema
fields: []
name: 'nested_lv2_2'
type: 'FLOAT'>]
mode: 'REPEATED'
name: 'nested_lv1_3'
type: 'RECORD'>]
mode: 'REPEATED'
name: 'nested'
type: 'RECORD'>]>
```
This schema would be the input to https://github.com/apache/beam/blob/5223ab466e78f403680a22036d3a769897d0cf9d/sdks/python/apache_beam/io/gcp/bigquery_schema_tools.py#L56 as discussed above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org