map function to array of struct #10374
-
Looking for help applying map to an array of structs. the values in the struct need to be concatenated a certain way and then unnested alongside the user. maybe there is another way to do this? I get this error MRE:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I'd still be interested in a map solution because i think i twould be more flexible, but I was able to unnest first and get the expected output I listed originally.
|
Beta Was this translation helpful? Give feedback.
-
Looks like the error was a bit misleading and I just needed to cast my column to a string for the concat to work. For a slightly different output than my original question, i can do this:
This is my first time using ibis and this is really cool. lets me do things in BigQuery that I couldn't do easily in sql. |
Beta Was this translation helpful? Give feedback.
Keep It Simple, Stupid
┃ user ┃ segment_ids ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string │ string │
├────────┼─────────────────────────┤
│ a │ attr1_1,attr2_2,attr3_3 │
│ b │ attr1_1 │