Health-Union/snowshu

Source-configured Target Settings

Closed this issue · 1 comments

General Concept:

If we are trying to replicate a specific source as close as possible for testing, then the target should not be source-agnostic. Behaviors of the target should be determined by the source. So thinks like cross-db queries should only work in the target if they also work in the source.

Reasons Why:

  • we want code run against a target to be as close to deterministic with the source as possible. we can get closer by regulating features and functions

How?

  • For example sources can have an allows_cross_database attribute, and for sources where it is true PG would loop through all the created relations and set up pg_fdw.
  • For as many non-ansii sql functions as possible, create alias UDF’s / stored procs that are only applied to the target if the source implements them. For example, snowflakes any_value aggregation can be mimicked with postgres max if it is implemented
  • This is going to potentially call for a set of submodules in each adapter. will need to think about the architecture here.

[Issue created by ethanknox: 2020-01-20]
[Last updated on bitbucket: 2020-01-31]

Done! 💥