top of page
TRF_TABLE Data Mapping
Requirement
Requirement: Develop an SQL-based logic to display all the columns as per the field mappings provided in the attached trf_invntry_txn_sql_mapping Excel file.
_The excel file mainly includes:_
- Data_map – This file contains the source-to-target mapping for the target fields
- Source_tables - this sheet contains the name of source tables, filter conditions and joining conditions between source tables.
- movment_mapping - Lookup file to populate the flag columns using the data in this sheet.
- lkp_mapping -Lookup to store the movement mapping and column details.
Acceptance Criteria:
- Use CTEs instead of temp views or subqueries in the main SQL.
- Any aggregation function should be handled in respective CTEs.
- Primary Keys to handle the duplicates are prod_plant_lot_location_key and transaction_id
Output: Display the Results
Purgo AI Agentic Code
bottom of page