nobilis.Digital
← All sample projects

Custodian data pipeline

Month-end data from two custodians and a CRM, each in its own format and each with problems. Run the pipeline to watch it extract, check, fix, match, and reconcile the data, then select any clean row to see exactly where it came from.

1. Source files, as they arrive

Raw exports. Highlighted lines are the ones the pipeline has to handle.

2. Run the pipeline

Each stage runs on the files above, in your browser.

    Press Run pipeline to start.

    The standardize step, as warehouse code

    The same rules written as a dbt model, the way it runs on a schedule against a client's data warehouse.

    -- models/staging/stg_custodian_b_holdings.sql
    with source as (
        select * from {{ source('custodian_b', 'holdings') }}
    ),
    
    standardized as (
        select
            -- one account format across custodians: NV + digits + letter
            'NV' || upper(regexp_replace(acct, '[^0-9A-Za-z]', '', 'g'))   as account_id,
    
            -- month first, except rows where the first part can only be a day
            case
                when split_part(date, '/', 1)::int > 12
                    then to_date(date, 'DD/MM/YYYY')
                else to_date(date, 'MM/DD/YYYY')
            end                                                            as as_of_date,
    
            upper(trim(security_id))                                       as symbol,
            nullif(qty, '')::numeric                                       as quantity,
    
            -- "(1,250.00)" is accounting notation for -1250.00
            case when mkt_val like '(%)'
                then -1 * replace(trim(both '()' from mkt_val), ',', '')::numeric
                else replace(mkt_val, ',', '')::numeric
            end                                                            as market_value,
    
            upper(ccy)                                                     as currency
        from source
    )
    
    select
        s.*,
        s.market_value * fx.rate                                           as market_value_cad
    from standardized s
    left join {{ ref('fx_month_end') }} fx
        on fx.from_ccy = s.currency and fx.to_ccy = 'CAD' and fx.as_of_date = s.as_of_date

    What a pipeline like this gives you

    Numbers you can defend

    • Every account reconciled to the custodian statement, to the cent.
    • Anything uncertain is held with a reason, never guessed.
    • Each value keeps its source file, line, and every change made to it.

    One version of the client

    • Duplicate CRM records matched and merged.
    • Accounts from every custodian linked to the right household.
    • One currency, one date format, one account format.

    Runs without you

    • Scheduled nightly or at month-end, with alerts when a check fails.
    • Feeds the dashboards and client reports automatically.
    • Version-controlled code your team owns.

    More sample projects

    Want this built on your firm's data?

    We connect to the systems you already use, clean and reconcile the data, and build the dashboards and reports on top. Start with a free 30-minute consultation.

    Schedule meeting