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:ย 

Delta Table created on s3 has all null values

Constantine
Contributor III

I have data in a Spark Dataframe and I write it to an s3 location. It has some complex datatypes like structs etc. When I create the table on top on the s3 location by using

CREATE TABLE IF NOT EXISTS table_name
USING DELTA
LOCATION 's3://.../...';

The table has all null values in it and I am not sure what is going wrong

1 ACCEPTED SOLUTION

Accepted Solutions

Hubert-Dudek
Esteemed Contributor III

@John Constantineโ€‹ ,

  • Try to load it as DataFrame (spark.read.delta(path)) and validate what is loading,
  • It could be easier to mount the S3 location as a folder to ensure that all data is there (dbutils or %fs to check) and that the connection is working correctly.
  • Try also REFRESH [TABLE] table_name,
  • Share more code, not sure what is loaded precisely. For example, the delta folder should be loaded, not a particular file,
  • There are parts/versions of delta in the delta folder written as a parquet. You can load them separately to DEBUG is all ok.

View solution in original post

2 REPLIES 2

Hubert-Dudek
Esteemed Contributor III

@John Constantineโ€‹ ,

  • Try to load it as DataFrame (spark.read.delta(path)) and validate what is loading,
  • It could be easier to mount the S3 location as a folder to ensure that all data is there (dbutils or %fs to check) and that the connection is working correctly.
  • Try also REFRESH [TABLE] table_name,
  • Share more code, not sure what is loaded precisely. For example, the delta folder should be loaded, not a particular file,
  • There are parts/versions of delta in the delta folder written as a parquet. You can load them separately to DEBUG is all ok.

Kaniz_Fatma
Community Manager
Community Manager

Hi @John Constantineโ€‹ , Did you try the above suggestions?

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!