payments: expose remaining elavon batch types and modify row access policy #3419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR creates new unique intermediate tables for the two remaining batch types of Elavon transactions found in
stg_elavon__transactions
that are not yet exposed in tablesNew batch types and tables:
A
found in new tableint_elavon__adjustment_transactions
C
found in new tableint_elavon__chargeback_transactions
the YML file for these tables have also been updated in the dbt project
This PR also adds the service account for
metabase-payments-team
to the create_row_access_policy macro to more easily facilitate access to payments tables with row access policies by payments data team membersResolves #3411
As some background:
we used batch types
B
andD
when creating thefct_elavon__transactions
table. When constructing that, we tried to incorporate these other two batch types for reconciliation (the batch types above,A
andC
) but they are aggregated at a different grain so we were unable to use them for those calculations.However, as this batch data is valuable on it's own, once this PR is merged they will be available as their own tables in the warehouse and Metabase to be used for analysis.
Type of change
How has this been tested?
locally with dbt run and dbt test
Post-merge follow-ups
Metabase will need to be configured to expose these two new tables in the staging scheme to the
Payments Team Warehouse
in MetabaseWe will also need to verify that the payments team service account is successfully accessing the payments tables protected by the row access policy