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.1.1.tar.gz (11.4 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.1.1-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for starburst_data_products_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 36504e8b1a11ff1a90e98c25a1fb70db18b04d4ccc3333c3b1c268127b7fbf65
MD5 93b84d9b299dd4aeb8653ab403ffe854
BLAKE2b-256 ab7f197bb16556fb668f0cdb39f2c36b24ff9c47d3df0c3689db98d65b32d975

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for starburst_data_products_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8403dc3a47387ddafb0f0916331b2481caaa59281f4993c5b870a42c05492e4b
MD5 2c01b0846de7afd91e41b6929f1b4557
BLAKE2b-256 c3f3df7193afa8c9caec5013e138df3db19617be490ba33acac595c3ffa47b7c

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