Those are facing issue on task 1 Please use below code for the file name - order_items.view connection: "bigquery_public_data_looker" # Include all the views include: "/views/*.view" include: "/z_tests/*.lkml" include: "/**/*.dashboard" # Define the default datagroup for caching datagroup: training_ecommerce_default_datagroup { sql_trigger: SELECT MAX(id) FROM etl_log;; max_cache_age: "1 hour" } # Set the default datagroup for persistence persist_with: training_ecommerce_default_datagroup # Label for the model label: "E-Commerce Training" # Explore for order_items with necessary joins explore: order_items { join: users { type: left_outer sql_on: ${order_items.user_id} = ${users.id} ;; relationship: many_to_one }
Those are facing issue on task 1 Please use below code for the file name - order_items.view
connection: "bigquery_public_data_looker"
# Include all the views
include: "/views/*.view"
include: "/z_tests/*.lkml"
include: "/**/*.dashboard"
# Define the default datagroup for caching
datagroup: training_ecommerce_default_datagroup {
sql_trigger: SELECT MAX(id) FROM etl_log;;
max_cache_age: "1 hour"
}
# Set the default datagroup for persistence
persist_with: training_ecommerce_default_datagroup
# Label for the model
label: "E-Commerce Training"
# Explore for order_items with necessary joins
explore: order_items {
join: users {
type: left_outer
sql_on: ${order_items.user_id} = ${users.id} ;;
relationship: many_to_one
}
join: inventory_items {
type: left_outer
sql_on: ${order_items.inventory_item_id} = ${inventory_items.id} ;;
relationship: many_to_one
}
join: products {
type: left_outer
sql_on: ${inventory_items.product_id} = ${products.id} ;;
relationship: many_to_one
}
join: distribution_centers {
type: left_outer
sql_on: ${products.distribution_center_id} = ${distribution_centers.id} ;;
relationship: many_to_one
}
}
# Explore for events with necessary joins
explore: events {
join: event_session_facts {
type: left_outer
sql_on: ${events.session_id} = ${event_session_facts.session_id} ;;
relationship: many_to_one
}
join: event_session_funnel {
type: left_outer
sql_on: ${events.session_id} = ${event_session_funnel.session_id} ;;
relationship: many_to_one
}
join: users {
type: left_outer
sql_on: ${events.user_id} = ${users.id} ;;
relationship: many_to_one
}
}
# Define the weekly datagroup for caching with a trigger
datagroup: weekly_datagroup_Mcl0 {
sql_trigger: SELECT DATE_TRUNC(CURRENT_DATE(), WEEK);;
max_cache_age: "168 hours"
}
# Use the weekly datagroup for persistence
persist_with: weekly_datagroup_Mcl0
# Explore for order_items with an aggregate table
explore: +order_items {
label: ""
aggregate_table: weekly_aggregate_revenue_profit {
query: {
dimensions: [order_items.created_date]
measures: [order_items.total_revenue, order_items.total_profit]
}
materialization: {
datagroup_trigger: weekly_datagroup_Mcl0
increment_key: "created_date"
}
}
}
No need to do this
It's working perfectly be careful and do the same process ❤
second