MCPcopy Create free account
hub / github.com/dbt-labs/ade-bench / discover_duckdb_files

Method discover_duckdb_files

scripts_python/duckdb_utils.py:39–53  ·  view source on GitHub ↗

Discover DuckDB files in the configured source directory.

(self, patterns: List[str] = None)

Source from the content-addressed store, hash-verified

37 self.excluded_files.update(exclusion_list)
38
39 def discover_duckdb_files(self, patterns: List[str] = None) -> List[Path]:
40 """Discover DuckDB files in the configured source directory."""
41 if patterns is None:
42 patterns = ["*.duckdb", "*.db", "*.ddb"]
43
44 if not self.source_dir.exists():
45 print(f"Error: Source directory does not exist: {self.source_dir}", file=sys.stderr)
46 return []
47
48 discovered_files = []
49 for pattern in patterns:
50 discovered_files.extend(self.source_dir.glob(pattern))
51
52 # Remove duplicates and sort
53 return sorted(set(discovered_files))
54
55 def analyze_duckdb_schema(self, db_path: Path) -> Dict:
56 """Analyze schema and tables in a DuckDB file."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected