Using PySpark to make Date table in Incorta

Date dimension almost exists in all analytics solutions to allow navigation of the fact table through familiar dates, months, fiscal periods, and special days on the calendar. The calendar date dimension typically has many columns that describe characteristics such as date, day number, week of the month, week of the year, etc.

First, I have an Excel file for the date dimension, as shown below:



I want to use PySpark to make it in Incorta, and I was able to create the same data using a PySpark program.

Below is the code I used.

Here, it should be noted that the date I used is 1980-2060. If you need to change the year, please pay attention to replace all the places in the code that need to give the year to the year you want.

Explore Data in Incorta.


Here is a screenshot of the dashboard.

Comments

Popular posts from this blog

How to create histogram in Incorta use bin function.

Using Github to version and manage notebooks(Jupyter notebooks)

Using Incorta and PySpark Linear Regression ML package to predict eCommerce Customer