Error when attempting to select * from Apache Spark table in the synapse SQL pool

Merca Ovnerud 1 Reputation point
2021-01-22T10:37:24.757+00:00

According to documentation I should be able to query the spark tables without any additional setup.
However, this keeps failing for me.

I created table in spark with df.write.format("delta").saveAsTable(table) and can query this fine in notebook.
When running on dedicated SQL pool

SELECT TOP (100) * FROM sparkdb.dbo.table

Error: Reference to database and/or server name in 'sparkdb.dbo.table' is not supported in this version of SQL Server.
When running on built-in

SELECT TOP (100) * FROM sparkdb.dbo.table

Error is: Invalid object name 'sparkdb.dbo.table'.

Azure Synapse Analytics
Azure Synapse Analytics

An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.


3 answers

Sort by: Most helpful
  1. Kristof De Middelaer 1 Reputation point Microsoft Employee
    2022-05-06T12:37:26.22+00:00

    Is it confirmed that this indeed does not work with Delta format? Is it known if support is going to be added?

    Was this answer helpful?


  2. Stephen Connell 21 Reputation points
    2021-11-22T08:33:00.917+00:00

    I get the same error.

    I used this statement from the samples:

    spark.sql("CREATE TABLE ExternalDeltaTable2 USING DELTA LOCATION '{0}'".format(delta_table_path))  
    

    https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-delta-lake-overview?pivots=programming-language-python#save-as-catalog-tables

    151431-image.png

    I have other parquet scripts that allow me to query the result but for all Delta I get similar to Invalid object name 'default.dbo.externaldeltatable2'.

    Was this answer helpful?


  3. Toan Thanh Nguyen (DM.1) 1 Reputation point
    2021-10-04T06:41:15.097+00:00

    same issue, the external Parquet table works just fine, but Delta table not working

    Was this answer helpful?

    0 comments No comments

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.