firebase / extensions

Source code for official Firebase extensions
https://firebase.google.com/products/extensions
Apache License 2.0
882 stars 374 forks source link

🐛 [firestore-bigquery-export] schema-views script doesn't work against multiple schema files #2087

Open KevinKera opened 1 month ago

KevinKera commented 1 month ago

Step 2: Describe your configuration

Step 3: Describe the problem

Steps to reproduce:

Setup the extension as mentioned in the documentation. Follow the instructions found in the GENERATE_SCHEMA_VIEWS guide until step 3.

There, the note says

Note: You can run the schema-views script from any directory, but you need to specify the path to your schema file using the --schema-files flag. To run the schema-views script against multiple schema files, specify each file in a comma-separated list (for example: --schema-files=./test_schema.json,./test_schema2.json).

However, when trying to run the script against multiple schema files, it doesn't work and it says the schema files aren't found. When running the same script several times keeping only one schema file (eg. --schema-files=./part_schema_all.json then --schema-files=./part_schema_consented.json), it works though. (this is the only change)

Expected result

Terminale output should be something like

BigQuery creating schema view participants_schema_part_schema_all_changelog:
# parameters
BigQuery created schema view participants_schema_part_schema_all_changelog
...
BigQuery creating schema view participants_schema_part_schema_all_latest:
# parameters
BigQuery created view participants_schema_part_schema_all_latest

BigQuery creating schema view participants_schema_part_schema_consented_changelog:
# parameters
BigQuery created schema view participants_schema_part_schema_consented_changelog
...
BigQuery creating schema view participants_schema_part_schema_consented_latest:
# parameters
BigQuery created view participants_schema_part_schema_consented_latest
done.
Actual result
No schema files found!
done.