Status Update
Comments
ee...@splitdragon.com <ee...@splitdragon.com> #2
Hello,
Thank you for contacting the Google Cloud support team.
I have gone through your reported issue, however it seems like this is an issue observed specifically at your end within your project environment. It would need more specific debugging and analysis. To ensure a faster resolution and dedicated support for your issue, I kindly request you to file a support ticket by clicking
Please note that the Issue Tracker is primarily meant for reporting commonly observed issues and requesting new features. For individual support issues, it is best to utilize the support ticketing system. I'm going to close this issue which will no longer be monitored. If you have any additional issues or concerns, please don’t hesitate to create a new issue on the
Thank you, we appreciate your cooperation!
br...@premise.com <br...@premise.com> #3
ab...@google.com <ab...@google.com> #4
There is no specific ETA at this time, though we are working on it. Hopefully by the end of the quarter.
na...@spotai.co <na...@spotai.co> #5
We use bigquery for time series analysis, and we heavily use time partitions. Without timestamp type support on Avro/Protobuf, I cannot use a timestamp partitioned table with this subscription type as is -- instead I have to convert all my timestamps to INTs and use integer bucketing partitioning to hack the timestamp partition functionality.
I can imagine many users of bigquery also want to use time partitioning without the hack, especially for streaming tables.
au...@gmail.com <au...@gmail.com> #6
[Deleted User] <[Deleted User]> #7
We're just getting started with the bigQuery subscriptions and ran into this and are currently using the workaround.
defined our type for BigQuery as type = "INTEGER"
and our type for avro as type = "long", logicalType = "timestamp-micros"
I was hoping to report whether the workaround worked for us; however, we're also impacted by the lack of support for nullable fields when using schemas defined as avro with json encoding so, dead in the water on that part at the moment.
pr...@gmail.com <pr...@gmail.com> #8
[Deleted User] <[Deleted User]> #9
Is there issue created for nullable fields problem?
vi...@hurb.com <vi...@hurb.com> #10
ab...@google.com <ab...@google.com> #11
This week, we have released support for strings matching the time-based types in BigQuery. However, we are still working on support for Avro logical types for time, which are based on integers. We are hoping to have support completed by the end of October.
sc...@gmail.com <sc...@gmail.com> #12
[Deleted User] <[Deleted User]> #13
I tested two scenarios...
In the first one, I put the Avro schema in the same order as the fields in the pubsub message. In this test, I can publish the message, but the data does not appear in bigquery.
In the second, the Avro schema is in the same order as the table schema, but the pubsub message is in a different order. In this scenario, I get an error message saying that the field is incompatible with the Avro schema without specifying which one it is.
I only managed to make it work after everything was sorted... Table schema, Avro schema, and message content. Was it supposed to behave this way?
ab...@google.com <ab...@google.com> #14
Are your messages encoded in JSON or in Avro binary format?
ro...@gmail.com <ro...@gmail.com> #15
lv...@mednition.com <lv...@mednition.com> #16
We also saw the behavior where the key / value ordering in the published JSON message must match the ordering in the AVRO schema, otherwise you get the following error which took a while to debug:
> Invalid JSON-encoded message against Avro schema. Incorrect field
However, our Avro schema ordering is not the same as the BQ field ordering and that part didn't cause any problems.
Another small gotcha we ran into was we needed to map the long type in the avro schema to an int type in the BQ schema (which makes sense given the values we store).
br...@gmail.com <br...@gmail.com> #17
Had to add this quite a bit of code into ensure the same order for our Terraform for creating the schema/BigQuery table and the publishing client to ensure that the order is preserved in the generated jsons.
ab...@google.com <ab...@google.com> #18
Support for timestamp-micros, date, and time-micros is rolling out this week. Other types will be added in 2023Q3, though I expect we probably won't support the local variants of timestamp at any point. The documentation has been updated:
ab...@google.com <ab...@google.com> #19
The aforementioned support has rolled out.
b....@e-hps.com <b....@e-hps.com> #20
ap...@google.com <ap...@google.com> #21
ab...@google.com <ab...@google.com> #22
local-timestamp-micros is not a supported logical type, so the only way to represent this in BQ would be as a long. From that point on, I believe it is just up to the application to treat it as a local timestamp when querying in BigQuery.
ab...@google.com <ab...@google.com> #23
apratiksha@, I suspect they are not specifying the type correctly. One does not put "timestamp-micros" in the "type" field, but in the "logicalType" field. See
pe...@reedsy.com <pe...@reedsy.com> #24
I have this on my Avro schema:
{
"name" : "timestamp",
"type" : "long",
"logicalType" : "timestamp-micros"
}
But I'm still getting a Incompatible schema type for field timestamp: INT64 vs. TIMESTAMP
error when creating the PubSub subscription. What am I doing wrong?
ab...@google.com <ab...@google.com> #25
Is that type within a record type or the entire schema? What is the definition for the column in BigQuery? I have a schema defined as follows:
{
"type": "record",
"namespace": "unit.test",
"name": "Message",
"fields": [
{ "name": "time_micros_field", "type": { "type": "long", "logicalType": "timestamp-micros" }}
]
}
and a BigQuery table with the schema
[{
"name": "time_micros_field",
"type": "TIMESTAMP",
"mode": "NULLABLE"
}]
and the table creation works as expected.
pe...@reedsy.com <pe...@reedsy.com> #26
What I sent was the definition of just one the record fields. Looking at your example, I realized that the syntax on my Avro schema was wrong. So by replacing:
{
"name" : "timestamp",
"type" : "long",
"logicalType" : "timestamp-micros"
}
with
{
"name" : "timestamp",
"type" : { "type": "long", "logicalType": "timestamp-micros" }
}
the issue was fixed.
Thanks a lot for you help!
iv...@organization.gg <iv...@organization.gg> #27
Weird, I still cannot get this one working. I have defined entire schema like this:
{"name": "created_at", "type": {"type": "long", "logicalType": "timestamp-micros"}}
And bigquery is:
[{
"name": "created_at",
"type": "TIMESTAMP",
"mode": "NULLABLE"
}]
But I'm still getting this:
│ Error: Error creating Subscription: googleapi: Error 400: Incompatible schema type for field created_at: INT64 vs. TIMESTAMP
│ Details:
│ [
│ {
│ "@type": "type.googleapis.com/google.rpc.ErrorInfo",
│ "domain": "pubsub.googleapis.com",
│ "metadata": {
│ "actual_value": "TIMESTAMP",
│ "expected_value": "INT64",
│ "field_name": "created_at",
│ "reason": "INCOMPATIBLE_TYPE"
│ },
│ "reason": "INCOMPATIBLE_SCHEMA"
│ }
│ ]
ab...@google.com <ab...@google.com> #28
You need to define it as a record schema:
{
"type": "record",
"name": "Message",
"fields": [
{ "name": "created_at", "type": { "type": "long", "logicalType": "timestamp-micros" }}
]
}
sa...@facile.it <sa...@facile.it> #29
same issue here, with timestamp-millis too:
{
"name": "time",
"type": {
"type": "long",
"logicalType": "timestamp-millis"
}
}
and i'm getting: Error creating Subscription: googleapi: Error 400: Incompatible schema type for field time: INT64 vs. TIMESTAMP
so...@kauza.dk <so...@kauza.dk> #30
{
"name": "time",
"type": {
"type": "long",
"logicalType": "timestamp-millis"
}
}
Error: Error creating Subscription: googleapi: Error 400: Incompatible schema type for field UpdatedAt: INT64 vs. TIMESTAMP
│ Details:
│ [
│ {
│ "@type": "
│ "domain": "
│ "metadata": {
│ "actual_value": "TIMESTAMP",
│ "expected_value": "INT64",
│ "field_name": "UpdatedAt",
│ "reason": "INCOMPATIBLE_TYPE"
│ },
│ "reason": "INCOMPATIBLE_SCHEMA"
│ }
│ ]
ab...@google.com <ab...@google.com> #31
You are showing two different fields in your example: The field name in the topic schema is "time" and in the table is "UpdatedAt."
ha...@comparis.ch <ha...@comparis.ch> #32
si...@google.com <si...@google.com>
ab...@google.com <ab...@google.com>
_e...@partner.auchan.com <_e...@partner.auchan.com> #33
It was announced for 2023Q3, which ends in 1 month.
_e...@partner.auchan.com <_e...@partner.auchan.com> #34
2023Q3 is now over...
ab...@google.com <ab...@google.com> #35
The addition of decimal time was more difficult than anticipated. We are now hoping to launch in 2023Q4, though that may still slip. Once it is available, we will update this ticket.
ab...@google.com <ab...@google.com> #36
We now have support for the decimal
and duration
types. The only remaining types that we may support at some point are time-millis
and timestamp-millis
. We don't plan to support the local
variations of timestamp as they don't really make sense to translate to a TIMESTAMP
type since there is no notion of "local" time for the timestamp to which we'd convert.
Description
The BigQuery Subscription feature for Cloud Pub/Sub topics does not currently support [1] Avro logical types such as timestamps. For instance, if the user attempts writing from an Avro
timestamp-micros
field to a corresponding BQ table column of typeTIMESTAMP
, the subscription creation fails with the following error:Current Workaround: In BQ schema, use the type which corresponds to the underlying Avro field type, not the logical type (e.g. in the example above, use
INTEGER
columns for timestamp)Expected Behaviour: The values of fields with Avro logical types being converted to their corresponding type in BigQuery (e.g.
timestamp-micros
toTIMESTAMP
)[1]https://cloud.google.com/pubsub/docs/bigquery#schema_compatibility:~:text=The%20mapping%20from%20Avro%20logical%20type%20to%20a%20ZetaSQL%20type%20is%20not%20supported%20for%20the%20BigQuery%20subscription