-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Reading from BigQuery provides inconsistent schemas #28151
Comments
This occurs when using the BigQuery streaming write API too. My bigquery.Timestamp schema field type is translated to DATETIME which is causing an input schema output schema mismatch error. bigquery.Timestamp seems to stem from python The thread here seems to suggest it's been fixed but this might be in a pre-release not current (2.49.0 at the time of writing). Do we have an ETA on this fix? We can use the legacy streaming API but data in the streaming buffer is not queryable for ~2-3 minutes removing the possibility of any sort of real time queries. |
@JoeCMoore For BigQuery streaming write API use case please try add
before pipeline creation. This would solve the issue. This was due to #22679 makes the source-of-truth for shcema translation to be in python side, and then logical types with same language types has conflict (MillisInstant, MicrosInstant). This workaround was used to fix tests: b0484e7 I see this reports a couple of times. Indeed we need to figure out a way for long term fix |
@Abacn is there a way to fix this long term? it seems like we should just have millisinstant |
What happened?
When doing a BigQuery Read like
the TIMESTAMP fields are converted to fields of schema type
Field{name=event_timestamp, description=, type=LOGICAL_TYPE<beam:logical_type:micros_instant:v1>, options={{}}}
whereas in Java they are converted into (incompatible) fields of schema typeField{name=event_timestamp, description=, type=DATETIME, options={{}}}
.The Python one is probably the one that is wrong here. In addition, one cannot write elements of this type to another BigQuery table as one gets
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
The text was updated successfully, but these errors were encountered: