0% found this document useful (0 votes)
27 views

Practical Example 1 PDF

This document provides an example of using data transformations. The source data is a flat file of product data. The requirements are to remove duplicates, only include active records, and create target flat files and tables for different product locations (US, UK, AU) and a central target. A unique sequence number should be added to each product. The target table schema and constraints are defined.

Uploaded by

Pope Smith
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Practical Example 1 PDF

This document provides an example of using data transformations. The source data is a flat file of product data. The requirements are to remove duplicates, only include active records, and create target flat files and tables for different product locations (US, UK, AU) and a central target. A unique sequence number should be added to each product. The target table schema and constraints are defined.

Uploaded by

Pope Smith
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

[email protected] WWW.IDWBI.

COM

Practical Example 1:

For this practical example, you can use the transformations which we have learnt till now.

• Source: Flat File


• Target: Flat File and Relational Table
• Source Data: Products Data

Products Requirement:

• Remove the duplicates


• Records which are in Active status
• Location specific Targets to be created and a central target to be created
o US
o UK
o AU
o All of them
• Adding the Unique Sequence Numbers for each product

Source Data: Copy, the source data into a text file and save it in the source file directory.

SRC_FF_PROD_REQ.txt

Target Table:

--------------------------------------------------------

-- DDL for Table TGT_PRODUCT_REQ

--------------------------------------------------------

CREATE TABLE "TGT_PRODUCT_REQ" ("PRODUCT_ID" VARCHAR2(20), "PRODUCT_NAME"


VARCHAR2(20), "PRODUCT_DESC" VARCHAR2(20), "PRODUCT_PRICE" NUMBER, "PRODUCT_LOC"
VARCHAR2(20), "PRODUCT_STATUS" VARCHAR2(20), "PRODUCT_EXPIRY_DATE" DATE)
[email protected] WWW.IDWBI.COM

--------------------------------------------------------

-- DDL for Index TGT_PRODUCT_REQ_PK

--------------------------------------------------------

CREATE UNIQUE INDEX "TGT_PRODUCT_REQ_PK" ON "TGT_PRODUCT_REQ" ("PRODUCT_ID")

--------------------------------------------------------

-- Constraints for Table TGT_PRODUCT_REQ

--------------------------------------------------------

ALTER TABLE "TGT_PRODUCT_REQ" MODIFY ("PRODUCT_ID" NOT NULL ENABLE)

ALTER TABLE "TGT_PRODUCT_REQ" ADD CONSTRAINT "TGT_PRODUCT_REQ_PK" PRIMARY KEY


("PRODUCT_ID") ENABLE

You might also like