Skip to content

Tag: hiveql

convert multiple date format into one format

I would like to know the answer I have this kind of problem, I have one column that consist 2 date format but in string format and then I would like to convert it to default datetime format, so it would be like this I’ve tried many ways but cant find the solution, Answer Consider below query query resul…

How Create a hive external table with parquet format

I am trying to create an external table in hive with the following query in HDFS. getting error Error while compiling statement: FAILED: ParseException line 11:2 missing EOF at ‘LOCATION’ near ‘)’ What is the best way to create a HIVE external table with data stored in parquet format? …

Hive trunc date format issues

I am trying to convert GP to Hive migration logic but below statement giving the wrong output while execute query: output for GP : 2021-12-31 similar if we converted Hive query out put if Hive query : 2022-01-02 i could see the difference of the date. please help me. Thanks Answer You are subtracting interval…

LEFT JOIN by closer value condition

I have this query In the second LEFT JOIN, I would like to change the second condition pob.year = proc.anno_eleccion so that it does not only search for the exact year when joining. Instead, I would like to get the closer year stored in my pob table. For example, the first year stored in pob is 2003, so I wan…