Skip to main content

Use Azure Kusto Data and Azure Kusto Ingest in Python

Project description

pip install kustopy

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

Query

Frist load the query function from kustopy

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.14.tar.gz (4.5 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.14-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kustopy-1.0.14.tar.gz
  • Upload date:
  • Size: 4.5 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.14.tar.gz
Algorithm Hash digest
SHA256 db2514d3ee54a44904e26ce00af1a62a60109d26a89d7b0ccef80744208e0204
MD5 3b42bdd16248f0a612514057736965df
BLAKE2b-256 7e0e4b4c37f8b786ac34da24f81e4657de496078fbe145c79d1c0da8136c013c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kustopy-1.0.14-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 ed67bcd97a0f92dcf8f3fe8152102750425f38b588eab768d8e2952daa8d86ab
MD5 479497f4730d539835f20aa165ba949c
BLAKE2b-256 13aaac0e3f9fe421e0e99dac1191a0ae8b7d1af8a15f4c6839f14495c8678146

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