Metadata-Version: 2.1
Name: kustopy
Version: 1.0.10
Summary: Use Azure Kusto Data and Azure Kusto Ingest in Python
Home-page: UNKNOWN
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
Requires-Dist: azure-kusto-data
Requires-Dist: azure-kusto-ingest
Requires-Dist: pandas
Requires-Dist: koalas

```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 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'
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 = 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
database = 'sample-db'
query.get_pdf(user_input='SampleTable | take 10', 
              client=query_client, 
              database=database, 
              truncation=True)
```



