data-infra icon indicating copy to clipboard operation
data-infra copied to clipboard

payments: expose remaining elavon batch types and modify row access policy

Open charlie-costanzo opened this issue 6 months ago • 1 comments

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 tables

New batch types and tables:

  • A found in new table int_elavon__adjustment_transactions
  • C found in new table int_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 members

Resolves #3411

As some background: we used batch types B and D when creating the fct_elavon__transactions table. When constructing that, we tried to incorporate these other two batch types for reconciliation (the batch types above, A and C ) 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

  • [x] New feature

How has this been tested?

locally with dbt run and dbt test

Post-merge follow-ups

  • [x] Actions required (specified below)
  • [ ] Metabase will need to be configured to expose these two new tables in the staging scheme to the Payments Team Warehouse in Metabase

We will also need to verify that the payments team service account is successfully accessing the payments tables protected by the row access policy

charlie-costanzo avatar Aug 16 '24 20:08 charlie-costanzo