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

Koalas dropna in DLT

Thefan
New Contributor II

Greetings !

I've been trying out DLT for a few days but I'm running into an unexpected issue when trying to use Koalas dropna in my pipeline.

My goal is to drop all columns that contain only null/na values before writing it.

Current code is this :

  @dlt.table(name=f"silver_table")
  def silver():
    df = (dlt
          .read(f"bronze_table")
           .to_koalas()
           .dropna(axis=1, how="all")
         )
    return df

Running the pipeline, I get the following error message :

org.apache.spark.sql.AnalysisException: 
You are trying to create an external table [...]
from `dbfs:/pipelines/[...]` using Databricks Delta, but there is no transaction log present at
`dbfs:/pipelines/[...]/_delta_log`. Check the upstream job to make sure that it is writing using
format("delta") and that the path is the root of the table.

Am I missing something or is the dropna function not usable in DLT for some reason ?

Thanks a lot !

0 REPLIES 0

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