Hello all!
I have the dataset and I want to check it size using hiveQL.
So I execute hive query in oozie:
<action name="count_lines">
<hive xmlns="uri:oozie:hive-action:0.2">
<job-xml>hive-site.xml</job-xml>
<script>count_lines.hql</script>
<param>tbl_name=count_line_test</param>
</hive>
<ok to="size_decision"/>
<error to="kill"/>
</action>
Where count_lines.hql look like this:
SELECT COUNT(*) FROM ${tbl_name};
But after that I wish to make some decision, based on dataset's lines count:
<decision name="size_decision">
<switch>
<case to="too_small">[PREDICATE]</case>
...
<case to="too_big">[PREDICATE]</case>
<default to="end"/>
</switch>
</decision>
How can I do this?
Best regards,
Mezentsev Pavel