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

Python project || write write_micro_batch in structure streaming

manish1987c
New Contributor III

Hi Team,

We are in progress of developing a framework in python using datatbricks-connect in VSO,

However when we are trying to run micro batches in the foreachbatch function it is giving us error message saying that "few objects are not serializable: cannot pickle 'ClientThreadLocals' object"

Although we are able to run writestream without for each batch.. but since we have to perform transformations / DQ checks and metadata entries created in different table.. we are trying to encapsulate all these in same micro batch.

I tried removing all these eventhough just a simple code with foreachbatch function is not working in VSO using datatbricks-connect.

Please provide your inputs and help.. thanks

#databricks-connect

#python-project

 

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @manish1987c

  • Ensure that the Python version youโ€™re using locally matches the one on your Databricks cluster. Minor version differences are usually acceptable (e.g., 3.10.11 versus 3.10.10).
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!