duckrun 0.2.10.dev1__py3-none-any.whl → 0.2.11__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 CHANGED
@@ -133,11 +133,8 @@ class Duckrun:
133
133
 
134
134
  # Check if it's a workspace-only connection (no "/" means workspace name only)
135
135
  if "/" not in connection_string:
136
- print(f"Connecting to workspace '{connection_string}' for management operations...")
137
136
  return WorkspaceConnection(connection_string)
138
137
 
139
- print("Connecting to Lakehouse...")
140
-
141
138
  scan_all_schemas = False
142
139
 
143
140
  # Parse lakehouse connection string: "ws/lh.lakehouse/schema" or "ws/lh.lakehouse"
@@ -195,17 +192,14 @@ class Duckrun:
195
192
  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)
196
193
 
197
194
  if guid_pattern.match(workspace_name) and guid_pattern.match(lakehouse_name):
198
- print(f"✅ Names are already GUIDs: workspace={workspace_name}, lakehouse={lakehouse_name}")
199
195
  return workspace_name, lakehouse_name
200
196
 
201
197
  # Optimization: If workspace name has no spaces, use both names directly (old behavior)
202
198
  # Note: Lakehouse names cannot contain spaces in Microsoft Fabric, only workspace names can
203
199
  if " " not in workspace_name:
204
- print(f"✅ Using names directly (workspace has no spaces): workspace={workspace_name}, lakehouse={lakehouse_name}")
205
200
  return workspace_name, lakehouse_name
206
201
 
207
202
  # Workspace name contains spaces - need to resolve both to GUIDs for proper ABFSS URLs
208
- print(f"🔍 Resolving '{workspace_name}' workspace and '{lakehouse_name}' lakehouse to GUIDs (workspace has spaces)...")
209
203
 
210
204
  try:
211
205
  # Get authentication token using enhanced auth system
@@ -242,7 +236,6 @@ class Duckrun:
242
236
  if not lakehouse_id:
243
237
  raise ValueError(f"Lakehouse '{lakehouse_name}' not found in workspace '{workspace_name}'")
244
238
 
245
- print(f"✅ Resolved: {workspace_name} → {workspace_id}, {lakehouse_name} → {lakehouse_id}")
246
239
  return workspace_id, lakehouse_id
247
240
 
248
241
  except Exception as e:
@@ -388,7 +381,6 @@ class Duckrun:
388
381
  tables_found.append((schema_name, table_name))
389
382
  else:
390
383
  # Scan specific schema only
391
- print(f"🔍 Discovering tables in schema '{self.schema}'...")
392
384
  schema_path = f"{base_path}{self.schema}/"
393
385
  result = obs.list_with_delimiter(store, prefix=schema_path)
394
386
 
@@ -407,10 +399,6 @@ class Duckrun:
407
399
  tables = self._discover_tables_fast()
408
400
 
409
401
  if not tables:
410
- if self.scan_all_schemas:
411
- print(f"No Delta tables found in {self.lakehouse_name}/Tables/")
412
- else:
413
- print(f"No Delta tables found in {self.lakehouse_name}/Tables/{self.schema}/")
414
402
  return
415
403
 
416
404
  # Group tables by schema for display
@@ -420,12 +408,6 @@ class Duckrun:
420
408
  schema_tables[schema_name] = []
421
409
  schema_tables[schema_name].append(table_name)
422
410
 
423
- # Display tables by schema
424
- print(f"\n📊 Found {len(tables)} tables:")
425
- for schema_name in sorted(schema_tables.keys()):
426
- table_list = sorted(schema_tables[schema_name])
427
- print(f" {schema_name}: {', '.join(table_list)}")
428
-
429
411
  attached_count = 0
430
412
  skipped_tables = []
431
413
 
@@ -447,16 +429,9 @@ class Duckrun:
447
429
  except Exception as e:
448
430
  skipped_tables.append(f"{schema_name}.{table_name}")
449
431
  continue
450
-
451
- print(f"\n{'='*60}")
452
- print(f"✅ Ready - {attached_count}/{len(tables)} tables available")
453
- if skipped_tables:
454
- print(f"⚠ Skipped {len(skipped_tables)} tables: {', '.join(skipped_tables[:3])}{'...' if len(skipped_tables) > 3 else ''}")
455
- print(f"{'='*60}\n")
456
432
 
457
433
  except Exception as e:
458
434
  print(f"❌ Error attaching lakehouse: {e}")
459
- print("Continuing without pre-attached tables.")
460
435
 
461
436
  def _register_lookup_functions(self):
462
437
  """
@@ -599,7 +574,6 @@ class Duckrun:
599
574
  self.con.create_function("get_lakehouse_name", get_lakehouse_name)
600
575
  self.con.create_function("get_workspace_id_from_name", get_workspace_id_from_name)
601
576
  self.con.create_function("get_lakehouse_id_from_name", get_lakehouse_id_from_name)
602
- print("✅ Registered lookup functions: get_workspace_name, get_lakehouse_name, get_workspace_id_from_name, get_lakehouse_id_from_name")
603
577
  except Exception as e:
604
578
  print(f"⚠️ Warning: Could not register lookup functions: {e}")
605
579