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.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

starburst_data_products_client-0.2.2-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for starburst_data_products_client-0.2.2.tar.gz
Algorithm Hash digest
SHA256 20d40c011f0320c7e56ecc88aa65dba9802f767bf0503df0ed4e5a0bd92ad863
MD5 61f5785056ea47d9de47a6e486acb607
BLAKE2b-256 229283dab6f302a15f90c8dcaccda2f4eba07be32d6e2ff65db147a52bcaf9f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for starburst_data_products_client-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35928ca0be353e7d052eda7a2db12a5c0d0158040f91117537d07cd1f0fc4a5e
MD5 d2bfe21a54bdade23c270145c28da5bd
BLAKE2b-256 d386abad35eefc3dfb075b6e39998880a4121438bf2b65e50e16a3b2070c701a

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