This repository contains a collection of tools and utilities to facilitate working with Databricks. The goal is to centralize scripts and packages that automate common tasks on the platform.
The project is organized in a modular way to support different tools:
genie_tools/: Utilities for managing and automating Databricks Genie Spaces.creator.py: Logic for creating, updating, and sorting Genie metadata.utils.py: Helper functions for payload manipulation, Black formatting, and space retrieval.
To use the tools, install the required dependencies:
pip install -r requirements.txtThe GenieCreator allows for bulk creation and updating of Genie spaces.
from databricks_tools.genie_tools import GenieCreator, GenieMetadata
# Metadata configuration
metadata = GenieMetadata(
title="My Genie",
description="Space description",
raw_serialized_space={...}
)
# Creator initialization
creator = GenieCreator(warehouse_id="your_warehouse_id")
creator.add_metadata(metadata)
# Execution
creator.create_or_update_all_genies()This is an evolving project. Feel free to add new tools to the folder structure.
Note: This project is intended for generic use and does not contain proprietary or sensitive information. Make sure to configure your Databricks credentials via environment variables or a .databrickscfg file.