MERGE in Hive Recipe

khairulfathi
Level 2
MERGE in Hive Recipe

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.

0 Kudos
1 Reply
ATsao
Dataiker

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

0 Kudos