Skip to content

Feat/migrate chem - #136

Draft
droomelotdegendt wants to merge 2 commits into
feat/migrate-locsfrom
feat/migrate-chem
Draft

Feat/migrate chem#136
droomelotdegendt wants to merge 2 commits into
feat/migrate-locsfrom
feat/migrate-chem

Conversation

@droomelotdegendt

Copy link
Copy Markdown
Collaborator

Goal

Migrate function get_chem to new data warehouse 'W0002_10_Watina'.

Key changes

  • New function build_chem_query to separate table connections from R business logic
  • Change table name reference (DimTijd --> DimDatum)
  • Swap the legacy precalculated table ssrs_StaalEN for the new dim table DimStaal (which has 2 columns for electroneutrality: StaalElnNbr and ENCalculated)

Open questions

  • ENCalculated from DimStaal used for column elneutr, or should StaalElnNbr be used?
  • Currently under investigation by team Databeheer: ChemVariable CondF has duplicated values (current quick fix solution: filter(.data$ChemVarWID != 24))
  • The new DWH has one extra measurement for every location: Si. Was this intenionally filtered in the previous DWH? Is this data newly added?
  • Why is the output different when conc_type = eq?

Migration checks

To verify the code changes, the DWH migration snapshots were compared before and after migration (see the testing README for more information). The output is a one-on-one match except for:

  • duplicates for the ChemVariable CondF (filtered out by the quick fix solution)
  • Extra row for the ChemVariable Si
  • When param conc_type = eq, the output has different values for the ChemVariable Al, Mn, and P-PO4

Note: to only check the DWH query changes, look at feat(get_chem): migrate to new DWH 'W0002_10_WATINA' separately

Separates data warehouse table connections from R business logic to prepare for DWH migration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant