dm
dm copied to clipboard
Review real use cases for `dm_disentangle()`
in the order of complexity:
- [ ] flights with cycle
- [ ] financial with cycle (#1063)
- [ ] customer database
- [ ] ...
- [ ] adventureworks
Also by user interests? Data analyst, data manager etc. (these are roles you mentioned)
@maelle: I agree that a use case review by role or user interest is needed, can you please file a new issue? Where should this review live? This issue here is about dm_disentangle()
only.
We now have all data models from relational.fit at our disposal, after #1123.
library(dm)
#>
#> Attaching package: 'dm'
#> The following object is masked from 'package:stats':
#>
#> filter
con <- dm:::financial_db_con()
meta <- dm:::dm_meta(con, schema = NA)
meta
#> ── Table source ────────────────────────────────────────────────────────────────
#> src: mysql [[email protected]:NA/Financial_ijs]
#> ── Metadata ────────────────────────────────────────────────────────────────────
#> Tables: `schemata`, `tables`, `columns`, `table_constraints`, `key_column_usage`, `constraint_column_usage`
#> Columns: 36
#> Primary keys: 6
#> Foreign keys: 8
# This works in a local session, but not here???
meta$schemata
#> # Source: SQL [0 x 2]
#> # Database: mysql [[email protected]:NA/Financial_ijs]
#> # … with 2 variables: catalog_name <chr>, schema_name <chr>
dm_from_con(con, schema = "stats") %>%
dm_draw(rankdir = "TB")
#> Keys queried successfully, use `learn_keys = TRUE` to mute this message.
dm_from_con(con, schema = "Basketball_men") %>%
dm_draw()
#> Keys queried successfully, use `learn_keys = TRUE` to mute this message.
Created on 2022-06-23 by the reprex package (v2.0.1)
Needs the most recent versions of RMariaDB and DBI from CRAN.