Tagging a Hive on Tez query
For general information see Tagging Workflows.
The following properties must be set in /usr/local/unravel/etc/unravel.properties. You should adjust the script path and method name parameters according to your cluster setup.
com.unraveldata.tagging.script.enabled=true com.unraveldata.app.tagging.script.path=/usr/local/unravel/etc/tag_app.pycom.unraveldata.app.tagging.script.method.name=get_tags
You can create tagged workflows for Tez apps in four ways.
- Use - --hiveconfvia hive command.- Enter the following the hive command line. - hive --hiveconf unravel.workflow.name=my_tez_workflow --hiveconf unravel.workflow.utctimestamp=20180801T000001Z -f tez.sql - Sample - tez.sql.- set hive.execution.engine=tez; select count(*) from my_test_table; 
- Use the global Python script for app tagging. - Assuming the global script is - /tmp/tag_app.py, you would add the two workflow tags to the object returned from the main method.
- Use - --hiveconfvia beeline command.- Enter the following command in the Beeline command line. - > beeline -n hive -u 'jdbc:hive2:// - host2.unraveldata.com:10000' --hiveconf unravel.workflow.name=my_tez_workflow --hiveconf unravel.workflow.utctimestamp=20180801T000001Z -f tez.sql
- Use the - tez.sqlscript, then run Beeline.- You must define these the two workflow tags in - tez.sql:- set hive.execution.engine=tez; set unravel.workflow.name=my_tez_workflow; set unravel.workflow.utctimestamp=20180801T000001Z; select count(*) from my_test_table; - Enter the following command in the beeline command line. - > beeline -n hive -u 'jdbc:hive2:// - host2.congo6.unraveldata.com:10000'-f tez.sql