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.1.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.1.tar.gz.

File metadata

  • Download URL: starburst_data_products_client-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 190c364aaad1b8573ad9f9f13611d1d7c1d2d44f795d5345db8e29998954ddc3
MD5 28839a7a95b22a730fc73e9ac2feed30
BLAKE2b-256 e25ce3446a2705ad90db429cfd542d8e53f111c69cc11caf7fa05b8860878a23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for starburst_data_products_client-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3f0f1bccec45f912aadee767bfc6578c5aee90433bbc0f439da3604a6b4d30d
MD5 1e2d2b8a008c42036f8d3b4e5d6e714f
BLAKE2b-256 33f351494e390551c9cab5470e45c2e6e45d461854e8470f41a3868a36a3b741

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