question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"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

  1. Firestore export to BigQuery was successful
  2. Generate VIEWS based on the BigQuery Schema

Steps to reproduce:

  1. Create a similar document in Firestore and use the fs-bq-import-collection to export to BigQuery

  2. 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:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
laurenzlongcommented, Apr 17, 2020

@russellwheatley would you mind taking a look? Thanks!

0reactions
russellwheatleycommented, Apr 24, 2020

Glad you were able to find a solution, @newadays 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Schema and data type mapping in copy activity - Microsoft Learn
This article describes how the Azure Data Factory copy activity perform schema mapping and data type mapping from source data to sink data....
Read more >
Data Types - Spark 3.3.1 Documentation
Spark SQL and DataFrames support the following data types: Numeric types ... Note: this type can only be used in table schema, not...
Read more >
Datapills and fields mapping - Workato Docs
Common issues when mapping fields. Here are some common errors experienced during fields mapping. Required fields that have no values at run-time. At...
Read more >
ArcGIS field data types
This ArcGIS 10.3 documentation has been archived and is no longer updated. ... To learn more about the data type mapping process with...
Read more >
MAP type | Databricks on AWS
Learn about the map type in Databricks Runtime and Databricks SQL. Map type represents values ... MAP is not a comparable data type....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found