You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to convert it in a table like like so:
post_id
mentioned_user_id
1
B
1
C
I have something like this that works:
MODEL (
name mentions.full_model,
kind FULL,
cron '@daily',
grain ('post_id', 'mentioned_user_id')
);
SELECTraw.post_idAS`post_id`,
mentioned_user.user_idas`mentioned_user_id`FROMposts.seed_modelAS raw,
UNNEST(CAST(JSON_EXTRACT(raw, '$.mentioned_users') AS ARRAY<STRUCT<user_id STRING>>)) AS mentioned_user
But the lineage is not working properly for the mentioned_user_id column. When I select it the column greys out and a new mentioned_user columns appear with the lineage on the UNNEST line. Is this the best I can get?
The text was updated successfully, but these errors were encountered:
Idealy BigQuery as we would like this to be portable and eventualy use Apache Beam to handle our workflows. But we may end up using DuckDb dialect if it makes no sense or it is not possible to create those models from Beam.
so i was able to get column level lineage to mostly work. in this case, i think you do json_extract(raw.raw, ...) it will help the compiler find the right reference. mentioned_user column is basically the unnest node.
@vchan there's some issue here with visualization of the lineage with unnest
Thanks for your reply and sorry for my late answer (I was vacationing ^^).
I have been inspecting the /api/lineage calls the UI sends to the server and the responses look great. So yeah looks like the issue is on the visualization side.
Hi there,
What is the proper way to UNNEST a JSON array? I have following JSON structure saved in a
raw
column of my table :I would like to convert it in a table like like so:
I have something like this that works:
But the lineage is not working properly for the
mentioned_user_id
column. When I select it the column greys out and a newmentioned_user
columns appear with the lineage on the UNNEST line. Is this the best I can get?The text was updated successfully, but these errors were encountered: