We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a column serves as both a primary and foreign key, dm refuses to flatten the model. Below is a minimal example.
mydm <- dm( x = tibble(a = 1, b = 2), y = tibble(c = 2, d = 3), z = tibble(e = 2, f = 4) ) %>% dm_add_pk(x, a) %>% dm_add_pk(y, c) %>% dm_add_pk(z, e) %>% dm_add_fk(x, b, y) %>% dm_add_fk(y, c, z)
Diagram:
mydm %>% dm_draw(view_type = "all")
mydm %>% dm_flatten_to_tbl(x, .recursive = TRUE)
Output:
Error in `join()`: ! Join columns in `x` must be present in the data. ✖ Problem with `c`. Run `rlang::last_trace()` to see where the error occurred.
Expected output:
# A tibble: 1 × 4 a b d f <dbl> <dbl> <dbl> <dbl> 1 1 2 3 4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When a column serves as both a primary and foreign key, dm refuses to flatten the model. Below is a minimal example.
Diagram:
Flattening the model
Output:
Expected output:
The text was updated successfully, but these errors were encountered: