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

🐛 [Stream Firestore to BigQuery] fs-bq-import-collection doesn't recognize partitioned field #2092

Open
ysak-y opened this issue May 13, 2024 · 2 comments
Labels
extension: firestore-bigquery-export Related to firestore-bigquery-export extension type: bug Something isn't working

Comments

@ysak-y
Copy link

ysak-y commented May 13, 2024

[REQUIRED] Step 2: Describe your configuration

  • Extension name: firestore-bigquery-export (storage-resize-images, firestore-send-email, etc)
  • Extension version: 0.1.49

[REQUIRED] Step 3: Describe the problem

When I install extension with following configuration, it creates BigQuery table with createdAt partitioned field.
スクリーンショット 2024-05-13 10 53 55

The important thing is its extension project id and BigQuery id is different (Cross-Platform BigQuery).

But When I run fs-bq-import-collection to backfill, it doesn't recognize any partitioned fields. The script shows following debug message.

{"severity":"WARNING","message":"Did not add partitioning to schema: Partitioning not enabled"}

Steps to reproduce:

Create Firestore table with createdAt TIMESTAMP field and Install extension with above configuration.

Expected result

fs-bq-import-collection recognize createdAt partition field and set it when importing.

Actual result

fs-bq-import-collection doesn't recognize createdAt partition field and set null to createAt field when importing.

@ysak-y ysak-y added the type: bug Something isn't working label May 13, 2024
@pr-Mais
Copy link
Member

pr-Mais commented May 27, 2024

From the POSTINSATALL:

Note: To enable partitioning for a Big Query database, the following fields are required:

 - Time Partitioning option type
 - Time partitioning column name
 - Time partiitioning table schema
 - Firestore document field name

`Clustering` will not need to create or modify a table when adding clustering options, this will be updated automatically.

You're expecting the table to be created with partitioning on createdAt, however the configuration doesn't specify that as a Time partitioning column name, the one you have is timestamp.

@pr-Mais pr-Mais added the extension: firestore-bigquery-export Related to firestore-bigquery-export extension label May 27, 2024
@KristofSochan
Copy link

Having the same issue. The bigquery table is partitioned (see below) but the following warning is thrown at the start of fs-bq-import-collection.

{"severity":"INFO","message":"BigQuery table with name users_raw_changelog already exists in dataset ***!"}
{"severity":"INFO","message":"Clustering removed on users_raw_changelog"}
{"severity":"WARNING","message":"Did not add partitioning to schema: Partitioning not enabled"}

image

Table Type
Partitioned
Partitioned by
DAY
Partitioned on field
creation_timestamp
Partition expiration
Partitions do not expire
Partition filter
Not required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: firestore-bigquery-export Related to firestore-bigquery-export extension type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants