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: 

Forum Posts

fatimak01
by • New Contributor
  • 204 Views
  • 3 replies
  • 4 kudos

Resolved! Spark job stuck at 99% for a long time

Hi EveryoneWhy do some Spark jobs complete almost all their tasks within a few minutes, but the last two or three tasks take significantly longer?Even with adaptive query execution enabled, this can become a bottleneck. How do you normally troublesho...

  • 204 Views
  • 3 replies
  • 4 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 4 kudos

@fatimak01 What you are seeing is generally data skew - one or a few keys hold a disproportionate share of the rows, so after a shuffle (join or groupBy), couple of partitions end up carrying most of the data while hundreds of activities finish in mi...

  • 4 kudos
2 More Replies
fatimak01
by • New Contributor
  • 209 Views
  • 3 replies
  • 4 kudos

Resolved! PySpark DataFrame works with display() but fails while writing to Delta

Why does a DataFrame sometimes work perfectly with display(), but the same DataFrame throws an OutOfMemoryError when writing to a Delta table?The DataFrame contains multiple joins and aggregations. Increasing the number of workers does not always sol...

  • 209 Views
  • 3 replies
  • 4 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 4 kudos

Display only materializes a preview of the DataFrame (table results are capped at a limit and size), so Spark executes just enough of the plan to fill that window, while the full DAG of joins, aggregations and shuffles stays lazily deferred. Write fo...

  • 4 kudos
2 More Replies
fatimak01
by • New Contributor
  • 234 Views
  • 3 replies
  • 3 kudos

Resolved! Increasing the number of workers makes Spark jobs slower

HelloIs it normal for a Spark job to take longer after increasing the number of workers?For workloads involving multiple joins and aggregations, adding more workers does not always seem to improve performance.How do you determine the right cluster si...

  • 234 Views
  • 3 replies
  • 3 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 3 kudos

@fatimak01 Adding workers only helps while there are enough activities to spread across them. Three things break that -parallelism ceiling - extra workers sit idle while fixed overheads (scheduling, shuffle block fetches, cloud storage client content...

  • 3 kudos
2 More Replies
fatimak01
by • New Contributor
  • 182 Views
  • 3 replies
  • 2 kudos

Resolved! When should we avoid caching DataFrames in Databricks?

Caching is generally recommended when we reuse a DataFrame multiple times. However, there seem to be situations where caching actually increases the execution time.How do we identify whether a DataFrame is worth caching?Also, what happens when the ca...

  • 182 Views
  • 3 replies
  • 2 kudos
Latest Reply
saisaranv
Honored Contributor
  • 2 kudos

Just adding a note which might help you :Previously, for most of the ML workloads, teams heavily relied on caching DataFrames to avoid recomputation during multiple validation and transformation steps. However, with advancements in Spark optimization...

  • 2 kudos
2 More Replies
fatimak01
by • New Contributor
  • 187 Views
  • 2 replies
  • 2 kudos

Resolved! How to troubleshoot slow queries even with Photon enabled?

Hey AllIf Photon is enabled on Databricks compute but a query involving multiple joins and aggregations is still taking a long time, what should we investigate next?Is there a way to identify which parts of the query are not benefiting from Photon?Wo...

  • 187 Views
  • 2 replies
  • 2 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 2 kudos

Photon accelerates only supported operators and expressions (scans, filters, hash joins/aggregates, shuffles, sorts, common string/date/math functions, etc). The moment the query touches something unsupported like a Python/Scala UDF, an RDD/Dataset A...

  • 2 kudos
1 More Replies
alondatamvp
by • New Contributor
  • 162 Views
  • 3 replies
  • 6 kudos

Resolved! Notebook runs successfully manually but fails as a scheduled job

What are the most common reasons for a Databricks notebook to run successfully on interactive compute but fail when executed as a scheduled job?The code and input data are the same, but the scheduled execution throws either permission errors or missi...

  • 162 Views
  • 3 replies
  • 6 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 6 kudos

A manual run and a scheduled run are two different security and compute contexts even with identical code and data. Interactively, the notebook runs as youm on your compute where you may have already done pip installed libraries earlier in the sessio...

  • 6 kudos
2 More Replies
angelinak
by • New Contributor
  • 165 Views
  • 3 replies
  • 9 kudos

Resolved! Auto Loader pipeline fails whenever a new column is added

When ingesting JSON files using Auto Loader, the pipeline can fail whenever the source system introduces a new column.Is there a way to handle these schema changes without manually restarting the pipeline every time?Would using the rescue mode be a b...

  • 165 Views
  • 3 replies
  • 9 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 9 kudos

In the default addNewColumns evolution mode, when Auto Loader detects a new column in your JSON files, it first merges that column into the schema it keeps in the schema location, then deliberately stops the stream with an UnknownFieldException - Enc...

  • 9 kudos
2 More Replies
angelinak
by • New Contributor
  • 204 Views
  • 4 replies
  • 13 kudos

Resolved! How to reset a streaming checkpoint without reprocessing historical data?

What is the safest way to restart a Structured Streaming pipeline with a new checkpoint?Suppose the pipeline has already processed six months of data, but a change in the streaming logic makes the existing checkpoint incompatible.How can we avoid pro...

  • 204 Views
  • 4 replies
  • 13 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 13 kudos

When the streaming logic changes in a way that breaks the checkpoint such as changing sources, sinks or stateful operations, there is no way to repair the old checkpoint. Streaming treats a new checkpoint directory as a brand new stream that starts c...

  • 13 kudos
3 More Replies
angelinak
by • New Contributor
  • 190 Views
  • 3 replies
  • 8 kudos

Resolved! How to handle changing column data types in Auto Loader?

How do you handle a situation where an upstream system suddenly changes the data type of an existing column?For example, a column that was originally an integer starts arriving as a string in new Parquet files.What is the best way to handle these fil...

  • 190 Views
  • 3 replies
  • 8 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 8 kudos

Parquet files carry their own schema inside them - every file knows what type each column is. When Auto Loader started the stream, it sampled the first files it saw, found id as INT and locked that schema in (stores it under a _schemas directory in t...

  • 8 kudos
2 More Replies
angelinak
by • New Contributor
  • 222 Views
  • 4 replies
  • 6 kudos

Resolved! Structured Streaming job becomes progressively slower

What could cause a Structured Streaming job to become slower after running continuously for several days?The pipeline performs deduplication and aggregations, and the incoming data volume remains relatively consistent.Could this be related to the gro...

  • 222 Views
  • 4 replies
  • 6 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 6 kudos

The job slows down because deduplication and aggregation are stateful operations as every key you dedupe or group by gets parked in the state store and it stays there until the watermark decides it's safe to forget it. The watermark itself is the new...

  • 6 kudos
3 More Replies
angelinak
by • New Contributor
  • 193 Views
  • 4 replies
  • 7 kudos

Resolved! What happens when an upstream system overwrites an existing file instead of creating a new file?

What happens when an upstream system overwrites an existing file instead of creating a new file?For example, a source system generates a customers.csv file every day and replaces the previous file at the same storage location.How should Auto Loader b...

  • 193 Views
  • 4 replies
  • 7 kudos
Latest Reply
balajij8
Esteemed Contributor III
  • 7 kudos

cloudFiles.allowOverwrites false is the default. Auto Loader ingests each file exactly once based on its path - so an overwritten customers.csv is skipped after the first time. With allowOverwrites as true, it re ingests it based on the last modified...

  • 7 kudos
3 More Replies
cristian-vasile
by • New Contributor III
  • 464 Views
  • 9 replies
  • 10 kudos

Hybrid CSV – Self-describing .CSV files with inline schemas and hex-encoded IEEE 754 floats

Anyone who has built ingestion pipelines in Spark/Databricks knows the classic CSV headache: CSV files carry raw values, but zero context. Without an external schema definition, engines are forced to run expensive schema inference—and still risk misi...

  • 464 Views
  • 9 replies
  • 10 kudos
Latest Reply
tajamulkhan
Esteemed Contributor
  • 10 kudos

The idea of preserving schema information with CSV data is useful, particularly when exchanging files between systems that interpret types differently.I would evaluate two properties separately: schema portability and exact floating-point preservatio...

  • 10 kudos
8 More Replies
scott_kao
by • New Contributor II
  • 535 Views
  • 3 replies
  • 4 kudos

ServiceNow ingestion failed since October 1st.

I have a data ingestion pipeline ingesting ServiceNow data into databricks. It has been working for several months, but it stopped working since October 1st.From what I see, the pipeline suffered connection time out.However, from the connection, I ca...

Screenshot 2026-10-10 at 2.02.42 PM.png
  • 535 Views
  • 3 replies
  • 4 kudos
Latest Reply
tajamulkhan
Esteemed Contributor
  • 4 kudos

Since token refresh succeeds, I would focus on identifying whether the timeout occurs before the ServiceNow API responds or while processing the API response.A valid OAuth token confirms authentication is functioning, but it does not establish that t...

  • 4 kudos
2 More Replies
Albertino
by • New Contributor III
  • 1227 Views
  • 7 replies
  • 8 kudos

databricks-connect library for python and pandas 3

Hello,databricks-connect is pinning pandas during the installation. Since we're moving towards pandas 3 can you please add the support for the newest version as well?

Data Engineering
databricks-connect
Pandas
python
  • 1227 Views
  • 7 replies
  • 8 kudos
Latest Reply
tajamulkhan
Esteemed Contributor
  • 8 kudos

The important distinction here is between pandas 3 compatibility with PySpark and the dependency constraints declared by a particular Databricks Connect release.Even if some PySpark operations work with pandas 3, that does not automatically establish...

  • 8 kudos
6 More Replies
YuriS
by • New Contributor III
  • 477 Views
  • 5 replies
  • 7 kudos

DEEP CLONE fails with DELTA_CLONE_INCOMPLETE_FILE_COPY

Hi, Would appreciate some support on the DELTA_CLONE_INCOMPLETE_FILE_COPY issue with DEEP CLONE.Exact error is as follows: An error occurred while calling o459.sql.: org.apache.spark.SparkException: Job aborted due to stage failure: Task 144 in stage...

  • 477 Views
  • 5 replies
  • 7 kudos
Latest Reply
tajamulkhan
Esteemed Contributor
  • 7 kudos

DELTA_CLONE_INCOMPLETE_FILE_COPY indicates that Delta could not verify a complete copy of a source data file.I would not disable spark.databricks.delta.clone.checkWrite because that could allow incomplete data to go undetected.My recommended checks a...

  • 7 kudos
4 More Replies
Labels