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.

Array of Maps Schema Example

See original GitHub issue

[READ] Step 1: Are you in the right place?

Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to Firebase support directly.

[REQUIRED] Step 2: Extension name

This feature request is for extension: _ (firestore-bigquery-export)

What feature would you like to see?

Please provide a schema example for an array of Maps in the GENERATE_SCHEMA_VIEWS.md

How would you use it?

To enable breaking out of data stored as an array of maps.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hernantzcommented, May 20, 2021

Hi @pauhlbarnes and @dackers86 I’m facing a similar issue, given this JSON structure

{
    "user": "foo",
    "friends": [
            {
                  "firstName": "John",
                  "lastName": "Doe"
            },
            {
                  "firstName": "Jane",
                  "lastName": "Doe"
            } 
    ]
}

This schema representation won’t work, right?

{
    "fields": [
       {
            "name": "user",
            "type": "string"
        },
        {
            "name": "friends",
            "type": "map",
            "mode": "repeated",
            "fields": [
                {
                  "name": "firstName",
                  "type": "string"
                }, 
                {
                  "name": "lastName",
                  "type": "string"
                }
            ]
        }
    ]
}

Or at least this is what I understand from this comment from https://github.com/firebase/extensions/issues/583. Although it would seem to be possible to implement, according to the BigQuery docs on nested structs.

0reactions
dackers86commented, Jun 10, 2022

HI @darnmason @darnmason

I’ve added this to our project board for further investigation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a Mongoose Schema of type Array of Maps
How about creating a separate schema for the maps and then use that schema in an array: var Schedule = new mongoose.Schema({ type:...
Read more >
Complex Type (Array, Map) Handling - Apache Pinot Docs
On this page, we'll show how to handle this complex-type structure with these two approaches, to process the example data in the following...
Read more >
Mappers ($map) | Opis JSON Schema
In a JSON Schema document, $map is evaluated like $vars, the difference is that $map can also be an array ( $vars can...
Read more >
Working with Spark ArrayType and MapType Columns
Spark DataFrame columns support arrays and maps, which are great for data sets ... An ArrayType column is suitable in this example because...
Read more >
Mongoose v6.8.1: SchemaTypes
Check out Mongoose's plugins search to find plugins. String; Number; Date; Buffer; Boolean; Mixed; ObjectId; Array; Decimal128; Map; Schema ...
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