MERGE in Hive Recipe
khairulfathi
Registered Posts: 11 ✭✭✭✭
Hello,
Does Hive recipe supports MERGE statement? Tried to write it but upon validation I'm getting 'Validation failed: Query has no SELECT statement'. I know SQL recipe has SQL Script option which supports it.
If its not supported, what will be the best way to INSERT if not matched and UPDATE when matched?
Thanks.
Answers
-
Hi,
You will likely need to write your own full INSERT statement using INSERT OVERWRITE to handle this scenario, like mentioned in our documentation here:
https://doc.dataiku.com/dss/latest/code_recipes/hive.html#writing-more-complex-queries
Thanks,
Andrew