如何从 azure synapse 中的数据库读取 table 并将其写入默认值(spak)?

How to read a table from a databse in azure synapse and write it into the default (spak)?

我在azure synapse的notebook中写了下面的代码

%%spark
val df = spark.read.sqlanalytics("emea_analytics.abc.cde_mydata") 
df.write.mode("overwrite").saveAsTable("default.t1")

我收到以下错误:

Error: com.microsoft.spark.sqlanalytics.exception.SQLAnalyticsConnectorException: The specified table does not exist. Please provide a valid table.
  at com.microsoft.spark.sqlanalytics.read.SQLAnalyticsReader.readSchema(SQLAnalyticsReader.scala:103)

  at org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation$.create(DataSourceV2Relation.scala:175)

  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:204)

  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:167)

  at org.apache.spark.sql.SqlAnalyticsConnector$SQLAnalyticsFormatReader.sqlanalytics(SqlAnalyticsConnector.scala:42)

The error message clearly says - The specified table does not exist. Please provide a valid table.

Error : com.microsoft.spark.sqlanalytics.exception.SQLAnalyticsConnectorException: The specified table does not exist. Please provide a valid table.

Make sure specified table exists before you running above code.

参考: Azure Synapse Analytics - Load the NYC Taxi data into the Spark nyctaxi database.