Use Azure Kusto Data and Azure Kusto Ingest in Python
Project description
pip install kustopy
QueryClient
Import the query client from kustopy
from kustopy import KustoPyClient as kpc
Then set up the client
query_client = kpc.QueryClient(uri='https://sample.kusto.windows.net/',
database='confidential-satanalytics-sample',
client_id=client_id,
client_secret=client_secret,
tenant_id=tenant_id,
truncation=False)
Using Capital Edge of EY, the credentials can be retrieved and the client be set up as
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 = kpc.QueryClient(uri='https://sample.kusto.windows.net/',
database='confidential-satanalytics-sample',
client_id=client_id,
client_secret=client_secret,
tenant_id=tenant_id,
truncation=False)
We can now get a dataframe of all tables in the database
query_client.get_table_names()
and use specific queries to get data from a table to a dataframe
query_client.query_to_df('SampleTable | take 100 | where fruit=="apple" | order by country asc, price desc')
IngestionClient following...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kustopy-1.0.18.tar.gz.
File metadata
- Download URL: kustopy-1.0.18.tar.gz
- Upload date:
- Size: 3.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0b87f4e14262413652f3c82a2b5c354d0b9bb9de17b7543637e3f4d2d3fdd11
|
|
| MD5 |
b22be95ea2b81fdd7fc5daf28c178c3a
|
|
| BLAKE2b-256 |
cc9935383dc2fc7e33da311ba0906d9553d190d88b97b1745698dae6c88c5109
|
File details
Details for the file kustopy-1.0.18-py3-none-any.whl.
File metadata
- Download URL: kustopy-1.0.18-py3-none-any.whl
- Upload date:
- Size: 4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3088b00ff5548d443f9bc62404619161de35fb8109b5b252dcae6b93e13d9733
|
|
| MD5 |
2ba077ac18dc2a770a3747b64f8f744e
|
|
| BLAKE2b-256 |
dbf2ee05b5eeeadf68c2b59d455ea3180369ac77ff8333b76387b54ffc1c5565
|