top of page

Getting last year in Hive , using dual table as in oracle .

  • Writer: Jatin Madaan
    Jatin Madaan
  • Mar 10, 2019
  • 1 min read


There is a simple command although it would run map reduce but still in case required .


last_year=$(hive -e "select year('${current_date}')-1")


last_year variable will have value required , or we can add any command as per scenario.



 
 
 

Recent Posts

See All
Exceptional - Handling

This post is about very basics of exceptional handling . Exceptions - It is a type of error if not taken care of then code may crash . To...

 
 
 
Functions in Python

This Post is about basics of functions in Python . Functions are created so that we don't have to write same code repeatedly . Syntax :...

 
 
 

Comments


  • linkedin

©2019 by Jatinmadaan

bottom of page