I have data-time attribute in my dataset which is in string format and I would like to extract day, month and year. Please tell the process of doing it.
Let’s say this is the input data in which you have the date attributes DATE_OF_JOINING which is in String format.
To extract field, we have to follow the below process:
1. Load the input data to Sparkflows using the read processors available in Sparkflows editor.
2. Use String to Date processor to cast Date of Joining into date format. By specifying the column field input column format and new data type(in which format you want to cast).
3. After casting, use the Data Time Field Extract processor and then configure it by selecting the JOINING DATE column and Set the EXTRACT YEAR field as True, EXTRACT MONTH field as true, and set EXTRACT DAY OF MONTH field as True.
4. Add Print N Rows processor to print the output in the executions page. This is the look of the final output.
Hi Ragita, Please find the answer below:
Overview of the Workflow:
Let’s say this is the input data in which you have the date attributes DATE_OF_JOINING which is in String format.
To extract field, we have to follow the below process:
1. Load the input data to Sparkflows using the read processors available in Sparkflows editor.
2. Use String to Date processor to cast Date of Joining into date format. By specifying the column field input column format and new data type(in which format you want to cast).
3. After casting, use the Data Time Field Extract processor and then configure it by selecting the JOINING DATE column and Set the EXTRACT YEAR field as True, EXTRACT MONTH field as true, and set EXTRACT DAY OF MONTH field as True.
4. Add Print N Rows processor to print the output in the executions page. This is the look of the final output.