Sidhant07
Databricks Employee
Databricks Employee

Hi,

# Set the table name and clustering columns
table_name = "feature_store_table"
clustering_columns = ["column1", "column2"]

# Build the SQL command
sql_command = f"ALTER TABLE {table_name} CLUSTER BY ({', '.join(clustering_columns)})"

# Execute the SQL command
spark.sql(sql_command)