Metadata-Version: 2.1
Name: kustopy
Version: 1.0.12
Summary: Use Azure Kusto Data and Azure Kusto Ingest in Python
Home-page: https://github.com/tillfurger/kustopy
Author: Till Furger
Author-email: till@furger.net
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown

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
```python
query_client = query.create_engine(cluster, client_id, client_secret, tenant_id)
```

For EY on databricks we can get the credentials as
```python
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
```python

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



