Skip to main content

Product class use Dome API's

Project description

d2-dome

Dome from Declarative Data Inc. contains the required modules to interactive with Dome Data Product and management Intents

Getting Started

Follow the steps described below to use this module

Prerequisites

  • python3
  • pandas
  • requests

Usage

Installation

pip install d2-dome

Import and Initialize a Dome Product

from dome import Product
my_product = Product(productId="12345678")

Get Product and Attribute Info

product_df, attributes_df = my_product.info()

Get Management Intents that govern the lifecycle of a Product

product_intents = my_product.intents()

Get Series Members (Partition Keys and Values) of the Product

product_series_members_df = my_product.series_members()

Read Product Data

The read operation takes following optional parameters

+columns: Optional[List[str | dict]] - A list of all columns to be read. The List can contain a string with the column name or a dict with column name as the key and grouping function to be applied as value +where: Optional[str] - A string containing a filter expression to be added. Note: The expression should not include the where key word +group_by: Optional[List[str]] - A list of column names for grouping the results +order_by: Optional[List[str]] - A list of column names for grouping the results +limit: Optional[int] - A limit to number of records to be returned

Here are few examples

Read all product data
product_read_df = my_product.read()
Read only 10 rows of my product
product_read_df = my_product.read(limit=10)
Read only 2 columns with a where condition and limit to 10 rows
product_read_df = my_product.read(columns=["col1","col2"], where="col3 = 'col3_value'", limit=10)
Read with results grouped
product_read_df = my_product.read(columns=["col1",{"col2":"sum"}], where="col3 = 'col3_value'", group_by=["col1"], order_by=["col1"], limit=10)

Authors

  • Bhavin Dave

Support

Please reach out to info@declarativedata.com

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

d2_dome-1.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

d2_dome-1.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file d2_dome-1.0.2.tar.gz.

File metadata

  • Download URL: d2_dome-1.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for d2_dome-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e6303ad5cdcd6a1f6351076c891519d8212ba87289f2a63b96e2353e72d86e17
MD5 196efa49841b5c74f52cbd9b96fbdd26
BLAKE2b-256 5c44ae6ad926b6d603e391ae319b69cf254d9a7c4379a436ba0b45fc81aadc52

See more details on using hashes here.

File details

Details for the file d2_dome-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: d2_dome-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for d2_dome-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35fcd41a83daca6f9df7e0ca11274169fc961a4163068d900407cbf5a429017c
MD5 0bef57982e928938ccd3c8916549125a
BLAKE2b-256 3e1ea9de9b3894483e137aca8cc0fa8dda1116607692a419ba7944ae55fc8047

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