dm icon indicating copy to clipboard operation
dm copied to clipboard

Review real use cases for `dm_disentangle()`

Open krlmlr opened this issue 2 years ago • 5 comments

in the order of complexity:

  • [ ] flights with cycle
  • [ ] financial with cycle (#1063)
  • [ ] customer database
  • [ ] ...
  • [ ] adventureworks

krlmlr avatar Jun 13 '22 10:06 krlmlr

Also by user interests? Data analyst, data manager etc. (these are roles you mentioned)

maelle avatar Jun 13 '22 10:06 maelle

@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.

krlmlr avatar Jun 14 '22 04:06 krlmlr

We now have all data models from relational.fit at our disposal, after #1123.

krlmlr avatar Jun 20 '22 17:06 krlmlr

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)

krlmlr avatar Jun 23 '22 13:06 krlmlr

Needs the most recent versions of RMariaDB and DBI from CRAN.

krlmlr avatar Jun 23 '22 14:06 krlmlr