Generate outbound data
Requirement
Introduction : Product table is typically used to manage and organize information related to the products being handled. This table can include various attributes to track products throughout the supply chain.
The product table is joined with stage table to get the MDM derived Ids .These ID are stored in the fact table.
Requirement: Generate a SQL query using the columns from stage (stg_nl_wholesaler) and product table. If some column are not present/available in table from the one listed below then just hardcode as null for those column.
Example: If geo_id is not present in both the table then just hardcode this column as below:
Eg: '' as geo_id
Joining condition : Join stage table and product table based on source_product_id and prod_id and get the records from stage where there is no match. The generated query should have below columns:
packs
source_system_name
country_code
product_id
Customer_ID
brand
geo_id
geo_name
region
territory_name
Unity catalog : stage table - stg_nl_wholesaler
product - d_product
Expected Output: Build Databricks SQL query