-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
What happened?
join_keys with correct parent-child relationships are not easy to design, especially by the inexperienced developer. Indirectly linked datasets need to have the same parent. IMO this is to strict given that their implicit relationships are "indirect" anyway. Here is an example
jk <- join_keys(
join_key("customers", keys = "id"),
join_key("orders", keys = c("id")),
join_key("products", keys = c("id")),
join_key("product_components", keys = c("id")),
join_key("customers", "orders", keys = c(id = "customer_id")),
join_key("orders", "order_items", keys = c(id = "order_id")),
join_key("order_items", "products", keys = c(product_id = "id")), # no common parent
#join_key("products", "order_items", keys = c(id = "product_id")), # is common parent
join_key("products", "product_components", keys = c(id = "product_id"))
)
jk["order_items", "product_components"]
# NULLI propose this change to make it easier for app developer as I couldn't figure out what is the problem with above join keys setup myself.