DiscoverX - Map and Search your Lakehouse
Low maintenance activity. Last release 19 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install dbl-discoverxDiscoverX
Your Swiss-Army-knife for Lakehouse administration.
DiscoverX automates administration tasks that require inspecting or applying operations to a large number of Lakehouse assets.
Multi-table operations with SQL templates
You can execute a SQL template against multiple tables with
DisocoverX will concurrently execute the SQL template against all Delta tables matching the selection pattern and return a Spark DataFrame with the union of all results.
Some useful SQL templates are
- Describe details:
DESCRIBE DETAIL {full_table_name} - Show delta history:
SHOW HISTORY {full_table_name} - Deep clone:
CREATE TABLE IF NOT EXISTS {table_catalog}.{table_schema}_clone.{table_name} DEEP CLONE {full_table_name} - Create an empty copy:
CREATE TABLE IF NOT EXISTS {table_catalog}.{table_schema}.{table_name}_empty_copy LIKE {full_table_name} - Tag:
ALTER TABLE {full_table_name} SET TAGS ('tag_name' = 'tag_value') - Change owner:
ALTER TABLE {full_table_name} SET OWNER TO principal - Show partitions:
SHOW PARTITIONS {full_table_name} - Select a sample row as joson from each table:
SELECT to_json(struct(*)) AS row FROM {full_table_name} LIMIT 1 - Select all pivoted string columns:
SELECT {stack_string_columns} AS (column_name, string_value) FROM {full_table_name} - Select all pivoted columns casted to string:
SELECT {stack_all_columns_as_string} AS (column_name, string_value) FROM {full_table_name} - Apply liquid clustering:
ALTER TABLE {full_table_name} CLUSTER BY (column1, column2) - Vacuum:
VACUUM {full_table_name} - Optimize:
OPTIMIZE {full_table_name}
The available variables to use in the SQL templates are
{full_table_name}- The full table name (catalog.schema.table){table_catalog}- The catalog name{table_schema}- The schema name{table_name}- Teh table name{stack_string_columns}- A SQL expressionstack(N, 'col1', `col1`, ... , 'colN', `colN` )for all N columns of type string