search your problems solution in this blog...

10
Home Datastage Related Datastage Training Big Data Unix Database Interview Related Certifications Discussion Forum Feedback Many thanks for visiting my Blog..!!Please share this blog using Tweet 0 0 Share 1 4 Share This Blog..!! 0 Like S Datastage Slowly Changing Dimensions Slowly Changing Dimensions (SCDs) are dimensions that have data that changes slowly, rather than changing on a timebased, regular schedule. Type 1 The Type 1 methodology overwrites old data with new data, and therefore does not track historical data at all. Here is an example of a database table that keeps supplier information: Supplier_Key Supplier_Code Supplier_Name Supplier_State 123 ABC Acme Supply Co CA In this example, Supplier_Code is the natural key and Supplier_Key is a surrogate key. Technically, the surrogate key is not necessary, since the table will be unique by the natural key (Supplier_Code). However, the joins will perform better on an integer than on a character string. Now imagine that this supplier moves their headquarters to Illinois. The updated table would simply overwrite this record: Supplier_Key Supplier_Code Supplier_Name Supplier_State 123 ABC Acme Supply Co IL Datastage Implementations – Slowly Changing Dimensions Basics of SCD Search SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG Select Language TRANSLATE THIS BLOG VISITOR'S VIEW COUNT 8 0 6 2 5 9 Log In Devendra Kumar Yadav 181 followers Follow ABOUT ME : CLICK ON G+ BUTTON TO FOLLOW ME OTHER DATASTAGE QUESTIONS SOLUTIONS 1 More Next Blog» Create Blog Sign In

Upload: ledung

Post on 31-Mar-2018

235 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Home Datastage Related Datastage Training Big Data Unix Database Interview Related Certifications Discussion Forum Feedback

Many thanks for visiting my Blog..!!Please share this blog using below share buttons and leave your Comments/Feedback/Appreciations on 

Tweet 0 0Share 1 4 Share This Blog..!!0Like S

Datastage Slowly Changing Dimensions

Slowly Changing Dimensions (SCDs) are dimensions that have data that changes slowly, rather than changing on a timebased, regular schedule.

Type 1

The Type 1 methodology overwrites old data with new data, and therefore does not track historical data at all.

Here is an example of a database table that keeps supplier information:

Supplier_Key    Supplier_Code    Supplier_Name       Supplier_State

123    ABC    Acme Supply Co        CA

In this example, Supplier_Code is the natural key and Supplier_Key is a surrogate key. Technically, the surrogate key is not necessary, since the

table will be unique by the natural key (Supplier_Code). However, the joins will perform better on an integer than on a character string.

Now imagine that this supplier moves their headquarters to Illinois. The updated table would simply overwrite this record:

Supplier_Key Supplier_Code   Supplier_Name Supplier_State

123 ABC   Acme Supply Co    IL

Datastage Implementations – Slowly Changing Dimensions

Basics of SCD

Search

SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG

Select Language ▼

TRANSLATE THIS BLOG VISITOR'S VIEW COUNT

8 0 6 2 5 9

Log In

Devendra Kumar Yadav

181 followers

Follow

ABOUT ME : CLICK ON G+ BUTTON TO FOLLOW ME

OTHER DATASTAGE QUESTIONS SOLUTIONS

1   More    Next Blog» Create Blog   Sign In

Page 2: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Type 2

The Type 2 method tracks historical data by creating multiple records for a given natural key in the dimensional tables with separate surrogate keys

and/or different version numbers. With Type 2, we have unlimited history preservation as a new record is inserted each time a change is made.

In the same example, if the supplier moves to Illinois, the table could look like this, with incremented version numbers to indicate the sequence of

changes:

Supplier_Key Supplier_Code Supplier_Name Supplier_State Version

123 ABC Acme Supply Co CA 0

124 ABC Acme Supply Co IL 1

Another popular method for tuple versioning is to add effective date columns.

Supplier_Key Supplier_Code Supplier_Name Supplier_State Start_Date End_Date

123 ABC Acme Supply Co CA 01Jan2000 21Dec2004

124 ABC Acme Supply Co IL 22Dec2004

The null End_Date in row two indicates the current tuple version. In some cases, a standardized surrogate high date (e.g. 99991231) may be used

as an end date, so that the field can be included in an index, and so that nullvalue substitution is not required when querying.

Step 1: Create a datastage job with the below structure

1.  Source file that comes from the OLTP sources2.  Old dimesion refernce table link3.  The SCD stage4.  Target Fact Table5.  Dimesion Update/Insert link 

How to Implement SCD using DataStage 8.1 –SCD stage?

►  2014 (34)

▼  2013 (48)►  Dec (8)

►  Nov (15)

►  Oct (12)

▼  Jan (13)IBM DataStage 8.5 New Features

Use of Stages in Datastage 8.5 or 8x Series

New Debug feature in DataStage 8.5

DS Parallel Processing & Partition Techniques

Datastage Transformer Stage Looping concept

Data Modeling Concept in Datawarehouse

DW&BI Concepts Interview Questions and Answers

Datastage 8x Engine/Tiers Start and Stop Process

RT_SCTEMP Error : Not able to run Datastage Jobs

Parameters Using Parameter/Value Set/Value File

Delete DataStage jobs from the command line

Datastage Slowly Changing Dimensions

Disk Space Estimation

►  2012 (4)

Datastage 8.5, 8.7 and 9.1 Differences

Datastage Transformer Stage Looping concept

Data partitioning & collecting methods Examples

IBM Datastage 9.1 Newly Added features

DATASTAGE Performance Tuning Tips V1.1

Surrogate Key Generator Implementation

Parameters Using Parameter/Value Set/Value File

Use of Stages in Datastage 8.5 or 8x Series

Datastage Interview Questions and Answers V1.4

Datastage Scenario Based Question/Answer :1

MY MOST POPULAR FREQUENTLY ACCESSED POSTS

LIST OF VISITOR'S COUNTRIES

Page 3: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Figure 1

Step 2:  To set up the SCD properties in the SCD stage ,open the stage and access the Fast Path

Figure 2

Step 3: The tab 2 of SCD stage is used specify the purpose of each of the pulled keys from the referenced dimension tables.

RECENTLY VISITED USER'S LOCATION

Live Traffic Feed

A visitor from Montréal, Quebec viewed"DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Surrogate KeyGenerator Implementation" 4 mins agoA visitor from Mumbai, Maharashtra left"DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Datastage RelatedProblems and Solutions" via datastageinfoguide.blogspot.com 11 mins agoA visitor from Hyderabad, Andhra Pradeshviewed "DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Datastage Jobs BestPractices for Tuning" 12 mins agoA visitor from Hyderabad, Andhra Pradesh left"DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Search results forfunnel stage" via datastageinfoguide.blogspot.com.au 12 mins ago

A visitor from Bangalore, Karnataka viewed"DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Sequential File BestPerformance Tips/Settings" 17 mins agoA visitor from Mumbai, Maharashtra left"DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Datastage RelatedProblems and Solutions" via datastageinfoguide.blogspot.com 24 mins agoA visitor from Mumbai, Maharashtra viewed"DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: ConductorNode,Section Leaders and Players" 35 mins agoA visitor from Hyderabad, Andhra Pradeshviewed "DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Datastage Jobs BestPractices for Tuning" 37 mins agoA visitor from Grand Rapids, Michigan viewed"DEV'S DATASTAGE

Page 4: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Figure 3

Step 4: Tab 3 is used to provide the seqence generator file/table name which is used to generate the new surrogate keys for the new or latest

dimesion records.These are keys which also get passed to the fact tables for direct load.

Realtime view · Menu

Practices for Tuning" 37 mins ago"DEV'S DATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: IBM Datastage 9.1Newly Added features" 40 mins agoA visitor from India viewed "DEV'SDATASTAGETUTORIAL,GUIDES,TRAINING ANDONLINE HELP 4 U. UNIX, ETL, DATABASE

Aries3/214/19

Taurus4/205/20

Gemini5/216/21

Cancer6/227/22

Leo7/238/22

Virgo8/239/22

Libra9/2310/22

Scorpio10/2311/21

Sagittarius11/2212/21

Capricorn12/221/19

Aquarius1/202/18

Pisces2/193/20

Daily Horoscopes

Made by albinoblacksheep.com Terms

DAILY HOROSCOPES

MY BLOG POSTS

DEV'S DATAWAREHOUSING HELP GUIDEDataStage Parallel jobs fail with failure code 11

Page 5: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Figure 4

Step 5:  The Tab 4 is used to set the properties for configuring the data population logic for the new and old dimension rows. The type of activies

that we can configure as a part of this tab are:

1.  Generation the new Surrogate key values to be passed to the dimension and fact table2.  Mapping the source columns with the source column3.  Setting up of the expired values for the old rows4.  Defining the values to mark the current active rows out of multiple type rows

Page 6: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Figure 5

Step 6: Set the derivation logic for the fact as a part of the last tab.

Page 7: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Figure 6

Step 7: Complete the remaining set up, run the job

Page 9: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

DEV'S DATASTAGE TUTORIAL,GUIDES,TRAININGAND ONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Readers Discussion QuestionAnswers Section 51 comments

DEV'S DATASTAGE TUTORIAL,GUIDES,TRAININGAND ONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: New Debug feature inDataStage 8.5 2 commentsDEV'S DATASTAGE TUTORIAL,GUIDES,TRAINING

AND ONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Data Modeling Concept inDatawarehouse 1 comment

DEV'S DATASTAGE TUTORIAL,GUIDES,TRAININGAND ONLINE HELP 4 U. UNIX, ETL, DATABASERELATED SOLUTIONS: Datastage PerformanceTuning Tips V1.2 3 comments

AROUND THE WEB

ALSO ON DK.DSXCHANGE  DWBI TUTORIAL

WHAT'S THIS?

Incredible PictureGalleries Of Life AroundThe World

PBH Network

14 Foods That Will MakeYou Happier

Lifespan

'XForce' Will Be the NextXMen Movie

Stack

The Top 5 Coolest KitCars

Web2Carz.com

1 Comment DK.DSXchange  DWBI Tutorial  Login

Sort by Newest Share ⤤

Join the discussion…

mahesh tanpure  •  2 years agoArticle gives good understanding of implementation..good job

Favorite ★

Page 10: SEARCH YOUR PROBLEMS SOLUTION IN THIS BLOG …files.datastage.webnode.com/200000155-541bb55157... · Home Datastage Related Datastage Training Big Data ... version numbers to indicate

Newer Post Older PostHome

Subscribe to: Post Comments (Atom)

All content provided on this http://datastageinfoguide.blogspot.in blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completenessof any information on this site or found by following any link on this site.The owner of http://datastageinfoguide.blogspot.in will not be liable for any errors or omissions in this information nor forthe availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.

DISCLAIMER

.

Search

FIND YOUR PROBLEMS SOLUTION HERE ..!