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?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group