pig tutorial - apache pig tutorial - Apache Pig CurrentTime() Function - pig latin - apache pig - pig hadoop
What is CurrentTime() Function in Apache Pig ?
- The CurrentTime() function is used to generate the DateTime object of the current time.
- The CurrentTime() function will returns the current time in the number of seconds
- The CurrentTime() functions are used to interact with system time routine and also format the time outputs which are displayed.
Learn Apache Pig - Apache Pig tutorial - Apache Pig Currenttime Function - Apache Pig examples - Apache Pig programs
- Ensure that we have a file named wikitechy_date.txt in the HDFS directory /pig_data/.
- This file contains the date-of-birth details of a particular person, id, date, and time.
- We have loaded the file into Pig with a relation name called date_data which is given below:
- We are generating the current time for the data which is given.
- We need to verify the content of the relation by using the Dump operator.
- The above statement stores the result in the relation named currenttime_data.