I am trying to find event_dim records according to new schema.Could not find it.
Asked
Active
Viewed 357 times
1 Answers
1
The last line of the migration script on the same webpage says "UNNEST(event_dim) AS event". And UNNEST is described in the BigQuery documentation as:
The
UNNESToperator takes anARRAYand returns a table, with one row for each element in theARRAY.
In other words: every row represents an event now, in stead of one row containig a RECORD with multiple events.
Also the fields of event_dim are mapped to slightly different names, as you can see in the first SELECT at the beginning of the script:
event_dim.timestamp_microsis mapped toevent_timestampevent_dim.previous_timestamp_microsis mapped toevent_previous_timestampevent_dim.nameis mapped toevent_name- etc...
In conclusion: the main difference is that one row contains exactly one event in the new schema. Next to that, the fields are renamed.
MrtN
- 136
- 9
-
But where did you find event_dim in new schema? there is no field name corresponding to event_dim in new schema. – subhendu rana Sep 23 '18 at 07:54
-
Improved the answer by explaining the the fields are also renamed. I hope this helps you find the data you need – MrtN Sep 23 '18 at 12:16
-
Thanks ! I understand what you are saying. but I am still stuck with this problem. could you please look into that? https://stackoverflow.com/questions/52454515/how-to-write-bigquery-event-dim-record-according-to-new-schema – subhendu rana Sep 23 '18 at 13:05