Skip to main content

Use Azure Kusto Data and Azure Kusto Ingest in Python

Project description

got```bash pip install kustopy


The package includes the functionality to query and to ingest data.

**Query**

Frist load the query function from kustopy
```python
from kustopy import kp_query

Then set up the client

query_client = query.create_engine(cluster, client_id, client_secret, tenant_id)

For EY on databricks we can get the credentials as

cluster = 'sample01.westeurope'
database = 'sample-db'

client_id = dbutils.secrets.get(scope="ce5", key="adxClientId")
client_secret = dbutils.secrets.get(scope="ce5", key="adxClientSecret")
tenant_id = dbutils.secrets.get(scope="ce5", key="adxTenantId")

query_client = kp_query.create_engine(cluster, client_id, client_secret, tenant_id)

Finally we can query the database and get the result into a pandas dataframe

kp_query.get_pdf(user_input='SampleTable | take 10',
                 client=query_client,
                 database=database,
                 truncation=True)

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

kustopy-1.0.12.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

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

kustopy-1.0.12-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file kustopy-1.0.12.tar.gz.

File metadata

  • Download URL: kustopy-1.0.12.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for kustopy-1.0.12.tar.gz
Algorithm Hash digest
SHA256 4b07b77d047bdba2bd5ef8075b493670744fb810c0c2d375cfe5a69f54473b07
MD5 ebf8792e63e748b0c33d85457b9a70c6
BLAKE2b-256 82dc039664ce88ef385ee8fb33d7682e14c0b86b9e2dd2b9028807dc5206bdcf

See more details on using hashes here.

File details

Details for the file kustopy-1.0.12-py3-none-any.whl.

File metadata

  • Download URL: kustopy-1.0.12-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for kustopy-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 1e787f8130d708d4c9e6ddcecafce4a06737c502b3243697e5a52479ef6c1f29
MD5 be7e9d6f9b22dcc65463be24eb3bd4ee
BLAKE2b-256 a820d6b4eb76c576e3b0ff1ebedb25624f357c38d6d619138b5df31ccd7d5861

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