ODI 12c Data Lineage Query with Source, Staging, Target table column details

33 Views Asked by At

can I please get ODI 12c Data Lineage Query in SQL language for Source table, staging table, target table details in the given mapping?

Please provide the Oracle Query with snp tables. I have multiple mappings to look into. When I am getting source columns in output, then target columns are nulls. when I am getting target columns in output, then source columns are nulls. But I need both source, target columns and which source column is related to which target column in single row. I will post my Draft data lineage query. can U please look into it:

SELECT

    m.name           AS mapping_name,
    t1.table_name    AS source_tables,
    src_col.col_name AS source_columns,
    t2.table_name    AS target_tables,
    tgt_col.col_name AS target_columns
FROM
         dnogp2_bia_odirepo.snp_mapping m
    INNER JOIN dnogp2_bia_odirepo.snp_map_comp mc ON m.i_mapping = mc.i_owner_mapping
    INNER JOIN dnogp2_bia_odirepo.snp_map_cp   cp ON mc.i_map_comp = cp.i_owner_map_comp
    INNER JOIN dnogp2_bia_odirepo.snp_map_ref  mr ON mc.i_map_ref = mr.i_map_ref
    LEFT JOIN dnogp2_bia_odirepo.snp_table    t1 ON mr.i_ref_id = t1.i_table
                                                 AND t1.table_type = 'SY'
    LEFT JOIN dnogp2_bia_odirepo.snp_table    t2 ON mr.i_ref_id = t2.i_table
                                                 AND t2.table_type = 'T'
    LEFT JOIN dnogp2_bia_odirepo.snp_col      src_col ON t1.i_table = src_col.i_table
    LEFT JOIN dnogp2_bia_odirepo.snp_col      tgt_col ON t2.i_table = tgt_col.i_table
WHERE
        cp.direction = 'I' --Input connection point
    AND cp.i_map_cp NOT IN (
        SELECT
            i_start_map_cp
        FROM
            dnogp2_bia_odirepo.snp_map_conn
    )
    AND m.name LIKE '%SALES_ENGG_REVISION%'
ORDER BY
    m.name;

I need data lineage query for ODI 12c Mappings

0

There are 0 best solutions below