From the course: Complete Guide to Databricks for Data Engineering
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Handle timestamp manipulation in PySpark - Databricks Tutorial
From the course: Complete Guide to Databricks for Data Engineering
Handle timestamp manipulation in PySpark
- [Instructor] Date is one part, but definitely when you work in a real projects as a data engineer, you will get the timestamp column as well. If you look at it our current data frame, you will find that it also has one column that is of a timestamp type. That is the ingestion timestamp. So how we can play with this timestamp column? Let's just see that. Very similar to the way we were using the date column. In the timestamp column, also, you have lots of those functions out there. For example, if from the timestamp, if you want to extract some specific information, we can do that. We say select here, ingestion timestamp, and then let's say I want to extract a year out of that. I can do year and then I give the ingestion timestamp column name then month, then I can also get day of the month. All these things we were getting it from the date, as well. However, in the case of a timestamp, we have some extra columns, like hours. We want to get the specific hour from that minute or the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Use filter and where transformations in PySpark8m 30s
-
(Locked)
Add or remove columns in PySpark8m 56s
-
(Locked)
Use the select function in PySpark6m 16s
-
(Locked)
Use UNION and DISTINCT in PySpark5m 31s
-
(Locked)
Handle nulls in PySpark8m 39s
-
(Locked)
Use sortBy and orderBy in PySpark9m 38s
-
(Locked)
Use groupBy and aggregation in PySpark8m 27s
-
(Locked)
Manipulate strings in PySpark14m 21s
-
(Locked)
Handle date manipulation in PySpark9m 37s
-
(Locked)
Handle timestamp manipulation in PySpark4m 29s
-
-
-
-
-
-
-
-
-
-
-
-