LookML view · dating-platform
How this LookML transactions view models web orders from tracked events
At a glance
Does Builds web orders from transaction events: order id, affiliation, total, tax, city, state, country and the first timestamp. It defines transactions_count and transactions_value . Trust: Source-defined
Why Ecommerce revenue captured by the web tracker, likely subscription purchases, so revenue can be tied to sessions and acquisition. Trust: InferredGrain One row per order, with order_id declared as the primary key. Trust: Source-defined
Source dating_platform/event_transactions.view.lookml 78 lines
Source: event_transactions.view.lookml L1-10
dating_platform/event_transactions.view.lookml L1-10 Show contextCopy
1 - view : transactions 2 derived_table : 3 sql : | 4 SELECT 5 domain_userid, 6 domain_sessionidx, 7 tr_orderid, 8 tr_affiliation, 9 tr_total, 10 tr_tax, 11 tr_city, 12 tr_state, 13 tr_country,
dating-platform, event_transactions.view.lookml, lines 1-10
Shape Trust: Source-defined
Every field as declared, with the dashboard tiles that read it. Computed from the source; nothing here is edited.
Derived table: rebuilt on a SQL trigger. Reads warehouse tables directly.
Relationships Trust: Source-defined
Relationships of transactions
This Block No relationship declared
Text version transactions is the base view of transactions: base view transactions is joined into transaction_items: as transactions, fk transaction_items.ti_orderid (no relationship declared)
Worth noticing
Order time is the first event time Trust: Source-defined
occurred_time comes from MIN(collector_tstamp) across the order's transaction events, the collector clock rather than the device clock.
Source: event_transactions.view.lookml L14-18
dating_platform/event_transactions.view.lookml L14-18 Show contextCopy
11 tr_city, 12 tr_state, 13 tr_country, 14 MIN (collector_tstamp) AS tr_tstamp 15 FROM ${TABLE} .events_atomic 16 WHERE event = 'transaction' 17 GROUP BY 1 ,2 ,3 ,4 ,5 ,5 ,6 ,7 ,8 ,9 ,10 18 ORDER BY tr_orderid 19 sql_trigger_value : SELECT MAX (collector_tstamp) FROM ${TABLE} .events_atomic 20 distkey : domain_userid 21 sortkeys :
dating-platform, event_transactions.view.lookml, lines 14-18
Revenue is the tracked total Trust: Source-defined
transactions_value sums transaction_value , which is tr_total. Tax is a separate dimension and is not subtracted.
Source: event_transactions.view.lookml L61-67
What can change the answer 3
!
Caution: GROUP BY includes the aggregate columnTrust: Source-defined
The SELECT has nine plain columns and MIN(collector_tstamp) as column 10, but the query groups by 1,2,3,4,5,5,6,7,8,9,10. Grouping by an aggregate is rejected by most warehouses.
What goes wrong: The persisted table fails to rebuild, and the explore serves stale orders or an error.
Source: event_transactions.view.lookml L3-18
dating_platform/event_transactions.view.lookml L3-18 Show contextCopy
1 - view : transactions 2 derived_table : 3 sql : | 4 SELECT 5 domain_userid, 6 domain_sessionidx, 7 tr_orderid, 8 tr_affiliation, 9 tr_total, 10 tr_tax, 11 tr_city, 12 tr_state, 13 tr_country, 14 MIN (collector_tstamp) AS tr_tstamp 15 FROM ${TABLE} .events_atomic 16 WHERE event = 'transaction' 17 GROUP BY 1 ,2 ,3 ,4 ,5 ,5 ,6 ,7 ,8 ,9 ,10 18 ORDER BY tr_orderid 19 sql_trigger_value : SELECT MAX (collector_tstamp) FROM ${TABLE} .events_atomic 20 distkey : domain_userid 21 sortkeys :
dating-platform, event_transactions.view.lookml, lines 3-18
!
Caution: Two models declare an explore named transactionsTrust: Source-defined
event_tracker exposes this view as transactions. enterprise declares another transactions explore from user_transactions, which is not in the repo. Dashboards that say explore: transactions do not say which one they mean.
What goes wrong: Revenue tiles read transactions.total_revenue, a field this view does not have.
Read the guide: Missing tables and stale references
Source: event_tracker.model.lookml L18-22
i
Note: The drill set names raw columnsTrust: Source-defined
transaction_detail lists domain_userid and domain_sessionidx. The declared fields are user_id and session_index .
Source: event_transactions.view.lookml L69-78
Parser checks 2 Trust: Source-defined
Mechanical findings from parsing the LookML. They are facts about the files. The cards above explain which ones matter.
Show all 2 checks
set-member-missing 2 event_transactions.view.lookml:69 Set transactions.transaction_detail lists "domain_userid", which is not a field or set in this view.event_transactions.view.lookml:69 Set transactions.transaction_detail lists "domain_sessionidx", which is not a field or set in this view.
Related
Guides built on this file Related source files
Source file
transaction_items
Order lines from transaction_item events: order id, category, SKU, name, price and quantity. Measures are i...
view 3 warnings
Source file
events
A derived table over events_atomic with page, referer, structured event and ecommerce columns. It defines e...
view 4 warnings
Source file
event_tracker
Six explores on project_connection: events joined to sessions and visitors, sessions joined to visitors, pl...
model 3 warnings
Source file
business dashboards
Business overview (7 tiles), Conversion Rates (3 tiles) and Maps (3 tiles). They chart revenue, transaction...
3 dashboards 4 warnings
Source model