"Provided schema does not match table" when running the fs-bq-schema-view script
See original GitHub issue- Extension name:
firetore-bigquery-export
(thegen-schema-views script
) - Extension version:
firetore-bigquery-export@0.1.26
, latest `gen-schema-views script´ (I´ve also tried with 0.4.2)
We’re updating our schema, and after deleting the previously generated views (as instructed by #423 and #646) running npx @firebaseextensions/fs-bq-schema-views
fails with the following output:
{"code":400,"errors":[{"message":"Provided Schema does not match Table audit-backend:audit.audit_schema_fields_changelog. Cannot add fields (field: old_data)","domain":"global","reason":"invalid"}],"response":{"headers":{"alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","cache-control":"private","content-encoding":"gzip","content-type":"application/json; charset=UTF-8","date":"Wed, 16 Nov 2022 17:21:45 GMT","etag":"338qmb/WriADWLSvCyjq2w==","server":"ESF","transfer-encoding":"chunked","vary":"Origin, X-Origin, Referer","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-xss-protection":"0"}},"message":"Provided Schema does not match Table audit-backend:audit.audit_schema_fields_changelog. Cannot add fields (field: old_data)"}
Provided Schema does not match Table audit-backend:audit.audit_schema_fields_changelog. Cannot add fields (field: old_data)
The script does create the audit_schema_fields_changelog view with most of the fields (it apparently stops while trying to add the old_data field), but it does not create the other one.
I’ve updated the schema a couple of times in the past following the exact same procedure without any issues. I’m using the exact same command as before:
npx @firebaseextensions/fs-bq-schema-views \
--non-interactive \
--project=audit-backend \
--dataset=audit \
--table-name-prefix=audit \
--schema-files=./fields.json
I’ve also explicitly set the version to the previous one (npx @firebaseextensions/fs-bq-schema-views@0.4.2
with the same result
Issue Analytics
- State:
- Created 10 months ago
- Reactions:9
- Comments:19 (5 by maintainers)
Top Results From Across the Web
python - 'Provided Schema does not match Table' despite the ...
I'm currently running an Airflow DAG that takes extract data from a MySQL backend and saves the CSV into a GCS directory, then...
Read more >generating bigquery firestore schema · Issue #423 - GitHub
running npx @firebaseextensions/fs-bq-schema-views fail if my schema contain one ... "Provided schema does not match table" when running the ...
Read more >Modifying table schemas | BigQuery - Google Cloud
This document describes how to modify the schema definitions for existing BigQuery tables. You can make most schema modifications described in this document ......
Read more >TPT02353 Error: Column length does not match the length in ...
TPT02353 Error: Column length does not match the length in schema (possible invalid input data), status = %s Explanation: The length of the ......
Read more >Issues updating schema (BigQuery) - Google Groups
"message" : "Provided Schema does not match Table bianalyticis:yardi_sql_server.unit. Field RentType has changed type from STRING to INTEGER",
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue there - I have tried to upgrade extension via Firebase Console to 0.1.27 (oldData is mentioned for this release as “added feature” - whatever it is - as there are no docs) - upgrade went ok, then I deleted both views in BQ, run again npx scripts…
Unfortunately the same error
Yes, it is still an issue with updating the schema directly It doesn’t allow to update the schema, instead, you have to remove the view manually, then run the script to recreate it