我目前正在开发一个 LookML 探索模型,它 LEFT JOINs 4 个表,每个表都有 PID 的 PK。4 个表之间的数据粒度不同,这会导致重复问题和不正确的计数总数。
有没有办法通过使用我们仓库中设置的 DIMDATE 表在 4 个表之间的 Date 列上进行 LEFT JOIN?
这是当前的探索 LookML:
### SMS ####################
explore: stg_mysql_twiliooutboundsms {
group_label: "Usage"
label: "SMS"
join: dimaccount {
sql_on: ${dimaccount.pid} = ${stg_mysql_twiliooutboundsms.pid};;
type: left_outer
relationship: many_to_one
}
join: stg_mysql_twilioinboundsms {
sql_on: ${stg_mysql_twiliooutboundsms.pid} = ${stg_mysql_twilioinboundsms.pid} ;;
type: left_outer
relationship: one_to_one
}
join: stg_mysql_telnyxoutboundsms {
sql_on: ${stg_mysql_twiliooutboundsms.pid} = ${stg_mysql_telnyxoutboundsms.pid} ;;
type: left_outer
relationship: one_to_one
}
join: stg_mysql_telnyxinboundsms {
sql_on: ${stg_mysql_twiliooutboundsms.pid} = ${stg_mysql_telnyxinboundsms.pid} ;;
type: left_outer
relationship: one_to_one
}
}