Since there is no Dual table in Hive..
I have created a dummy dual with dummy value ‘X’.
hive> CREATE TABLE dual (dummy STRING);
hive> load data local inpath '/local/user/dw/hive/dual.txt' overwrite into table dual;
Now we can use this table to select string values. Like
hive> select 'name','place','age' from dual;
to get current timestamp
hive> select unix_timestamp() from dual;
No comments:
Post a Comment