cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Honored Contributor III
3 REPLIES 3

daniel_sahal
Honored Contributor III

@Lukas Goldschmied​ 

You can find some examples here:

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

youssefmrini
Honored Contributor III
Honored Contributor III

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! 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.