Microsoft Azure Kusto Ingest Library for Python
===============================================
.. code-block:: python
from azure.kusto.data import KustoConnectionStringBuilder, DataFormat
from azure.kusto.ingest import QueuedIngestClient, IngestionProperties, FileDescriptor, BlobDescriptor
ingestion_props = IngestionProperties(database="{database_name}", table="{table_name}", data_format=DataFormat.CSV)
client = QueuedIngestClient(KustoConnectionStringBuilder.with_interactive_login("https://ingest-{cluster_name}.kusto.windows.net"))
file_descriptor = FileDescriptor("{filename}.csv", 15360) # in this example, the raw (uncompressed) size of the data is 15KB (15360 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", 51200) # in this example, the raw (uncompressed) size of the data is 50KB (52100 bytes)
client.ingest_from_blob(blob_descriptor, ingestion_properties=ingestion_props)
Overview
--------
*Kusto Python Ingest Client* Library provides the capability to ingest data into Kusto clusters using Python.
It is Python 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 <http://jupyter.org/>`_ which are attached to Spark clusters,
including, but not exclusively, `Azure Databricks <https://azure.microsoft.com/en-us/services/databricks>`_ instances.
* `How to install the package <https://github.com/Azure/azure-kusto-python#install>`_.
* `Data ingest sample <https://github.com/Azure/azure-kusto-python/blob/master/azure-kusto-ingest/tests/sample.py>`_.
* `GitHub Repository <https://github.com/Azure/azure-kusto-python/tree/master/azure-kusto-data>`_.
Raw data
{
"_id": null,
"home_page": "https://github.com/Azure/azure-kusto-python",
"name": "azure-kusto-ingest",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Microsoft Corporation",
"author_email": "kustalk@microsoft.com",
"download_url": "https://files.pythonhosted.org/packages/36/4d/fe3e41cbd09f9e92a8ce08e990fe9fd0ab7d827d5043a8d8afc748978772/azure-kusto-ingest-4.6.3.tar.gz",
"platform": null,
"description": "Microsoft Azure Kusto Ingest Library for Python\n===============================================\n\n.. code-block:: python\n\n from azure.kusto.data import KustoConnectionStringBuilder, DataFormat\n from azure.kusto.ingest import QueuedIngestClient, IngestionProperties, FileDescriptor, BlobDescriptor\n\n ingestion_props = IngestionProperties(database=\"{database_name}\", table=\"{table_name}\", data_format=DataFormat.CSV)\n client = QueuedIngestClient(KustoConnectionStringBuilder.with_interactive_login(\"https://ingest-{cluster_name}.kusto.windows.net\"))\n\n file_descriptor = FileDescriptor(\"{filename}.csv\", 15360) # in this example, the raw (uncompressed) size of the data is 15KB (15360 bytes)\n client.ingest_from_file(file_descriptor, ingestion_properties=ingestion_props)\n client.ingest_from_file(\"{filename}.csv\", ingestion_properties=ingestion_props)\n\n blob_descriptor = BlobDescriptor(\"https://{path_to_blob}.csv.gz?sas\", 51200) # in this example, the raw (uncompressed) size of the data is 50KB (52100 bytes)\n client.ingest_from_blob(blob_descriptor, ingestion_properties=ingestion_props)\n\n\nOverview\n--------\n\n*Kusto Python Ingest Client* Library provides the capability to ingest data into Kusto clusters using Python.\nIt is Python 3.x compatible and supports data types through familiar Python DB API interface.\n\nIt's possible to use the library, for instance, from `Jupyter Notebooks <http://jupyter.org/>`_ which are attached to Spark clusters,\nincluding, but not exclusively, `Azure Databricks <https://azure.microsoft.com/en-us/services/databricks>`_ instances.\n\n* `How to install the package <https://github.com/Azure/azure-kusto-python#install>`_.\n\n* `Data ingest sample <https://github.com/Azure/azure-kusto-python/blob/master/azure-kusto-ingest/tests/sample.py>`_.\n\n* `GitHub Repository <https://github.com/Azure/azure-kusto-python/tree/master/azure-kusto-data>`_.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Kusto Ingest Client",
"version": "4.6.3",
"project_urls": {
"Homepage": "https://github.com/Azure/azure-kusto-python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a86c50c6a4ed756c1279fff134d6c1881fb53d830ba30ea7cbbbbf355cff4234",
"md5": "119549081ccbb522af348554b5d2fea6",
"sha256": "46ecf2d2c31d56ead7d9594b2ad81b25ea07c2ca9705c3c4fa30fccf60196c47"
},
"downloads": -1,
"filename": "azure_kusto_ingest-4.6.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "119549081ccbb522af348554b5d2fea6",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 28692,
"upload_time": "2025-01-09T09:01:09",
"upload_time_iso_8601": "2025-01-09T09:01:09.185916Z",
"url": "https://files.pythonhosted.org/packages/a8/6c/50c6a4ed756c1279fff134d6c1881fb53d830ba30ea7cbbbbf355cff4234/azure_kusto_ingest-4.6.3-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "364dfe3e41cbd09f9e92a8ce08e990fe9fd0ab7d827d5043a8d8afc748978772",
"md5": "569655476a92d68e27b1398ce37b077e",
"sha256": "bd83c33ce1d534d64d159dd96b147d4bf50224d52bf6a416ca89a4d828a9a6e1"
},
"downloads": -1,
"filename": "azure-kusto-ingest-4.6.3.tar.gz",
"has_sig": false,
"md5_digest": "569655476a92d68e27b1398ce37b077e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20959,
"upload_time": "2025-01-09T09:01:10",
"upload_time_iso_8601": "2025-01-09T09:01:10.627001Z",
"url": "https://files.pythonhosted.org/packages/36/4d/fe3e41cbd09f9e92a8ce08e990fe9fd0ab7d827d5043a8d8afc748978772/azure-kusto-ingest-4.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-09 09:01:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Azure",
"github_project": "azure-kusto-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "azure-kusto-ingest"
}