Skip to content

Commit

Permalink
Merge branch 'main' into mermaid-instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
edasmalchi authored Aug 23, 2024
2 parents e332850 + 4dd2310 commit 7836445
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,6 @@ schema_fields:
- name: manual_check__grading_scheme_v1
type: STRING
mode: NULLABLE
- name: private_dataset
type: BOOLEAN
mode: NULLABLE
9 changes: 6 additions & 3 deletions kubernetes/apps/charts/jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jupyterhub:
limit: 10G
# Very roughly I have seen most usage in the 2-3GB range
guarantee: 3G
storage:
capacity: 32Gi
cpu:
# this is to put 2 pods per e2-highmem-2 which has 1.93 allocatable
guarantee: 0.7
Expand Down Expand Up @@ -49,10 +51,11 @@ jupyterhub:
authenticator_class: github
Authenticator:
admin_users:
- atvaccaro
- machow
- vevetron
- tiffanychu90
- themightchris
- lottspot
- evansiroky
- charlie-costanzo
# holds github OAuth creds
existingSecret: jupyterhub-github-config
ingress:
Expand Down
4 changes: 4 additions & 0 deletions warehouse/macros/create_row_access_policy.sql
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ filter using (

{{ create_row_access_policy(
principals = ['serviceAccount:metabase@cal-itp-data-infra.iam.gserviceaccount.com',
'serviceAccount:metabase-payments-team@cal-itp-data-infra.iam.gserviceaccount.com',
'serviceAccount:bq-transform-svcacct@cal-itp-data-infra.iam.gserviceaccount.com',
'serviceAccount:github-actions-services-accoun@cal-itp-data-infra.iam.gserviceaccount.com',
'group:cal-itp@jarv.us',
'group:mov-project-team@jarv.us',
'domain:calitp.org',
]
) }};
Expand Down Expand Up @@ -155,9 +157,11 @@ filter using (

{{ create_row_access_policy(
principals = ['serviceAccount:metabase@cal-itp-data-infra.iam.gserviceaccount.com',
'serviceAccount:metabase-payments-team@cal-itp-data-infra.iam.gserviceaccount.com',
'serviceAccount:bq-transform-svcacct@cal-itp-data-infra.iam.gserviceaccount.com',
'serviceAccount:github-actions-services-accoun@cal-itp-data-infra.iam.gserviceaccount.com',
'group:cal-itp@jarv.us',
'group:mov-project-team@jarv.us',
'domain:calitp.org',
]
) }};
Expand Down
100 changes: 100 additions & 0 deletions warehouse/models/staging/payments/elavon/_elavon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,103 @@ models:
- name: ent_num
- name: dt
- name: execution_ts

- name: int_elavon__chargeback_transactions
description: Chargeback-specific transactions processed by Elavon
columns:
- name: payment_reference
- name: payment_date
- name: account_number
- name: routing_number
- name: fund_amt
- name: batch_reference
- name: batch_type
- name: customer_batch_reference
- name: customer_name
- name: merchant_number
- name: external_mid
- name: store_number
- name: chain
- name: batch_amt
- name: amount
- name: surchg_amount
- name: convnce_amt
- name: card_type
- name: charge_type
- name: charge_type_description
- name: card_plan
- name: card_no
- name: chk_num
- name: transaction_date
- name: settlement_date
- name: authorization_code
- name: chargeback_control_no
- name: roc_text
- name: trn_aci
- name: card_scheme_ref
- name: trn_ref_num
tests:
- unique
- name: settlement_method
- name: currency_code
- name: cb_acq_ref_id
- name: chgbk_rsn_code
- name: chgbk_rsn_desc
- name: mer_ref
- name: purch_id
- name: cust_cod
- name: trn_arn
- name: term_id
- name: ent_num
- name: dt
- name: execution_ts

- name: int_elavon__adjustment_transactions
description: Adjustment-specific transactions processed by Elavon
columns:
- name: payment_reference
- name: payment_date
- name: account_number
- name: routing_number
- name: fund_amt
- name: batch_reference
- name: batch_type
- name: customer_batch_reference
- name: customer_name
- name: merchant_number
- name: external_mid
- name: store_number
- name: chain
- name: batch_amt
- name: amount
- name: surchg_amount
- name: convnce_amt
- name: card_type
- name: charge_type
- name: charge_type_description
- name: card_plan
- name: card_no
- name: chk_num
- name: transaction_date
- name: settlement_date
- name: authorization_code
- name: chargeback_control_no
- name: roc_text
- name: trn_aci
- name: card_scheme_ref
- name: trn_ref_num
tests:
- unique
- name: settlement_method
- name: currency_code
- name: cb_acq_ref_id
- name: chgbk_rsn_code
- name: chgbk_rsn_desc
- name: mer_ref
- name: purch_id
- name: cust_cod
- name: trn_arn
- name: term_id
- name: ent_num
- name: dt
- name: execution_ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{{ config(materialized='table') }}

WITH

adjustment_transactions AS (

SELECT * FROM {{ ref('stg_elavon__transactions') }}
WHERE batch_type = 'A'

),

int_elavon__adjustment_transactions AS (

SELECT
payment_reference,
payment_date,
account_number,
routing_number,
fund_amt,
batch_reference,
batch_type,
customer_batch_reference,
customer_name,
merchant_number,
external_mid,
store_number,
chain,
batch_amt,
amount,
surchg_amount,
convnce_amt,
card_type,
charge_type,
charge_type_description,
card_plan,
card_no,
chk_num,
transaction_date,
settlement_date,
authorization_code,
chargeback_control_no,
roc_text,
trn_aci,
card_scheme_ref,
trn_ref_num,
settlement_method,
currency_code,
cb_acq_ref_id,
chgbk_rsn_code,
chgbk_rsn_desc,
mer_ref,
purch_id,
cust_cod,
trn_arn,
term_id,
ent_num,
dt,
execution_ts

FROM adjustment_transactions

)

SELECT * FROM int_elavon__adjustment_transactions
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{{ config(materialized='table') }}

WITH

chargeback_transactions AS (

SELECT * FROM {{ ref('stg_elavon__transactions') }}
WHERE batch_type = 'C'

),

int_elavon__chargeback_transactions AS (

SELECT

payment_reference,
payment_date,
account_number,
routing_number,
fund_amt,
batch_reference,
batch_type,
customer_batch_reference,
customer_name,
merchant_number,
external_mid,
store_number,
chain,
batch_amt,
amount,
surchg_amount,
convnce_amt,
card_type,
charge_type,
charge_type_description,
card_plan,
card_no,
chk_num,
transaction_date,
settlement_date,
authorization_code,
chargeback_control_no,
roc_text,
trn_aci,
card_scheme_ref,
trn_ref_num,
settlement_method,
currency_code,
cb_acq_ref_id,
chgbk_rsn_code,
chgbk_rsn_desc,
mer_ref,
purch_id,
cust_cod,
trn_arn,
term_id,
ent_num,
dt,
execution_ts

-- if we remove the need for a union between billing and deposit data downstream, these are the columns to keep
-- (ie deposit-specific, always null columns are removed)
-- payment_reference,
-- payment_date,
-- account_number,
-- routing_number,
-- fund_amt,
-- batch_reference,
-- batch_type,
-- customer_name,
-- merchant_number,
-- external_mid,
-- chain,
-- batch_amt,
-- amount,
-- card_type,
-- charge_type,
-- charge_type_description,
-- card_plan,
-- settlement_method,
-- currency_code,
-- ent_num,
-- dt,
-- execution_ts

FROM chargeback_transactions

)

SELECT * FROM int_elavon__chargeback_transactions

0 comments on commit 7836445

Please sign in to comment.