Skip to content
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

Ingestion-time partitioning not (fully) supported #317

Open
fantastisch opened this issue May 21, 2024 · 1 comment
Open

Ingestion-time partitioning not (fully) supported #317

fantastisch opened this issue May 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@fantastisch
Copy link

What happened?

When trying the emulator, I came across a limitation for using ingestion-time partitioned tables. It seems the emulator does not create the _PARTITIONTIME and _PARTITIONDATE columns.

When I create an ingestion-time partitioned table, and try to insert rows (using the Streaming Insert API) directly to a partition (by appending $20240517), a BigQueryException is returned:

com.google.cloud.bigquery.BigQueryException: table some_table$20240517 is not found

When trying to run a query against an ingestion-time partitioned table that references the _PARTITIONTIME column, anothger exception is thrown:

com.google.cloud.bigquery.BigQueryException: failed to analyze: INVALID_ARGUMENT: Unrecognized name: _PARTITIONTIME [at 1:8]

What did you expect to happen?

  • the _PARTITIONTIME and _PARTITIONDATE columns should be created for ingestion-time partitioned tables.
  • the _PARTITIONTIME and _PARTITIONDATE columns should be filled based on the current time OR the specified partition
  • the _PARTITIONTIME and _PARTITIONDATE columns should be usable in queries

How can we reproduce it (as minimally and precisely as possible)?

  • create an ingestion-time partitioned table
  • insert a row directly into a partition (using table$YYYYmmdd) as destination table
  • running a query against the table should return a value for the _PARTITIONTIME field

Anything else we need to know?

No response

@fantastisch fantastisch added the bug Something isn't working label May 21, 2024
@ohaibbq
Copy link
Contributor

ohaibbq commented May 21, 2024

Thanks for the report! This can be merged with #152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants