Share via

get result from databricks activity

arkiboys 9,711 Reputation points
2022-02-25T15:59:23.02+00:00

Hello,
The databricks notebook returns a table. i.e. when I execute:
...
display(df)

I now use a databricks notebook activity in data factory pipeline to execute this databricks notebook. It succeeds.
When I go to the output window, in the json format, I do not see the results returned.
1- should I be able to see the result of the execution in json?
2- How do I get the result of the databricks notebook into something like a (copy activity or another activity) to move the result to land in a .parquet file somewhere?

Thanks

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments

Answer accepted by question author

Vaibhav Chaudhari 39,011 Reputation points Volunteer Moderator
2022-02-26T08:34:03.027+00:00

You can directly save the dataframe data to target folder path in parquet format in ADLS. Later, simply execute this notebook in ADF.

#declare data lake path where we want to write the data
target_folder_path = 'abfss://******@adlsgen2demodatalake.dfs.core.windows.net/refined/us_covid/'

#write as parquet data
df_covid.write.format("parquet").save(target_folder_path)

Reference: https://www.mssqltips.com/sqlservertip/6499/reading-and-writing-data-in-azure-data-lake-storage-gen-2-with-azure-databricks/


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

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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