GithubHelp home page GithubHelp logo

databricks-delta-utility's Introduction

GitHub GitHub release (latest by date)

Overview

This Python package designed to simplify Delta table management on Databricks. It provides functionalities to create, read, update, and delete Delta tables, with parameterization for table names, prefix, and suffix. The package also auto-detects the Databricks workspace and current user.

Features

  • Create Delta tables with customizable names.
  • Delete Delta tables with error checking and exception handling.
  • List existing Delta tables.
  • Auto-detect Databricks workspace and current user.
  • Parameterization for table names, prefix, and suffix.
  • Use of a config.json file to store transactions and metadata.

Installation

pip install databricks-delta-utility

#Usage
from databricks-delta-utility import DatabricksDeltaTableManager
from pyspark.sql import SparkSession

# Create a Spark session
spark = SparkSession.builder.appName("MyDatabricksApp").getOrCreate()

# Create an instance of DatabricksDeltaTableManager
manager = DatabricksDeltaTableManager(spark_session=spark, mount_path="/mnt/delta_tables")

# Example usage:
manager.create_delta_table("example_table", suffix="v1", prefix="prod")
manager.delete_delta_table("prod_example_table_v1")
tables = manager.list_delta_tables()
print(tables)


Pypi Link: https://pypi.org/project/databricks-delta-utility/

#Configuration
The package uses a config.json file to store transactions and metadata. The file is stored in the specified mount path.

#Contributing
Contributions are welcome! Please follow the contribution guidelines when submitting pull requests.

#License
This project is licensed under the MIT License - see the LICENSE file for details.

databricks-delta-utility's People

Contributors

sachinndhimann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.