Skip to main content

fdp-to-consumable-product

Deployment type: BigQuery (dbt) Layer: CDP — Consumable Data Product Pattern: JOIN across 3 FDP tables → 1 CDP table

Overview

This deployment builds the CDP (Consumable Data Product) layer by joining all three FDP tables from fdp_generic into a single denormalised view per customer:

fdp_generic.event_transaction_excess    ─┐
fdp_generic.portfolio_account_excess    ─┼──► cdp_generic.customer_risk_profile
fdp_generic.portfolio_account_facility  ─┘

The customer_risk_profile CDP table is the primary source for the mainframe-segment-transform pipeline, which reads each row and writes an outbound fixed-width segment file back to GCS for downstream mainframe consumption.

Data Flow

ODP (odp_generic) ──► FDP (fdp_generic) ──► CDP (cdp_generic) ──► GCS segment files
       ↑                    ↑                      ↑                      ↑
  Dataflow/Beam          dbt JOIN/MAP           dbt JOIN          Dataflow/Beam
  (ingestion)          (bigquery-to-         (this deployment)   (mainframe-segment-
                       mapped-product)                            transform)

CDP Table: cdp_generic.customer_risk_profile

One row per customer per extract date. Combines:

Source FDP Table Fields
event_transaction_excess customer identity, account exposure, current balance
portfolio_account_excess risk decision, score, decision outcome
portfolio_account_facility loan amount, interest rate, term, facility status

Derived field cdp_segment:

  • ACTIVE_APPROVED — decision approved + positive balance
  • DECLINED — decision declined
  • REFERRED — decision referred for manual review
  • PENDING — no decision yet

Structure

deployments/fdp-to-consumable-product/
├── pyproject.toml
├── Dockerfile                   # generic-cdp-transformation image
├── cloudbuild.yaml
├── dbt/
│   ├── dbt_project.yml
│   ├── packages.yml
│   └── models/
│       ├── staging/fdp/         # Thin wrappers over fdp_generic source tables
│       │   ├── _fdp_sources.yml
│       │   ├── stg_fdp_event_transaction_excess.sql
│       │   ├── stg_fdp_portfolio_account_excess.sql
│       │   └── stg_fdp_portfolio_account_facility.sql
│       └── cdp/                 # CDP output table
│           ├── _generic_cdp_models.yml
│           └── customer_risk_profile.sql
├── dbt/
│   └── macros/
│       └── cdp_quality_checks.sql
└── tests/

Running Locally

# Setup venv
./scripts/setup_deployment_venv.sh fdp-to-consumable-product

# Activate and install dbt deps
source deployments/fdp-to-consumable-product/venv/bin/activate
cd deployments/fdp-to-consumable-product/dbt
dbt deps

# Run CDP models
export GCP_PROJECT_ID=joseph-antony-aruja
dbt run --target dev

# Run tests
dbt test

Docker Build

cd /path/to/gcp-pipeline-reference
gcloud builds submit \
  --config deployments/fdp-to-consumable-product/cloudbuild.yaml \
  --substitutions _LIBRARY_VERSION=1.0.29 \
  .

Metadata

Release files for gcp-pipeline-ref-cdp 1.0.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gcp-pipeline-ref-cdp 1.0.29
File Size Uploaded
gcp_pipeline_ref_cdp-1.0.29.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gcp-pipeline-ref-cdp 1.0.29
File Interpreter ABI Platform
gcp_pipeline_ref_cdp-1.0.29-py3-none-any.whl Python 3 none any Details

Total release size: 21.2 kB

Release files / gcp_pipeline_ref_cdp-1.0.29.tar.gz

Download URL gcp_pipeline_ref_cdp-1.0.29.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f65ad63fe45efd3e356624420afdc0acf3079f02c0fcf92bc305f68cd86cce87
BLAKE2b-256 checksum
How to use checksums
1fc1338a4084e93c0b6e489a993d6e1254b7f785d73903eeea82ae83377c7552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / gcp_pipeline_ref_cdp-1.0.29-py3-none-any.whl

Download URL gcp_pipeline_ref_cdp-1.0.29-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3264e7a182df142f55dd17ff1cff06a08ee6588e7df20d7da3613dce7a3af02d
BLAKE2b-256 checksum
How to use checksums
3ecbd063507852bdb89980623b1e50577c545ad3778efca56a67347dade4bdff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

1.0.29 This release

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page