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: 

Z-orderiing df using python

zeta_load
New Contributor II

Is there a way to perform Z-ordering using python? With sql you you should be able to use:

%sql
OPTIMIZE df
ZORDER BY (column)

however I get the error "Table or view 'df' not found in database 'default''" and since I'm not really using sql, I would like to do this with python.....

1 ACCEPTED SOLUTION

Accepted Solutions

daniel_sahal
Esteemed Contributor
3 REPLIES 3

daniel_sahal
Esteemed Contributor

@Lukas Goldschmied​ 

You can find some examples here:

https://docs.databricks.com/delta/optimize.html#language-python

youssefmrini
Databricks Employee
Databricks Employee

Hey Make sure to check the Delta Documentation :

https://docs.delta.io/latest/api/python/index.html

Anonymous
Not applicable

Hi @Lukas Goldschmied​ 

Thank you for posting your question in our community! We are happy to assist you.

To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?

This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance! 

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