cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

SELECT * FROM delta doesn't work on Spark 3.2

CrisBerg_65149
New Contributor III

Using DBR 10 or later and Iโ€™m getting an error when running the following query

SELECT * FROM delta.`s3://some_path`

getting org.apache.spark.SparkException: Unable to fetch tables of db delta

For 3.2.0+ they recommend reading like this:

CREATE TEMPORARY VIEW parquetTable

USING org.apache.spark.sql.parquet

OPTIONS (

path "examples/src/main/resources/people.parquet"

)

SELECT * FROM parquetTable

Can you confirm this is the only way?

1 ACCEPTED SOLUTION

Accepted Solutions

CrisBerg_65149
New Contributor III

Got support from Databricks.

Unfortunately, someone created a DB called delta, so the query was done against that DB instead.

Issue was solved

View solution in original post

6 REPLIES 6

-werners-
Esteemed Contributor III

@Cristobal Bergerโ€‹ , Databricks uses dbfs, so if you want to use a path to read the data, you should use the dbfs path.

Using a view works too, btw (or define it as a table).

CrisBerg_65149
New Contributor III

Hi @Werner Stinckensโ€‹, thanks for replying.

Actually, you can read directly from S3 on PySpark and Spark SQL. Amaz on S3 documentation can show you how to do it. Now, it looks from Spark 3.2 (DBR 10 or later), it's not possible to use syntactic sugar on the FROM statement. That's what I need to confirm.

Thanks

Dan_Z
Honored Contributor
Honored Contributor

Hello @Cristobal Bergerโ€‹ , - I could not reproduce this using DBR 10; I think you may be doing something wrong.

read-delta-s3

Kaniz
Community Manager
Community Manager

Hi @Cristobal Bergerโ€‹ , Just a friendly follow-up. Do you still need help? Please let us know.

CrisBerg_65149
New Contributor III

Got support from Databricks.

Unfortunately, someone created a DB called delta, so the query was done against that DB instead.

Issue was solved

Thank you for the update @Cristobal Bergerโ€‹ !

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!