Releases: Azure/azure-kusto-python
Fix for backwards compatibility with old packaging
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
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)
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
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
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
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.
Remove get_raw_response option
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
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.
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