Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1034661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:25:38+00:00 2026-05-16T14:25:38+00:00

My datawarehouse table just contains a single date SQL column, but I want to

  • 0

My datawarehouse table just contains a single date SQL column, but I want to be able to drill down using the usual year/quarter/month/day levels.

I could manually create new column using Pentaho Kettle, and then create the levels one-by-one in Pentaho Schema Workbench.

But this is such a common task (I guess everybody creating sales-related cubes has to do it), so I am sure Pentaho developed something to do it in seconds. What is the recommended way of doing it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:25:38+00:00Added an answer on May 16, 2026 at 2:25 pm

    I don’t know a built in way to do this.

    Here’s a nice trick I’ve learned a few years back:
    Have a table called Time with one row per day/hour, depending on your resolution preferences.

    For dates, each such row will contain:

    Date (date) - 2010-09-28
    Day (int) - 28
    Month (int) - 9
    Year (int) - 2010
    

    And you can add as many fields as you like:
    Quarter, Day in week, Day from year start, Week in year, etc.

    This table is pre-populated with dates. When your query requires cube like aggregations, you can join the Time table with the data-warehouse table, to create any aggregation you like.

    A nice advantage of this approach is that by using outer joins in the query, you can also add empty dates to the report and not only aggregate on dates which contain values. This is an important feature if you drill down to very sparse dimensions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the plist for storing data in iphone application, but now there is
I'm tasked with creating a datawarehouse for a client. The tables involved don't really
THANKS: Both answers here are very helpful, but I could only pick one. I
I've just begun diving into data warehousing and I have one question that I
I have a server (SQL Server 2005) with multiple archive databases (1 per quarter
We are working on a datawarehouse for a bank and have pretty much followed
When I asked our DB designers why our Fact table do not have a
We're considering using SSIS to maintain a PostgreSql data warehouse. I've used it before
I'm getting started with building a Business Intelligence system using MS technologies. I don't
I have a data warehouse containing typical star schemas, and a whole bunch of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.