Professional Documents
Culture Documents
Page 1 of 7
Table Of Contents
1. INTRODUCTION .....................................................................................................................................3 2. LEARNINGS...............................................................................................................................................3 3. CREATING THE REQUIRED TABLES................................................................................................3 4. POPULATING BRAND MASTER .........................................................................................................4 5. POPULATING CATEGORY MASTER ................................................................................................4 6. POPULATING PRODUCT MASTER.....................................................................................................4 7. POPULATING BRANCH MASTER.......................................................................................................4 8. POPULATING COUNTRY MASTER....................................................................................................4 9. POPULATING SALES MASTER............................................................................................................4 10. POPULATING CITY AND STATE MASTER.....................................................................................5 11. POPULATING CITY DATA USING SQL OVERRIDE.....................................................................5 12. POPULATING THE DIMENSIONS AND FACT ...............................................................................5 13. APPENDIX A............................................................................................................................................5 SEQUENCE SEQ_CATEGORY.................................................................................................................................6 FISCAL CALCULATION.........................................................................................................................................6
Page 2 of 7
1. Introduction
This assignment is intended for developers who are new to Informatica. Information on the system is specified in the attachment.
sales_design_applica tion.doc
2. Learnings
After completing the assignments in this document you will have knowledge on the following a. Importing source and target definitions b. Creating source and target definitions c. Source qualifier (also look into sql override) d. Filter transform e. Router transform f. Expression transform g. Update strategy transform h. Lookup transform (also try connected, unconnected lookups) i. Joiner transform j. Sequence generator k. Data loading from fixed record length flat file to table l. Data loading from variable record length flat file to table m. Data loading from table to table Following needs to be done for each transform a. Explore on the different settings that can be done on different transforms b. Validate the transforms c. In the metadata extension enter the functionality of the transform d. Use the debugger Estimated total time for doing all the assignments in this document is around 20 hrs.
sales_data.zip
Page 3 of 7
table_creation.SQL
Note: Name mappings like bixxxxx_a_b_c_m_mapping_name Where a is assignment number and b- is question number and c- is sub question numbers Name targets in mappings starting with bixxxxx . So that all log or <.out> files will be crated in same fashion. 4. Populating Brand master
Create a fixed length flat file and load the data into brand master using informatica The data should be truncated before loading.
Page 4 of 7
Sales Data Warehouse (Informatica) Module 1 10 in table. Insert the data if not existing else update. Consider (product_id, branch_id, date_of_sales) as primary key.
13. Appendix A
Page 5 of 7
Sales Data Warehouse (Informatica) Module 1 These objects may already exist, Please create only if not existing.
Sequence seq_category
CREATE SEQUENCE seq_category INCREMENT BY 1 START WITH 1 NOMAXVALUE NOMINVALUE;
Fiscal calculation
FUNCTION ctd_get_fiscal_format_fnc(p_date_in IN DATE) return VARCHAR2 AS v_week NUMBER(5); v_month NUMBER(5); v_year NUMBER(5); v_fiscal_format VARCHAR2(7); BEGIN SELECT to_char(p_date_in,'IW') INTO v_week FROM dual; SELECT to_char(to_date(to_char(p_date_in,'IY'),'YY'),'YYYY') INTO v_year FROM dual; IF(v_week <= 5) THEN v_month:= 1; ELSIF(v_week <= 9) THEN v_month:= 2; ELSIF(v_week <= 13) THEN v_month:= 3; ELSIF(v_week <= 18) THEN v_month:= 4; ELSIF(v_week <= 22) THEN v_month:= 5; ELSIF(v_week <= 26) THEN v_month:= 6; ELSIF(v_week <= 31) THEN v_month:= 7; ELSIF(v_week <= 35) THEN v_month:= 8; ELSIF(v_week <= 39) THEN v_month:= 9; ELSIF(v_week <= 44) THEN v_month:= 10; ELSIF(v_week <= 48) THEN v_month:= 11; ELSIF(v_week <= 53) THEN v_month:= 12; END IF; v_fiscal_format:= v_year || '-' || LPAD(v_month,2,'0'); RETURN v_fiscal_format;
Page 6 of 7
Sales Data Warehouse (Informatica) Module 1 EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20101,'Error in ctd_business_plan_pkg.ctd_get_fiscal_format_fnc'||SQLCODE||'-'||SUBSTR(SQLERRM,1,500) ); END ctd_get_fiscal_format_fnc;
Page 7 of 7