Skip to Content
Author's profile photo Former Member

Date Generation Transform by using different Date Functions

Description:

      Date_Generation transform is used for creating time dimension tables. This transform generates a column which holds the date values based on the start & end dates provided as an input to the transform by considering the increment provided to it.

Here is the step by step guide to achieve the transformation.

Create a Project

/wp-content/uploads/2013/02/1_187239.png

Create a Batch Job

/wp-content/uploads/2013/02/2_187240.png

Take Work Flow and Data Flow

/wp-content/uploads/2013/02/3_187259.png

Take Date Generation Transformation

/wp-content/uploads/2013/02/4_187260.png

Double Click on Date_Generation Transform and Provide the details as below

/wp-content/uploads/2013/02/5_187261.png

Take the Query Transformation and join to the Date Generation Transformation

/wp-content/uploads/2013/02/6_187262.png

Go to Query Transform and Create New Output Column

/wp-content/uploads/2013/02/7_187263.png

Provide the Name for the Output Column to return the week in year

/wp-content/uploads/2013/02/8_187264.png

Go to Functions and select Date Functions then week_in_year function and click on Next

/wp-content/uploads/2013/02/9_187268.png

Select the Date_Generation Transform generated column then click on Finish

/wp-content/uploads/2013/02/10_187269.png

After mapping the week_in_year and create another New Output Column to Quarter of the Year

/wp-content/uploads/2013/02/11_187270.png

Give the name and data type for another output column then click on OK

/wp-content/uploads/2013/02/12_187271.png

Go to Functions and select Date Functions and the select quarter and click on Next

/wp-content/uploads/2013/02/13_187272.png

Select the Date_Generation transform generated column and click on OK

/wp-content/uploads/2013/02/14_187273.png

Click on Finish

/wp-content/uploads/2013/02/15_187274.png

Again create another output column return last date

/wp-content/uploads/2013/02/16_187275.png

Name the column and data type for the newly created output column

Go to Date functions and select last_date function then click on Next

/wp-content/uploads/2013/02/17_187276.png

Click on Finish

/wp-content/uploads/2013/02/18_187277.png

After mapping the all new ouput columns ,Validate the current window

/wp-content/uploads/2013/02/19_187278.png

Take the Template Table and join to the Query Transformation

Execute the Job

After executing the job check the data in the Target

/wp-content/uploads/2013/02/21_187279.png

/wp-content/uploads/2013/02/22_187280.png

/wp-content/uploads/2013/02/23_187281.png

Thanks for following.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.