New Date Hierarchy

<< Click to Display Table of Contents >>

Current:  Create Data Set > Self-Service Data Set > Data Governance 

New Date Hierarchy

Previous pageReturn to chapter overviewNext page

The user can new Date Hierarchy on the data field of date, time and timestamp by clicking More icon to create user data fields.

clip0335

New Date Hierarchy dialog box opened is as shown in the figure below.  The default name is "Date Hierarchy". You can modify the name as needed, as well as select the date column needed to be created.

The date column that are already in Metadata are are listed in the dialog box and are grayed out and not editable.

Some field types is hidden according to the frequency of use. Click the Expand button to view all field types of the date column.

The content of the gray font is an example of how to use the date column.

 

clip0336

Date is a typical hierarchical structure. When you select a date field, you can set up a hierarchy for the field and select the date dimension to be established. The date dimension supported is as shown in the table below.

Date dimension

Data Type

Description

Year Quarter

Timestamp

Map all the data of this quarter to the first day of the quarter.

Year Month

Timestamp

Map all the data of this month to the first day of the month.

Year Week

Timestamp

Map all the data of this week to the first day of the week.

Full Day

Timestamp

Map all the data of this day to 24:00 of the day.

Full Hour

Timestamp

Map all the data of this hour to the start point of the hour.

Five Minutes

Timestamp

Map all the data of the five minutes to the start point of the five minutes.

Full Minute

Timestamp

Map all the data of the minute to the start point of the minute.

Full Second

Timestamp

Map all the data of the second to the start point of the second.

Year

Integer

Year of date

Quarter

Integer

Quarter of year, 1-4

Month

Integer

Month of year, 1-12

Week Number

Integer

Nth week of each year, 1-52

Day of Month

Integer

Day, nth day of the month, 1-31

Weekday

Integer

Day of week

Hour

Integer

Hour, 0-23

Minute

Integer

Minute, 0-59

Second

Integer

Second, 0-59

 

Year Quarter,Year Month,Year Week,Full Day,Full Hour,Five Minutes,Full Minute,Full Second map corresponding date, time, timestamp data field to timestamp type. Year,Quarter,Month,Week Number,Day of Month,Weekday,Hour,Minute,Second map date, time and timestamp data to integer type.

Assume that there is a timestamp type data 2012-11-02 11:34:25. The data after being mapped is listed in the following table.

Data before mapping

Data after mapping

Year Quarter

2012-10-01 00:00:00

Year Month

2012-11-01 00:00:00

Year Week

2012-10-28 00:00:00

Full Day

2012-11-02 00:00:00

Full Hour

2012-11-02 11:00:00

Five Minutes

2012-11-02 11:30:00

Full Minute

2012-11-02 11:34:00

Full Second

2012-11-02 11:34:25

Year

2012

Quarter

4

Month

11

Week Number

44

Day of Month

2

Weekday

6

Hour

11

Minute

34

Second

25

 

The created data hierarchy can be renamed and deleted by clicking More icon.