You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "HaeSe0ng (via GitHub)" <gi...@apache.org> on 2023/07/04 01:43:20 UTC
[GitHub] [beam] HaeSe0ng opened a new issue, #27347: [Bug]: TIMESTAMP column validation error in BigQuery Storage Write API wrapper for Python SDK
HaeSe0ng opened a new issue, #27347:
URL: https://github.com/apache/beam/issues/27347
### What happened?
I tried to write 'TIMESTAMP' type with Storage Write API in Google BigQuery I/O connector (python sdk),
but I got an error message
```
java.lang.IllegalArgumentException: Input schema is not assignable to output schema.
Input schema=Fields:
.......
INFO 2023-07-03T09:27:24.015855Z Field{name=ts, description=, type=LOGICAL_TYPE<beam:logical_type:micros_instant:v1>, options={{}}}
.......
, Output schema=Fields:
.......
INFO 2023-07-03T09:27:24.016054Z Field{name=ts, description=, type=DATETIME, options={{}}}
.......
```
I looked into beam source codes and found that [input mapping](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/typehints/schemas.py#L36) and [output mapping](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java#L324) are not matched in the [schema validation code](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java#L414)). I think output mapping should be `FieldType.logicalType(SqlTypes.TIMESTAMP)`.
Is there a way to avoid this error, or is `TIMESTAMP` type not supported yet?
### Issue Priority
Priority: 3 (minor)
### Issue Components
- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] 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-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] HaeSe0ng closed issue #27347: [Bug]: TIMESTAMP column validation error in BigQuery Storage Write API wrapper for Python SDK
Posted by "HaeSe0ng (via GitHub)" <gi...@apache.org>.
HaeSe0ng closed issue #27347: [Bug]: TIMESTAMP column validation error in BigQuery Storage Write API wrapper for Python SDK
URL: https://github.com/apache/beam/issues/27347
--
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