Relative Content

Tag Archive for sqlgoogle-bigquerygoogle-analytics-4

GA4 BigQuery SQL – replicating a categorical value to a common key

inside GA4 there is a session_id which is used to identify the set of events that a user has made on site, I am using a case function to define my location names so I can merge it with a dataset of organic lead goals for a client. The challenge is that there are conversion events that occur on sections of the site where the visitor is not under a locations directory, so I need to search for a location in the rows of data and apply it to the whole session if there is one. I am using a case function to assign when a page_location contains the ‘/location/…’. The next step is identifying the first non null value for a location and apply the location based on session_id so essentially:

Transfering data with BigQuery tables

I have two BigQuery tables which have quite complicated and different schemas. What would be easiest way to get data from table A to table B. I tried INSERT INTO function but there are so many nested fields etc. so it gets pretty complex. So I’m trying to find another ways to solve issue