Skip to main content

Client for the Starburst Galaxy and Enterprise data products REST APIs

Project description

Starburst Data Products Client

A Python client library for interacting with the Starburst Enterprise Data Products API. This client provides a convenient interface for managing data products, domains, tags, and workflows in your Starburst Enterprise environment.

Features

  • Data Product Management
    • Create, clone, and delete data products
    • Search for data products
    • Manage sample queries
    • Handle materialized view refresh metadata
  • Domain Management
    • Create, update, and delete domains
    • List and retrieve domain information
  • Tag Management
    • Add, update, and remove tags from data products
    • Retrieve tags for data products
  • Workflow Operations
    • Publish data products
    • Monitor workflow status
    • Delete data products with optional object cleanup

Requirements

  • Python 3.9 or higher
  • Poetry for dependency management

Installation

Using pip

pip install starburst-data-products-client

From source

  1. Clone the repository:
git clone https://github.com/starburstdata/starburst-data-products-client.git
cd starburst-data-products-client
  1. Install dependencies using Poetry:
poetry install

Development Setup

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
poetry install --with test
  1. Run tests:
./test-sep-dp.sh

Usage Examples

Basic Setup

from starburst_data_products_client.sep.api import Api

# Initialize the API client
api = Api(
    host="your-starburst-host",
    username="your-username",
    password="your-password"
)

Working with Data Products

# Search for data products
results = api.search_data_products(search_string="sales")

# Create a new data product
from starburst_data_products_client.sep.data import DataProductParameters
new_product = DataProductParameters(
    name="sales_analytics",
    description="Sales analytics data product",
    catalog_name="hive",
    schema_name="sales"
)
created_product = api.create_data_product(new_product)

# Clone an existing data product
cloned_product = api.clone_data_product(
    dp_id="original-product-id",
    catalog_name="hive",
    new_schema_name="sales_clone",
    new_name="sales_analytics_clone"
)

Managing Domains

# Create a new domain
domain = api.create_domain(
    name="sales_domain",
    description="Domain for sales-related data products",
    schema_location="hive.sales"
)

# List all domains
domains = api.list_domains()

Working with Tags

# Add tags to a data product
api.update_tags(
    dp_id="product-id",
    tag_values=["sales", "analytics", "quarterly"]
)

# Get tags for a data product
tags = api.get_tags(dp_id="product-id")

Workflow Operations

# Publish a data product
api.publish_data_product(dp_id="product-id")

# Check publish status
status = api.get_publish_data_product_status(dp_id="product-id")

# Delete a data product
api.delete_data_product(dp_id="product-id", skip_objects_delete=False)

Contributing

  1. Create a feature branch
  2. Make your changes
  3. Run tests
  4. Submit a pull request

Support

For support, please contact Starburst Data at info@starburstdata.com or visit our support portal.

Documentation

For more detailed documentation, please visit our documentation site.

TODO - generate docs for this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

starburst_data_products_client-0.2.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file starburst_data_products_client-0.2.0.tar.gz.

File metadata

  • Download URL: starburst_data_products_client-0.2.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for starburst_data_products_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e256639ce778f3691b916cc6a8b62f8b8f59da0ca8842678e1ea40e93e262fbe
MD5 a21bbb3964d4b7679d2d663a8e3617f4
BLAKE2b-256 b45631670152f28f582178777ffd9507a678b597df0f25d69151fd04261808cb

See more details on using hashes here.

File details

Details for the file starburst_data_products_client-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for starburst_data_products_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1aa12e47e07a48776b740ed4c09718a76fe5392f13f98a04ce94399e3bae3e5f
MD5 e6cac82215586bc929c438b105b69920
BLAKE2b-256 7db62b9cceb0dbf90d44d5dd2df02b35a5f93ec9370dcf419647f2cb63f2bcbd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page