firebase / extensions

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

[docs] [fs-bq-schema-views] #1951

Closed danielthedifficult closed 3 months ago

danielthedifficult commented 4 months ago

Error:

When running the script as indicated in the docs:

https://github.com/firebase/extensions/blob/fe3eceb90015a34c47454988ea3f90e4c99c7cc0/firestore-bigquery-export/guides/GENERATE_SCHEMA_VIEWS.md?plain=1#L121

it outputs: error: unknown option '--big-query-project=[my-project-here]

Expected result:

I expect the docs to reference working commands :)

Investigation:

I see this option is defined here:

https://github.com/firebase/extensions/blob/9a94f260b38ec5ea0ec6260248847f95a10622ff/firestore-bigquery-export/scripts/gen-schema-view/src/index.ts#L59-L62

But nowhere else in the code.

Removing the--big-query-project option from the command and simply running it with:

npx @firebaseextensions/fs-bq-schema-views \
  --non-interactive \
  --project=[firebase-project-id] \
  --dataset=[big-query-dataset] \
  --table-name-prefix=[table-prefix] \
  --schema-files=./[my-schema].json

Doing this, the command succeeded and the BigQuery view was created and working as expected.

Proposed fix:

Remove this line from the documentation:

https://github.com/firebase/extensions/blob/fe3eceb90015a34c47454988ea3f90e4c99c7cc0/firestore-bigquery-export/guides/GENERATE_SCHEMA_VIEWS.md?plain=1#L121

And remove this from the options:

https://github.com/firebase/extensions/blob/9a94f260b38ec5ea0ec6260248847f95a10622ff/firestore-bigquery-export/scripts/gen-schema-view/src/index.ts#L59-L62

pehrlich-arbor commented 3 months ago

+1 - thanks for sharing @danielthedifficult