Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add aggregate support merge #25

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
682960f
* Add support for more aggregations
ag-ramachandran Dec 4, 2024
5c5a959
* Add more tests
ag-ramachandran Dec 8, 2024
fb0028a
* Fix failing tests
ag-ramachandran Dec 9, 2024
38a39ef
The provided code is a Python script that uses pytest to create and m…
ag-ramachandran Dec 9, 2024
cb52db7
* Fix failing tests
ag-ramachandran Dec 10, 2024
bd9ebe5
* Fix failing tests
ag-ramachandran Dec 10, 2024
40ffd7f
* Fix versions for black
ag-ramachandran Dec 10, 2024
59cab7c
* Make more optimizations and changes
ag-ramachandran Dec 13, 2024
7943ebe
* Fix with actual scenarios on Superset
ag-ramachandran Dec 14, 2024
542a3f4
* Add additional tests
ag-ramachandran Dec 14, 2024
37c6f38
* Additional features
ag-ramachandran Dec 14, 2024
2392dad
* Fix issues in order by column names
ag-ramachandran Jan 7, 2025
7c6906d
* Additional checks
ag-ramachandran Jan 7, 2025
dbdcea2
* Additional tests
ag-ramachandran Jan 9, 2025
aa4bc2c
* Support system managed identity as well
ag-ramachandran Jan 9, 2025
152dd95
* Support workload identity
ag-ramachandran Jan 9, 2025
0f8dedb
* Support workload identity
ag-ramachandran Jan 9, 2025
0431e3a
* Support workload identity with tenant
ag-ramachandran Jan 9, 2025
ec2d646
* Support workload identity with tenant
ag-ramachandran Jan 9, 2025
73e6c02
* Fix lints and fix formats
ag-ramachandran Jan 10, 2025
2360003
* Fix lints and fix formats
ag-ramachandran Jan 10, 2025
4b66146
* Update auth to use default auth
ag-ramachandran Jan 12, 2025
47012e8
* Update auth to use default auth
ag-ramachandran Jan 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,4 @@ dmypy.json

# Pyre type checker
.pyre/
.aider*
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
]
EXTRAS = {
"dev": [
"black>=24.10.0",
"black>=24.8.0",
"mypy>=1.14.1",
"pytest>=8.3.4",
"python-dotenv>=1.0.1",
Expand Down
11 changes: 5 additions & 6 deletions sqlalchemy_kusto/dbapi.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from collections import namedtuple
from typing import Any

from azure.identity import WorkloadIdentityCredential
from azure.kusto.data import (
ClientRequestProperties,
KustoClient,
KustoConnectionStringBuilder,
)
from azure.identity import DefaultAzureCredential
from azure.kusto.data._models import KustoResultColumn
from azure.kusto.data.exceptions import KustoAuthenticationError, KustoServiceError

Expand Down Expand Up @@ -39,12 +39,12 @@ def connect(
cluster: str,
database: str,
msi: bool = False,
workload_identity: bool = False,
user_msi: str | None = None,
workload_identity: bool = False,
azure_ad_client_id: str | None = None,
azure_ad_client_secret: str | None = None,
azure_ad_tenant_id: str | None = None,
):
): # pylint: disable=too-many-positional-arguments
"""Return a connection to the database."""
return Connection(
cluster,
Expand All @@ -71,7 +71,7 @@ def __init__(
azure_ad_client_id: str | None = None,
azure_ad_client_secret: str | None = None,
azure_ad_tenant_id: str | None = None,
):
): # pylint: disable=too-many-positional-arguments
self.closed = False
self.cursors: list[Cursor] = []
kcsb = None
Expand All @@ -85,9 +85,8 @@ def __init__(
authority_id=azure_ad_tenant_id,
)
elif workload_identity:
# Workload Identity
kcsb = KustoConnectionStringBuilder.with_azure_token_credential(
cluster, WorkloadIdentityCredential()
cluster, DefaultAzureCredential()
)
elif msi:
# Managed Service Identity (MSI)
Expand Down
Loading
Loading