Azure-docs: Not able to Execute Notebook in a Pipeline in Synapse

Created on 19 Oct 2020  Â·  4Comments  Â·  Source: MicrosoftDocs/azure-docs

I'm trying to follow the guide but I cannot execute in a pipeline.

I created a notebook with these statements:

%%spark
import org.apache.spark.sql.DataFrameReader
spark.sql("CREATE DATABASE IF NOT EXISTS nyctaxi")
val df = spark.read.sqlanalytics("devoteamnlwsSQL.dbo.Trip") 
df.write.mode("overwrite").saveAsTable("nyctaxi.trip")

The notebook works fine but if I try to debug or trigger a pipeline with a Synapse Notebook action that calls the notebook I get the following error:
error: value sqlanalytics is not a member of org.apache.spark.sql.DataFrameReader

Thanks


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cxp doc-enhancement pipelinsubsvc synapse-analyticsvc triaged

Most helpful comment

@zincob - As per this document, while running sqlanalytics command from pipeline, importing the modules step needs to be included in the notebook as below.

image

All 4 comments

@zincob - Thanks for posting the issue. We are looking into it and will get back to you shortly.

@zincob - As per this document, while running sqlanalytics command from pipeline, importing the modules step needs to be included in the notebook as below.

image

Thanks for the feedback, the pipeline is working!
I strongly suggest to include the document that you shared in the tutorial.
IMHO the tutorial doesn't contain all the required information to successfully follow it.

@zincob - Thanks for your contribution, I've addressed this issue in PR: MicrosoftDocs/azure-docs-pr#134761. The changes should be live EOD or tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments