How populate a new column with data based on data in other rows
I have a dataset consisting of Google Analytics data. One of the columns identifies their Userid (for our ecommerce portal) if they authenticated. Another column identifies their GA session ID (during the visit to our site before and after they authenticate). I am interested in capturing all the activity for a user before they authenticated. I can connect this by referencing the session ID.
Event -- session ID -- UserID -- New column
A -- 12345 -- NULL -- {Pre-Authenticated}
B -- 9876 -- NULL -- {NULL}
C -- 12345 -- 9385 -- {Authenticated}
How can I set up in ETL a way of populated a new column to identify whether the event row was authenticated, pre-authenticated, or null?
Answers
-
I would create an ETL that splits your data into two using two filter tiles. One filter where userid is null, which is your pre-authenticated data, the other where userid is not null is your authenticated data. You can add a constant tile to create a column called authtentication status. You can then use a join tile to join them back together and join on session id. You would then have your user id next to your pre-authenticated data when it matched on session id.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Unless you know each of those events are for the same user you won’t be able to tie different sessions together because each visitor to your website will get a new session ID if they haven’t visited your site within 30 minutes or whatever you have your Google analytics configured to. I am not certain if you can use googles user identification to tie all of the different sessions together but that might be something you can also look into. If that is the case you can use the rank and window tile to partition based on googles user identifier and then order by event time and use the lag too pull your user id field
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Thanks guys. Grant - you're correct in that a user will get a new session id for each of their sessions. I just want to identify all their activity for sessions where they did authenticate.
0 -
If you're simply wanting to do a translation stating they're authenticated you can use a Beast Mode on a card or a Formula Tile in a new Magic ETL dataflow to define a new column. I'm not certain what you logic would be to determine if they're "Pre-Authenticated" but assuming the user ID is populated means they're authenticated you can do something like this:
CASE WHEN `UserID` IS NOT NULL THEN 'Authenticated' END
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 747 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 125 Manage
- 122 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 109 Community Announcements
- 4.8K Archive