Skip to content

A PCI DSS data lake with the scope in a query.

The columns that hold cardholder data in a saved query, tags on tables and columns where the data lives, and every Spark job that read them in lineage. Row filters and column masks come with an Enterprise module.

33 columns.
16 cardholder data.

Every column of payment_processing in PCI DSS Data Inventory, a square each, by table and class

pci_data_inventory33 columns

  1. transactions
  2. disputes
  3. payment_accounts
  4. merchants
  5. risk_scores
  6. daily_aggregates
  7. exchange_rates

A PCI DSS data inventory as a saved query

Scope starts with a list of every column and whether it holds cardholder data. PCI DSS Data Inventory keeps that list as a saved query on DuckDB, next to the tables it describes.

Cardholder data, column by column

payment_processing.transactionsPCI_DSSPSD2GOLDEN_SOURCETIER_1

payment_processing.disputesREGULATORYSENSITIVEGOLDEN_SOURCETIER_1

payment_processing.payment_accountsSENSITIVEPCI_DSSGOLDEN_SOURCETIER_1

payment_processing.merchantsPIIGOLDEN_SOURCETIER_1

payment_processing.risk_scoresREGULATORYSENSITIVE

payment_processing.daily_aggregatesDERIVEDTIER_2

payment_processing.exchange_ratesGOLDEN_SOURCETIER_2

disputes.card_brand

IN_SCOPE_CHDcardholder data

data_category
Card Network
encryption_required
No
retention_note
Retain 7 years from resolution
tags on the column
none
tags on the table
REGULATORYSENSITIVEGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

disputes.dispute_amount

IN_SCOPE_CHDcardholder data

data_category
Financial Amount
encryption_required
Yes (at rest)
retention_note
Retain 7 years from resolution
tags on the column
SENSITIVEREGULATORY
tags on the table
REGULATORYSENSITIVEGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

disputes.dispute_id

IN_SCOPE_CHDcardholder data

data_category
Dispute Reference
encryption_required
Yes (at rest)
retention_note
Retain 7 years from resolution
tags on the column
none
tags on the table
REGULATORYSENSITIVEGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

disputes.merchant_id

IN_SCOPE_CHDcardholder data

data_category
Merchant Reference
encryption_required
Yes (at rest)
retention_note
Retain 7 years from resolution
tags on the column
none
tags on the table
REGULATORYSENSITIVEGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

disputes.transaction_id

IN_SCOPE_CHDcardholder data

data_category
Transaction Reference
encryption_required
Yes (at rest)
retention_note
Retain 7 years from resolution
tags on the column
none
tags on the table
REGULATORYSENSITIVEGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

payment_accounts.account_id

IN_SCOPE_CHDcardholder data

data_category
Account Reference
encryption_required
Yes
retention_note
Retain while active + 7 years
tags on the column
none
tags on the table
SENSITIVEPCI_DSSGOLDEN_SOURCETIER_1
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.amount

IN_SCOPE_CHDcardholder data

data_category
Transaction Amount
encryption_required
Yes (at rest)
retention_note
Max 18 months hot, 7 years archive
tags on the column
SENSITIVEPSD2
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.batch_id

IN_SCOPE_CHDcardholder data

data_category
Settlement Batch
encryption_required
No
retention_note
Max 18 months hot, 7 years archive
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.currency

IN_SCOPE_CHDcardholder data

data_category
Currency Code
encryption_required
No
retention_note
Max 18 months hot, 7 years archive
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.interchange_fee

IN_SCOPE_CHDcardholder data

data_category
Fee Data
encryption_required
Yes (at rest)
retention_note
Max 18 months hot, 7 years archive
tags on the column
SENSITIVE
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.merchant_id

IN_SCOPE_CHDcardholder data

data_category
Merchant Reference
encryption_required
Yes (at rest)
retention_note
Max 18 months hot, 7 years archive
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.net_amount

IN_SCOPE_CHDcardholder data

data_category
Settlement Amount
encryption_required
Yes (at rest)
retention_note
Max 18 months hot, 7 years archive
tags on the column
SENSITIVE
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.payment_method

IN_SCOPE_CHDcardholder data

data_category
Payment Instrument Type
encryption_required
No
retention_note
Max 18 months hot, 7 years archive
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.processing_fee

IN_SCOPE_CHDcardholder data

data_category
Fee Data
encryption_required
Yes (at rest)
retention_note
Max 18 months hot, 7 years archive
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.scheme_fee

IN_SCOPE_CHDcardholder data

data_category
Fee Data
encryption_required
Yes (at rest)
retention_note
Max 18 months hot, 7 years archive
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.transaction_id

IN_SCOPE_CHDcardholder data

data_category
Transaction Reference
encryption_required
Yes (at rest)
retention_note
Max 18 months hot, 7 years archive
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.shopper_country

SENSITIVE_AUTHsensitive

data_category
Cardholder Geography
encryption_required
Yes
retention_note
Max 18 months, then anonymize
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

disputes.reason_code

IN_SCOPE_OPERATIONALoperational

data_category
Dispute Classification
encryption_required
No
retention_note
Retain 7 years from resolution
tags on the column
none
tags on the table
REGULATORYSENSITIVEGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

merchants.pci_compliance_level

IN_SCOPE_OPERATIONALoperational

data_category
Compliance Status
encryption_required
No
retention_note
Retain while active + 1 year
tags on the column
none
tags on the table
PIIGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

risk_scores.chargeback_risk_score

IN_SCOPE_OPERATIONALoperational

data_category
Risk Assessment
encryption_required
No
retention_note
Retain 2 years
tags on the column
none
tags on the table
REGULATORYSENSITIVE
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

risk_scores.fraud_risk_score

IN_SCOPE_OPERATIONALoperational

data_category
Risk Assessment
encryption_required
No
retention_note
Retain 2 years
tags on the column
none
tags on the table
REGULATORYSENSITIVE
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

risk_scores.merchant_id

IN_SCOPE_OPERATIONALoperational

data_category
Merchant Reference
encryption_required
No
retention_note
Retain while active + 2 years
tags on the column
none
tags on the table
REGULATORYSENSITIVE
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.is_3ds

IN_SCOPE_OPERATIONALoperational

data_category
Auth Flag
encryption_required
No
retention_note
Max 18 months hot
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

transactions.sca_method

IN_SCOPE_OPERATIONALoperational

data_category
Auth Method
encryption_required
No
retention_note
Max 18 months hot
tags on the column
none
tags on the table
PCI_DSSPSD2GOLDEN_SOURCETIER_1
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

daily_aggregates.gross_amount_eur

OUT_OF_SCOPEout of scope

data_category
Aggregated Financial
encryption_required
No
retention_note
Retain 5 years
tags on the column
none
tags on the table
DERIVEDTIER_2
  • read by data_quality_check.py writes data_quality_report
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

daily_aggregates.net_amount_eur

OUT_OF_SCOPEout of scope

data_category
Aggregated Financial
encryption_required
No
retention_note
Retain 5 years
tags on the column
none
tags on the table
DERIVEDTIER_2
  • read by data_quality_check.py writes data_quality_report
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

exchange_rates.currency

OUT_OF_SCOPEout of scope

data_category
Market Data
encryption_required
No
retention_note
Retain indefinitely
tags on the column
none
tags on the table
GOLDEN_SOURCETIER_2
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

exchange_rates.rate

OUT_OF_SCOPEout of scope

data_category
Market Data
encryption_required
No
retention_note
Retain indefinitely
tags on the column
none
tags on the table
GOLDEN_SOURCETIER_2
  • read by daily_transaction_etl.py writes daily_aggregatesOUT_OF_SCOPE
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

merchants.mcc_code

OUT_OF_SCOPEout of scope

data_category
Classification Code
encryption_required
No
retention_note
Retain while active + 7 years
tags on the column
none
tags on the table
PIIGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

merchants.merchant_id

OUT_OF_SCOPEout of scope

data_category
Business Identifier
encryption_required
No
retention_note
Retain while active + 7 years
tags on the column
PII
tags on the table
PIIGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

merchants.merchant_name

OUT_OF_SCOPEout of scope

data_category
Business Name
encryption_required
No
retention_note
Retain while active + 7 years
tags on the column
PII
tags on the table
PIIGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

merchants.settlement_currency

OUT_OF_SCOPEout of scope

data_category
Financial Config
encryption_required
No
retention_note
Retain while active
tags on the column
none
tags on the table
PIIGOLDEN_SOURCETIER_1
  • read by data_quality_check.py writes data_quality_report
  • read by monthly_risk_scoring.py writes merchant_risk_scores
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

payment_accounts.merchant_id

OUT_OF_SCOPEout of scope

data_category
Foreign Key
encryption_required
No
retention_note
Retain while active + 7 years
tags on the column
none
tags on the table
SENSITIVEPCI_DSSGOLDEN_SOURCETIER_1
may run SQL on it
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN, RISK_COMPLIANCE_OFFICER
may open its files
PAYMENT_ENGINEER, PAYMENT_ANALYST, PLATFORM_ADMIN

Ilum Community decides who may run SQL, not which columns a query returns. Masking this column or filtering its rows per role takes Apache Ranger, an Enterprise module.

The inventory’s columns by table, coloured by class. Pick one: how it must be encrypted and kept, the tags on it and on its table, the jobs that read it, and who may query it. In Ilum Community a role runs SQL on every table or on none.
The query and the tags
PCI DSS Data InventorySaved query Payments/Compliance · DuckDB
-- name: Payments/Compliance/PCI DSS Data Inventory
-- engine: DUCKDB
-- maxRows: 1000
-- description: Catalog all tables and columns with PCI DSS scope classification for cardholder data environment

SELECT
    table_name,
    column_name,
    pci_scope,
    data_category,
    encryption_required,
    retention_note
FROM (
    -- merchants table
    SELECT 'merchants' AS table_name, 'merchant_id' AS column_name,
           'OUT_OF_SCOPE' AS pci_scope, 'Business Identifier' AS data_category,
           'No' AS encryption_required, 'Retain while active + 7 years' AS retention_note
    UNION ALL SELECT 'merchants', 'merchant_name', 'OUT_OF_SCOPE', 'Business Name', 'No', 'Retain while active + 7 years'
    UNION ALL SELECT 'merchants', 'mcc_code', 'OUT_OF_SCOPE', 'Classification Code', 'No', 'Retain while active + 7 years'
    UNION ALL SELECT 'merchants', 'pci_compliance_level', 'IN_SCOPE_OPERATIONAL', 'Compliance Status', 'No', 'Retain while active + 1 year'
    UNION ALL SELECT 'merchants', 'settlement_currency', 'OUT_OF_SCOPE', 'Financial Config', 'No', 'Retain while active'

    -- payment_accounts table
    UNION ALL SELECT 'payment_accounts', 'account_id', 'IN_SCOPE_CHD', 'Account Reference', 'Yes', 'Retain while active + 7 years'
    UNION ALL SELECT 'payment_accounts', 'merchant_id', 'OUT_OF_SCOPE', 'Foreign Key', 'No', 'Retain while active + 7 years'

    -- transactions table
    UNION ALL SELECT 'transactions', 'transaction_id', 'IN_SCOPE_CHD', 'Transaction Reference', 'Yes (at rest)', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'merchant_id', 'IN_SCOPE_CHD', 'Merchant Reference', 'Yes (at rest)', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'amount', 'IN_SCOPE_CHD', 'Transaction Amount', 'Yes (at rest)', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'currency', 'IN_SCOPE_CHD', 'Currency Code', 'No', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'payment_method', 'IN_SCOPE_CHD', 'Payment Instrument Type', 'No', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'interchange_fee', 'IN_SCOPE_CHD', 'Fee Data', 'Yes (at rest)', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'scheme_fee', 'IN_SCOPE_CHD', 'Fee Data', 'Yes (at rest)', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'processing_fee', 'IN_SCOPE_CHD', 'Fee Data', 'Yes (at rest)', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'net_amount', 'IN_SCOPE_CHD', 'Settlement Amount', 'Yes (at rest)', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'is_3ds', 'IN_SCOPE_OPERATIONAL', 'Auth Flag', 'No', 'Max 18 months hot'
    UNION ALL SELECT 'transactions', 'sca_method', 'IN_SCOPE_OPERATIONAL', 'Auth Method', 'No', 'Max 18 months hot'
    UNION ALL SELECT 'transactions', 'batch_id', 'IN_SCOPE_CHD', 'Settlement Batch', 'No', 'Max 18 months hot, 7 years archive'
    UNION ALL SELECT 'transactions', 'shopper_country', 'SENSITIVE_AUTH', 'Cardholder Geography', 'Yes', 'Max 18 months, then anonymize'

    -- disputes table
    UNION ALL SELECT 'disputes', 'dispute_id', 'IN_SCOPE_CHD', 'Dispute Reference', 'Yes (at rest)', 'Retain 7 years from resolution'
    UNION ALL SELECT 'disputes', 'transaction_id', 'IN_SCOPE_CHD', 'Transaction Reference', 'Yes (at rest)', 'Retain 7 years from resolution'
    UNION ALL SELECT 'disputes', 'merchant_id', 'IN_SCOPE_CHD', 'Merchant Reference', 'Yes (at rest)', 'Retain 7 years from resolution'
    UNION ALL SELECT 'disputes', 'dispute_amount', 'IN_SCOPE_CHD', 'Financial Amount', 'Yes (at rest)', 'Retain 7 years from resolution'
    UNION ALL SELECT 'disputes', 'reason_code', 'IN_SCOPE_OPERATIONAL', 'Dispute Classification', 'No', 'Retain 7 years from resolution'
    UNION ALL SELECT 'disputes', 'card_brand', 'IN_SCOPE_CHD', 'Card Network', 'No', 'Retain 7 years from resolution'

    -- risk_scores table
    UNION ALL SELECT 'risk_scores', 'merchant_id', 'IN_SCOPE_OPERATIONAL', 'Merchant Reference', 'No', 'Retain while active + 2 years'
    UNION ALL SELECT 'risk_scores', 'chargeback_risk_score', 'IN_SCOPE_OPERATIONAL', 'Risk Assessment', 'No', 'Retain 2 years'
    UNION ALL SELECT 'risk_scores', 'fraud_risk_score', 'IN_SCOPE_OPERATIONAL', 'Risk Assessment', 'No', 'Retain 2 years'

    -- exchange_rates - no PCI scope
    UNION ALL SELECT 'exchange_rates', 'rate', 'OUT_OF_SCOPE', 'Market Data', 'No', 'Retain indefinitely'
    UNION ALL SELECT 'exchange_rates', 'currency', 'OUT_OF_SCOPE', 'Market Data', 'No', 'Retain indefinitely'

    -- daily_aggregates - aggregated, no CHD
    UNION ALL SELECT 'daily_aggregates', 'gross_amount_eur', 'OUT_OF_SCOPE', 'Aggregated Financial', 'No', 'Retain 5 years'
    UNION ALL SELECT 'daily_aggregates', 'net_amount_eur', 'OUT_OF_SCOPE', 'Aggregated Financial', 'No', 'Retain 5 years'
) pci_inventory
ORDER BY
    CASE pci_scope
        WHEN 'IN_SCOPE_CHD' THEN 1
        WHEN 'SENSITIVE_AUTH' THEN 2
        WHEN 'IN_SCOPE_OPERATIONAL' THEN 3
        WHEN 'OUT_OF_SCOPE' THEN 4
        ELSE 5
    END,
    table_name,
    column_name
Tags on the payment tables
Dataset or fieldTags
payment_processing.transactionsPCI_DSS, PSD2, GOLDEN_SOURCE, TIER_1
transactions.amountSENSITIVE, PSD2
payment_processing.payment_accountsSENSITIVE, PCI_DSS, GOLDEN_SOURCE, TIER_1
payment_accounts.ibanPCI_DSS, PII
payment_processing.disputesREGULATORY, SENSITIVE, GOLDEN_SOURCE, TIER_1
disputes.dispute_amountSENSITIVE, REGULATORY
payment_processing.merchant_risk_scoresREGULATORY, SENSITIVE, DERIVED
payment_processing.daily_aggregatesDERIVED, TIER_2

Lineage as the audit trail

An assessor asks where a reported number came from. Every Spark job on Ilum reports what it read and wrote, so the answer is a trail, not a diagram.

daily_aggregates

daily_transaction_etl.py

F.sum("amount_eur").alias("gross_amount_eur"),
.withColumn("amount_eur",
.otherwise(F.col("amount") * F.col("inverse_rate")))
F.sum("interchange_fee_eur").alias("total_interchange_eur"),
.withColumn("interchange_fee_eur",
.otherwise(F.col("interchange_fee") * F.col("inverse_rate")))
F.sum("processing_fee_eur").alias("total_processing_fees_eur"),
.withColumn("processing_fee_eur",
.otherwise(F.col("processing_fee") * F.col("inverse_rate")))
.withColumn("net_amount_eur",
F.col("gross_amount_eur")
- F.col("total_interchange_eur")
F.count("*").alias("transaction_count"),
.groupBy("event_date", "country", "payment_method", "status")
  • transactions.amountIN_SCOPE_CHDSENSITIVEPSD2PCI_DSS
  • transactions.currencyIN_SCOPE_CHDPCI_DSSPSD2
  • exchange_rates.inverse_ratenot in the inventory
  • transactions.interchange_feeIN_SCOPE_CHDSENSITIVEPCI_DSSPSD2
  • transactions.processing_feeIN_SCOPE_CHDPCI_DSSPSD2
  • transactions.scheme_feeIN_SCOPE_CHDPCI_DSSPSD2
  • transactionsnot in the inventoryPCI_DSSPSD2
Pick a column of daily_aggregates: the settlement job’s lines that compute it, and the columns it is read from, with their class and tags. The inventory marks the gross and net totals out of scope, yet they are summed from cardholder data columns of transactions.
The jobs and the roles
What each payment role may do with the data
RoleSQL_EXECUTEFILEEXPLORER_READLINEAGE_READJOB_CREATE
PAYMENT_ENGINEERyesyesyesyes
PAYMENT_ANALYSTyesyesyesno
PLATFORM_ADMINyesyesyesyes
RISK_COMPLIANCE_OFFICERyesnoyesno

How to set up a PCI DSS data lake on Ilum, step by step

Six steps from an install to a scope you can show an assessor. Row filters and column masks per role are the one step that needs Apache Ranger, an Enterprise module.

An install

A scope you can show an assessor

  1. Helm chart

    Add the chart repository and install it on any CNCF-compliant Kubernetes, on premises if the cardholder data environment must stay there.

    helm repo add ilum https://charts.ilum.cloud
    helm install ilum ilum/ilum
  2. SQL editor

    Save PCI DSS Data Inventory in the SQL editor in a folder such as Payments/Compliance, on DuckDB. Add a row whenever a job adds a column.

  3. Tags

    Tag the tables that hold cardholder data PCI_DSS, and single columns where only some are in scope, through the lineage API of Ilum.

  4. Roles

    Give analysts a role with SQL_EXECUTE and without FILEEXPLORER_READ or JOB_CREATE, put people in groups that carry roles, and sign them in through LDAP or OAuth2.

  5. Apache Ranger

    Enable Apache Ranger, an Enterprise module, and write column masks and row filters by column or by tag.

  6. Lineage

    Run the payment jobs on Ilum: lineage of each run goes to Marquez without code, and the console’s actions to the Event Log. How lineage works.

Community and Enterprise
Community and Enterprise
Ilum CommunityIlum Enterprise
Who may run SQLroles and groupsroles and groups
Which rows a query returnsall of themrow filters per role (Enterprise)
Which columns a query showsall of themmasks per role or per tag (Enterprise)
Tags on tables and columnsyesyes
Lineage of every Spark jobyesyes
Actions in the consoleEvent LogEvent Log and data access audit

Questions and answers

Is a data lake in scope for PCI DSS?

The tables and files that store cardholder data are, and so is what can reach them. Totals that no longer carry a single transaction can be out of scope: the inventory here marks the nightly aggregates OUT_OF_SCOPE.

How do I build a PCI DSS data inventory?

List every column of every table with its class, its category, whether it must be encrypted and how long it is kept, and save the list as a query next to the data, so it is reviewed with the code that changes the tables.

How do you tag cardholder data in a data lake?

Put the tag on the data, not in a document: on the dataset when the whole table is in scope, on the field when only some columns are. Ilum takes both through its lineage API and shows them in the Lineage view. The disputes and merchant risk scores of chargeback monitoring carry REGULATORY tags the same way.

Can card data be masked per role in Spark SQL on Ilum?

Yes, with Apache Ranger, an Enterprise module: it enforces column masks and row filters per role at query time. Ilum Community controls who may run SQL at all, not what a query returns.

How does data lineage help a PCI DSS assessment?

It shows every job that read a cardholder data table and what it wrote, down to columns, so the assessor sees where the data went and which outputs need their own scope. How lineage works.

Is Ilum open source?

No. Ilum Community is free to run under a license from Ilum. It is built on open-source engines such as Apache Spark, Trino and DuckDB.

Contact

Tell us about your cluster.

Name one workload you want to move.

Tell us where it runs today.

We answer with a plan, not a deck.

[email protected]

We reply within two working days.