"Map Datatypes" not working for gen-schema-view
See original GitHub issue[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs for a specific extension in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- To file a bug against the Firebase Extensions platform, or for an issue affecting multiple extensions, please reach out to Firebase support directly.
[REQUIRED] Step 2: Describe your configuration
- Extension name: *gen-schema-view
- Extension version: latest
- Configuration values (redact info where appropriate):
- firestore schema
"mainImage": {
"main": "url1",
"small": "url2",
"medium": "url3",
"thumbnail": "url4"
}
- Schema.json
{
"fields": [
{
"fields": [
{ "name": "main", "type": "string" }, { "name": "medium", "type": "string" }, { "name": "small", "type": "string" }, { "name": "thumbnail", "type": "string" }
],
"name": "mainImage",
"type": "map"
}
]
}
[REQUIRED] Step 3: Describe the problem
- Firestore export to BigQuery was successful
- Generate VIEWS based on the BigQuery Schema
Steps to reproduce:
-
Create a similar document in Firestore and use the fs-bq-import-collection to export to BigQuery
-
Use the gen-schema-view to generate a BigQuery View.
What happened? How can we make the problem occur?
ERROR:
{"code":400,"errors":[{"message":"Provided Schema does not match Table PROJECT_ID:firestore_export.DATASET_ID_schema_schema_changelog. Cannot add fields (field: mainImage_main)","domain":"global","reason": "invalid"}],"message":"Provided Schema does not match Table PROJECT_ID:firestore_export.DATASET_ID_schema_schema_changelog. Cannot add fields (field: mainImage_main)"} Provided Schema does not match Table PROJECT_ID:firestore_export.DATASET_ID_schema_schema_changelog. Cannot add fields (field: mainImage_main)
It seems the map (JSON) was not interpreted correctly.
Expected result
JSON field that corresponds to the MAP datatype in Firestore
Actual result
ERROR - appended “_” to the map fields and could not find it in the existing RAW export in BigQuery.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
@russellwheatley would you mind taking a look? Thanks!
Glad you were able to find a solution, @newadays 👍