duckrun 0.2.10.dev0__py3-none-any.whl → 0.2.10.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of duckrun might be problematic. Click here for more details.
- duckrun/core.py +13 -15
- {duckrun-0.2.10.dev0.dist-info → duckrun-0.2.10.dev1.dist-info}/METADATA +1 -1
- {duckrun-0.2.10.dev0.dist-info → duckrun-0.2.10.dev1.dist-info}/RECORD +6 -6
- {duckrun-0.2.10.dev0.dist-info → duckrun-0.2.10.dev1.dist-info}/WHEEL +0 -0
- {duckrun-0.2.10.dev0.dist-info → duckrun-0.2.10.dev1.dist-info}/licenses/LICENSE +0 -0
- {duckrun-0.2.10.dev0.dist-info → duckrun-0.2.10.dev1.dist-info}/top_level.txt +0 -0
duckrun/core.py
CHANGED
|
@@ -94,6 +94,7 @@ class Duckrun:
|
|
|
94
94
|
pass # Not in Colab, use default transport
|
|
95
95
|
|
|
96
96
|
self._attach_lakehouse()
|
|
97
|
+
self._register_lookup_functions()
|
|
97
98
|
|
|
98
99
|
@classmethod
|
|
99
100
|
def connect(cls, connection_string: str, sql_folder: Optional[str] = None,
|
|
@@ -456,9 +457,6 @@ class Duckrun:
|
|
|
456
457
|
except Exception as e:
|
|
457
458
|
print(f"❌ Error attaching lakehouse: {e}")
|
|
458
459
|
print("Continuing without pre-attached tables.")
|
|
459
|
-
|
|
460
|
-
# Register lookup functions as DuckDB UDFs
|
|
461
|
-
self._register_lookup_functions()
|
|
462
460
|
|
|
463
461
|
def _register_lookup_functions(self):
|
|
464
462
|
"""
|
|
@@ -488,7 +486,7 @@ class Duckrun:
|
|
|
488
486
|
from .auth import get_fabric_api_token
|
|
489
487
|
token = get_fabric_api_token()
|
|
490
488
|
if not token:
|
|
491
|
-
return
|
|
489
|
+
return None
|
|
492
490
|
|
|
493
491
|
url = "https://api.fabric.microsoft.com/v1/workspaces"
|
|
494
492
|
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
|
|
@@ -503,9 +501,9 @@ class Duckrun:
|
|
|
503
501
|
self._name_cache['workspace_name_to_id'][name] = workspace_id
|
|
504
502
|
return name
|
|
505
503
|
|
|
506
|
-
return
|
|
504
|
+
return None
|
|
507
505
|
except Exception as e:
|
|
508
|
-
return
|
|
506
|
+
return None
|
|
509
507
|
|
|
510
508
|
def get_lakehouse_name(workspace_id: str, lakehouse_id: str) -> str:
|
|
511
509
|
"""Get lakehouse display name from workspace ID and lakehouse ID (GUIDs)"""
|
|
@@ -517,7 +515,7 @@ class Duckrun:
|
|
|
517
515
|
from .auth import get_fabric_api_token
|
|
518
516
|
token = get_fabric_api_token()
|
|
519
517
|
if not token:
|
|
520
|
-
return
|
|
518
|
+
return None
|
|
521
519
|
|
|
522
520
|
url = f"https://api.fabric.microsoft.com/v1/workspaces/{workspace_id}/lakehouses"
|
|
523
521
|
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
|
|
@@ -533,9 +531,9 @@ class Duckrun:
|
|
|
533
531
|
self._name_cache['lakehouse_name_to_id'][lh_cache_key] = lakehouse_id
|
|
534
532
|
return name
|
|
535
533
|
|
|
536
|
-
return
|
|
534
|
+
return None
|
|
537
535
|
except Exception as e:
|
|
538
|
-
return
|
|
536
|
+
return None
|
|
539
537
|
|
|
540
538
|
def get_workspace_id_from_name(workspace_name: str) -> str:
|
|
541
539
|
"""Get workspace ID (GUID) from workspace display name"""
|
|
@@ -546,7 +544,7 @@ class Duckrun:
|
|
|
546
544
|
from .auth import get_fabric_api_token
|
|
547
545
|
token = get_fabric_api_token()
|
|
548
546
|
if not token:
|
|
549
|
-
return
|
|
547
|
+
return None
|
|
550
548
|
|
|
551
549
|
url = "https://api.fabric.microsoft.com/v1/workspaces"
|
|
552
550
|
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
|
|
@@ -561,9 +559,9 @@ class Duckrun:
|
|
|
561
559
|
self._name_cache['workspace_id_to_name'][workspace_id] = workspace_name
|
|
562
560
|
return workspace_id
|
|
563
561
|
|
|
564
|
-
return
|
|
562
|
+
return None
|
|
565
563
|
except Exception as e:
|
|
566
|
-
return
|
|
564
|
+
return None
|
|
567
565
|
|
|
568
566
|
def get_lakehouse_id_from_name(workspace_id: str, lakehouse_name: str) -> str:
|
|
569
567
|
"""Get lakehouse ID (GUID) from workspace ID and lakehouse display name"""
|
|
@@ -575,7 +573,7 @@ class Duckrun:
|
|
|
575
573
|
from .auth import get_fabric_api_token
|
|
576
574
|
token = get_fabric_api_token()
|
|
577
575
|
if not token:
|
|
578
|
-
return
|
|
576
|
+
return None
|
|
579
577
|
|
|
580
578
|
url = f"https://api.fabric.microsoft.com/v1/workspaces/{workspace_id}/lakehouses"
|
|
581
579
|
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
|
|
@@ -591,9 +589,9 @@ class Duckrun:
|
|
|
591
589
|
self._name_cache['lakehouse_id_to_name'][id_cache_key] = lakehouse_name
|
|
592
590
|
return lakehouse_id
|
|
593
591
|
|
|
594
|
-
return
|
|
592
|
+
return None
|
|
595
593
|
except Exception as e:
|
|
596
|
-
return
|
|
594
|
+
return None
|
|
597
595
|
|
|
598
596
|
# Register functions in DuckDB
|
|
599
597
|
try:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
duckrun/__init__.py,sha256=cTj6KQ6hKmgu1z7k9nhDcO5lct049luxjx1V0QnymCo,235
|
|
2
2
|
duckrun/auth.py,sha256=qPaLQ7InlV9leA9r6E6VEeYavFFoBi0zSN8m_l1aoQs,9545
|
|
3
|
-
duckrun/core.py,sha256=
|
|
3
|
+
duckrun/core.py,sha256=MlaHOOz9bg3-EDXR3C4pEcp75QsnEcbTOmvsMjomLKc,54279
|
|
4
4
|
duckrun/files.py,sha256=Fvdjg3DyHJzIVzKo8M_j-eGz4zU61lOB38Y_onbQJkI,10137
|
|
5
5
|
duckrun/lakehouse.py,sha256=j--Z3zo8AOWt1GF9VzRosmmTAy6ey2D0LVubti58twU,14109
|
|
6
6
|
duckrun/runner.py,sha256=yrDxfy1RVkb8iK9GKGmIFZHzCvcO_0GVQlbng7Vw_iM,14171
|
|
7
7
|
duckrun/semantic_model.py,sha256=obzlN2-dbEW3JmDop-vrZGGGLi9u3ThhTbgtDjou7uY,29509
|
|
8
8
|
duckrun/stats.py,sha256=oKIjZ7u5cFVT63FuOl5UqoDsOG3098woSCn-uI6i_sQ,11084
|
|
9
9
|
duckrun/writer.py,sha256=svUuPCYOhrz299NgnpTKhARKjfej0PxnoND2iPDSypk,8098
|
|
10
|
-
duckrun-0.2.10.
|
|
11
|
-
duckrun-0.2.10.
|
|
12
|
-
duckrun-0.2.10.
|
|
13
|
-
duckrun-0.2.10.
|
|
14
|
-
duckrun-0.2.10.
|
|
10
|
+
duckrun-0.2.10.dev1.dist-info/licenses/LICENSE,sha256=-DeQQwdbCbkB4507ZF3QbocysB-EIjDtaLexvqRkGZc,1083
|
|
11
|
+
duckrun-0.2.10.dev1.dist-info/METADATA,sha256=ctUMwNP22HX8g1PhY3nERJTbJvJGMrY2qNH2kutdX4c,20629
|
|
12
|
+
duckrun-0.2.10.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
duckrun-0.2.10.dev1.dist-info/top_level.txt,sha256=BknMEwebbUHrVAp3SC92ps8MPhK7XSYsaogTvi_DmEU,8
|
|
14
|
+
duckrun-0.2.10.dev1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|