Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2024 12:58 AM
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)