ZwxwZ opened a new issue, #35625:
URL: https://github.com/apache/beam/issues/35625

   ### What happened?
   
   now we create a table on GCP bigquery, and the definition like that
   ```
   CREATE TABLE dataset.my_table (
     field1 STRING,
     field2 INT64,
     3field STRING (field name start with number)
   );
   ```
   
   bigquery support the field name start with number
   > Column names 
   A column name can contain letters (a-z, A-Z), numbers (0-9), or underscores 
(_), and it must start with a letter or underscore. If you use flexible column 
names, BigQuery supports starting a column name with a number. Exercise caution 
when starting columns with a number, since using flexible column names with the 
BigQuery Storage Read API or BigQuery Storage Write API requires special 
handling. For more information about flexible column name support, see 
[flexible column 
names](https://cloud.google.com/bigquery/docs/schemas#flexible-column-names).
   see [bq doc](https://cloud.google.com/bigquery/docs/schemas)
   
   
   table create successfully, 
   
   
   but when i use beam bigqueryIO(java SDK) to insert data to this table,
   
   there have a error 
   ```com.google.protobuf.Descriptors$DescriptorValidationException: 
Def8527cc_xxxx.3field: "3field" is not a valid identifier.```
   look like the protobuf don't support this field name which name start with 
number.
   
   
   part of insert code
    
   ```
        .apply("WriteToBQ", BigQueryIO.writeTableRows()
          .to("your-project:dataset.table")
          .withoutValidation()
          .writeMethod(BigQueryIO.Write.METHOD.STORAGE_API_AT_LEAST_ONCE)
          .withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND)
          
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_NEVER)
          .withProgateSuccessfulStorageApiWrites(true)
        );
   ```
   
   
   so i am asking if there have any method, so that i can insert data to the 
field which name start with number
   
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [x] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [x] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [x] Component: Google Cloud Dataflow Runner


-- 
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-unsubscr...@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to