I'm using an In-DB tool to connect to an Impala/Hadoop database. On my Connect In-DB tool what is the syntax for today's date? I can't get now() and unix_timestamp to work.
Thanks
Solved! Go to Solution.
Does 'current_timestamp()' work? What sort of error are you getting when using now() or unix_timestamp()?
Current_timestamp() doesn't work either. Actually it doesn't give an error, it just doesn't output any data to a Browse In-DB tool. The only way I can get it to work is by keying in the date manually in format YYYY-MM-DD
Someone at my company helped me figure this out.
The solution was:
= to_date(from_unixtime(unix_timestamp()))
Wow, good to know. Any ideas why you need to do that to get it to show?
I think it was because the field in Hadoop was formatted as a date (without any time details). So the now() and unix_timestamp trials were too specific and running on the exact second the workflow was run. So it was good SQL but didn't spit out any results, but the to_date piece made it possible.
Makes a lot of sense, thanks for sharing!
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |