Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 12-07-2016 05:00 PM
In Hive script, we can set the variable and use in query. Is there a way to achieve the similar behavior with ReplaceTextWithMapping prior to sending to PutHiveQL processor. If it was one query, I could use the ReplaceText, but for multiple queries with different binding arguments, I am wondering if we could do that with ReplaceTextWithMapping processor.
hive> set name='Kumar'; hive> set department='IT';
hive> select * from emp where last_name = '{name}' and dept_name = '${department}';
hive> select * from emp where last_name = '{name}';
Created 12-08-2016 06:46 AM
I realized PutHiveQL supports parameterized Hive query and I went for that.
Created 12-07-2016 05:25 PM
you can use expression language.
in you selecthiveql query you put your query as select * from tmp where last_name=${name}.. name will be replaced by the attribute value from your previous processors flow file. So add an updateAttribute before the selecthiveql processor and add attribute name with whatever value you want to set.
Created 12-08-2016 06:46 AM
I realized PutHiveQL supports parameterized Hive query and I went for that.