insightsengineering / teal.transform

Reproducible transform and merge module for teal applications
https://insightsengineering.github.io/teal.transform/
Other
3 stars 2 forks source link

Create a debug module with join keys for all datasets #15

Open cicdguy opened 3 years ago

cicdguy commented 3 years ago

It's unclear for users what happens under the radar of the data_merge_module. Big part of it is join keys, primary keys and foreign keys of datasets, which are often set by our defaults and not visible otherwise than our code.

Task: to create a module, which would list the join_keys for all datasets and visualize the merging between different datasets.

Paging @Polkas who spent almost a few days debugging an issue which ultimately was resolved by explicitly passing join_keys (cdisc_data argument) or usage of cdisc_connectors.

Provenance:

Creator: kpagacz
cicdguy commented 3 years ago
NEST/teal.modules.general/issues/828 Provenance: ``` Creator: burkoffn ```
cicdguy commented 3 years ago

There is programming API for that - thus consider it as a low priority

>   data = cdisc_data(
+     cdisc_dataset("ADSL", ADSL, code = "ADSL <- radsl(cached = TRUE)"),
+     cdisc_dataset("ADLB", ADLB, code = "ADLB <- radlb(cached = TRUE)"),
+     check = TRUE
+   )
> data$get_join_keys()$get()
$ADSL
$ADSL$ADSL
  STUDYID   USUBJID 
"STUDYID" "USUBJID" 

$ADSL$ADLB
  STUDYID   USUBJID 
"STUDYID" "USUBJID" 

$ADLB
$ADLB$ADLB
  STUDYID   USUBJID   PARAMCD    AVISIT 
"STUDYID" "USUBJID" "PARAMCD"  "AVISIT" 

$ADLB$ADSL
  STUDYID   USUBJID 
"STUDYID" "USUBJID" 

Provenance:

Creator: pawelru