Skip to content
Branch: master
Find file History
ArielYehezkely Compress stream before sending (#147)
Compressing stream before uploading it to reduce network time.
Remove size check from the client - will get error from the server.
Latest commit 75768e0 Jul 7, 2019


Microsoft Azure Kusto Ingest Library for Python

from import KustoConnectionStringBuilder
from azure.kusto.ingest import KustoIngestClient, IngestionProperties, FileDescriptor, BlobDescriptor, DataFormat

ingestion_props = IngestionProperties(database="{database_name}", table="{table_name}", dataFormat=DataFormat.csv)
client = KustoIngestClient("https://ingest-{cluster_name}")

file_descriptor = FileDescriptor("{filename}.csv", 3333)  # 3333 is the raw size of the data in bytes.
client.ingest_from_file(file_descriptor, ingestion_properties=ingestion_props)
client.ingest_from_file("{filename}.csv", ingestion_properties=ingestion_props)

blob_descriptor = BlobDescriptor("https://{path_to_blob}.csv.gz?sas", 10)  # 10 is the raw size of the data in bytes.
client.ingest_from_blob(blob_descriptor, ingestion_properties=ingestion_props)


Kusto Python Ingest Client Library provides the capability to ingest data into Kusto clusters using Python. It is Python 2.x/3.x compatible and supports data types through familiar Python DB API interface.

It's possible to use the library, for instance, from Jupyter Notebooks which are attached to Spark clusters, including, but not exclusively, Azure Databricks instances.

You can’t perform that action at this time.