Skip to content

Releases: Azure/azure-kusto-python

Fix for backwards compatibility with old packaging

25 Feb 13:05
Compare
Choose a tag to compare

BREAKING CHANGES:

None.

FEATURES:

None.

FIXES:

  • Prevent messing up azure namespace on upgrade in environments with other azure packages.

More Info:

Old Kusto (<0.0.25) packaging (as documented by azure-sdk-for-python) included azure/__init__.py file which was the root of azure namespace and used pkg-resource to declare the namespace.
After installation, Kusto's dist-info/RECORD included azure/__init__.py which caused it to be deleted once you upgrade (as upgrade is essentially uninstall + install newer).
New setup excludes azure/__init__.py from packaging, because we declare a dependency on azure-nspkg which is the owner of the azure name space and is responsible for the site-packages dir.
Because azure-nspkg is already installed, it's skipped, but the azure/__init__.py file is deleted (because it was present in the old dist-info/RECORD).
There is a setup.py property called namespace_packages which is meant to be used with pkg-resource but, when specified, installing with it, prevents the removal of the namespace.

Exposing the ability to manually set source id

21 Feb 12:27
Compare
Choose a tag to compare

BREAKING CHANGES:

None.

FEATURES:

  • Add the ability to set the source id of source descriptors. Useful for monitoring purposes (when reading statuses from queue, can correlate status via source_id).
import uuid
size = 1024 # insert correct size 
file_path = "/path/to/file"
source_id = uuid.uuid4()
file_desc = FileDescriptor(file_path, size, source_id)
ingest_client.ingest_from_file(file_desc , json_ingestion_props)

FIXES:

None.

Bug Fix (proxy)

14 Feb 13:39
Compare
Choose a tag to compare

BREAKING CHANGES:

None.

FEATURES:

None.

FIXES:

  • errors working with proxy - fix reverts to use python requests which handles proxy env vars (HTTP_PROXY) properly

Bug fix

12 Feb 11:29
fcd1289
Compare
Choose a tag to compare

BREAKING CHANGES:

None.

FEATURES:

None.

FIXES:

  • When getting empty KustoResultTable, let converting it into empty DataFrame.
    For more details please see the pull request comment.

Fixes for version 0.0.22

10 Feb 15:15
6db20a4
Compare
Choose a tag to compare

BREAKING CHANGES:

  • Change the default conversion from dynamic string.empty into dynamic null.
from azure.kusto.data.request import KustoClient, KustoConnectionStringBuilder
from azure.kusto.data.exceptions import KustoServiceError
from azure.kusto.data.helpers import dataframe_from_result_table

cluster = "https://help.kusto.windows.net:443"

kcsb = KustoConnectionStringBuilder.with_aad_device_authentication(cluster)
client = KustoClient(kcsb)
db = "Samples"

query = """print empty_dynamic = dynamic("")"""
response = client.execute(db, query)
empty = response.primary_results[0][0]["empty_dynamic"]

In the old version, the empty variable will have None type.
From version 0.0.23 and on the empty variable will have "" value.

FEATURES:

None.

FIXES:

  • Fixed json.loads exception in python 3.5 - Decode the urllib pool manager response with UTF-8, so we can load it into json in python 3.5 .
  • Handling dynamic values which are not dicts/arrays- Removed unneeded json.loads call for dynamic objects. It's been loaded once after we got the response.

v0.0.22

06 Feb 13:25
6e97a4e
Compare
Choose a tag to compare

BREAKING CHANGES:

Stop supporting python 3.4 .

FEATURES:

  • Support pandas 0.24.0 datetimes.
  • Performance: Use connection pool instead of creating session for each request. For more detalis please read here.

FIXES:

  • Raise better errors when trying to convert KustoResultDataTable into pandas DataFrame.

KustoResultTable: parse results when you receive them.

24 Jan 10:56
5c4f67d
Compare
Choose a tag to compare

BREAKING CHANGES:

None.

FEATURES:

None.

FIXES:

  • Azure packaging has changed. Kusto clients are now aligned.
    To read more about azure packaging, read this link.
  • When converting datetime and timespan to pandas types, the conversion was not always correct. Read here to see how this was resolved.

Remove get_raw_response option

03 Jan 15:49
c5c01b2
Compare
Choose a tag to compare

BREAKING CHANGES:

  • get_raw_response is no longer an option to:
    KustoClient.execute
    KustoClient.execute_query
    KustoClient.execute_mgmt
    The return type will be azure.kusto.data._response.KustoResponseDataSet

FEATURES:

None

FIXES:

None

Create ClientRequestProperties class

11 Dec 16:54
afb9449
Compare
Choose a tag to compare

Create ClientRequestProperties class.

BREAKING CHANGES:

  • ClientRequestProperties class is introduced. The methods azure.kusto.data.request.KustoClient.execute* will no longer have the arguments accept_partial_results, timeout.
    In order to set them, an instance of ClientRequestProperties should be initiated and passed to the execute methods. Example:
from azure.kusto.data.request import ClientRequestProperties
properties = ClientRequestProperties()
properties.set_option(ClientRequestProperties.OptionDeferPartialQueryFailures, True)
properties.set_option(ClientRequestProperties.OptionServerTimeout, 10) # 10 seconds to timeout
r = client.execute_query("Database1", query, properties)

FEATURES:

  • The ClientRequestProperties allow to pass options in the request body. See example above.

FIXES:

None

Add KustoAuthenticationError for detailed error when authentication error occurs.

05 Dec 17:30
06e8211
Compare
Choose a tag to compare

Add anonymous authentication.

BREAKING CHANGES:

None

FEATURES:

  • KustoAuthenticationError is introduced. Once authentication fails, the exception will have details of the request to acquire the token.

FIXES:

  • Fix issue #73