duckrun 0.2.5.dev1__tar.gz → 0.2.5.dev2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duckrun
3
- Version: 0.2.5.dev1
3
+ Version: 0.2.5.dev2
4
4
  Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
5
5
  Author: mim
6
6
  License: MIT
@@ -61,10 +61,20 @@ class Duckrun:
61
61
  self.scan_all_schemas = scan_all_schemas
62
62
  self.storage_account = storage_account
63
63
 
64
- # Construct proper ABFSS URLs using GUIDs
65
- # Both Tables and Files use lakehouse GUID directly (no .Lakehouse suffix)
66
- self.table_base_url = f'abfss://{workspace_id}@{storage_account}.dfs.fabric.microsoft.com/{lakehouse_id}/Tables/'
67
- self.files_base_url = f'abfss://{workspace_id}@{storage_account}.dfs.fabric.microsoft.com/{lakehouse_id}/Files/'
64
+ # Construct proper ABFSS URLs
65
+ import re
66
+ guid_pattern = re.compile(r'^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', re.IGNORECASE)
67
+ # If lakehouse_id is a GUID, use as-is
68
+ if guid_pattern.match(lakehouse_id):
69
+ lakehouse_url_part = lakehouse_id
70
+ else:
71
+ # If workspace name has no spaces, always append .lakehouse unless already present
72
+ if " " not in workspace_id and not lakehouse_id.endswith('.lakehouse'):
73
+ lakehouse_url_part = f'{lakehouse_id}.lakehouse'
74
+ else:
75
+ lakehouse_url_part = lakehouse_id
76
+ self.table_base_url = f'abfss://{workspace_id}@{storage_account}.dfs.fabric.microsoft.com/{lakehouse_url_part}/Tables/'
77
+ self.files_base_url = f'abfss://{workspace_id}@{storage_account}.dfs.fabric.microsoft.com/{lakehouse_url_part}/Files/'
68
78
 
69
79
  # Keep legacy properties for backward compatibility
70
80
  self.workspace = workspace_id
@@ -326,7 +336,19 @@ class Duckrun:
326
336
  url = f"abfss://{self.workspace}@{self.storage_account}.dfs.fabric.microsoft.com/"
327
337
  store = AzureStore.from_url(url, bearer_token=token)
328
338
 
329
- base_path = f"{self.lakehouse_name}/Tables/"
339
+ # Use the same lakehouse URL part logic as in __init__ to ensure .lakehouse suffix is added when needed
340
+ import re
341
+ guid_pattern = re.compile(r'^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', re.IGNORECASE)
342
+ if guid_pattern.match(self.lakehouse_id):
343
+ lakehouse_url_part = self.lakehouse_id
344
+ else:
345
+ # If workspace name has no spaces, always append .lakehouse unless already present
346
+ if " " not in self.workspace_id and not self.lakehouse_id.endswith('.lakehouse'):
347
+ lakehouse_url_part = f'{self.lakehouse_id}.lakehouse'
348
+ else:
349
+ lakehouse_url_part = self.lakehouse_id
350
+
351
+ base_path = f"{lakehouse_url_part}/Tables/"
330
352
  tables_found = []
331
353
 
332
354
  if self.scan_all_schemas:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duckrun
3
- Version: 0.2.5.dev1
3
+ Version: 0.2.5.dev2
4
4
  Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
5
5
  Author: mim
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "duckrun"
7
- version = "0.2.5.dev1"
7
+ version = "0.2.5.dev2"
8
8
  description = "Lakehouse task runner powered by DuckDB for Microsoft Fabric"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes