Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contexts flattening #19

Open
chuwy opened this issue Jan 15, 2019 · 1 comment
Open

Add contexts flattening #19

chuwy opened this issue Jan 15, 2019 · 1 comment

Comments

@chuwy
Copy link
Contributor

chuwy commented Jan 15, 2019

If user defines a context with array root type, then in the resulting LoaderRow we get following structure:

"contexts_com_acme_mycontext_1_0_0": [
  [
    {
      "key": "foo",
      "value": "bar"
    },
    {
      "key": "one",
      "value": "two"
    }
  ]
]

First-level array because contexts always have zero-or-more cardinality and second-level array is actual context.

This structure is not supported by BigQuery, which means we have to flatten this array into single-level.

@chuwy
Copy link
Contributor Author

chuwy commented Feb 7, 2019

If we add this flattening - the table's schema won't be changed (if somebody already pushed such schema), so it can wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant