How to read HIVE activity output to a set variable?

Chilukurthi Harikrishna 41 Reputation points
2021-02-12T05:58:55.563+00:00

Hi,

i'm very new to ADF. i want to read hive activity output to set variable. with in hive activity i have a query to select count(*) from a table. i want to read this count and assign it to a variable. when i use set variable activity i'm only getting option to use "@activity('Hive1').output" , but this is not reading the count what i required. please help

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,567 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vaibhav Chaudhari 38,721 Reputation points
    2021-02-12T09:37:21.453+00:00

    So it's returning other details like uri, status etc.. so seems not possible. Looks like hive activity is simply running the select query.

    Probably try to use Lookup activity instead of Hive. Not so sure if that will work, not an expert in Hive.


    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav


1 additional answer

Sort by: Most helpful
  1. Vaibhav Chaudhari 38,721 Reputation points
    2021-02-12T06:09:57.78+00:00

    Check the output run details of hive activity, it should show something like below

    67243-image.png

    @activity('Hive1').output is not enough..
    you will have to use @activity('Hive1').output.count (or whatever work available in output)

    Refer this blog to see how activity output can be used in further activities

    https://www.mssqltips.com/sqlservertip/6320/logging-azure-data-factory-pipeline-audit-data/

    ----------

    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.