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

Function copy_database_file

scripts_python/create_sandbox.py:146–160  ·  view source on GitHub ↗

Copy the database file to sandbox.

(task_name, variant)

Source from the content-addressed store, hash-verified

144
145
146def copy_database_file(task_name, variant):
147 """Copy the database file to sandbox."""
148 db_name = variant["db_name"]
149 db_type = variant["db_type"]
150
151 # Determine the database directory based on db_type
152 if db_type == "duckdb":
153 db_dir = Path("shared/databases/duckdb")
154 db_file = db_dir / f"{db_name}.duckdb"
155 else:
156 print(f"✓ No need to copy database file for {db_type}")
157 return True
158
159 sandbox_dir = Path("dev/sandbox")
160 return copy_item(db_file, sandbox_dir, f"database '{db_file.name}'")
161
162
163def copy_task_files(task_name):

Callers 1

mainFunction · 0.85

Calls 1

copy_itemFunction · 0.85

Tested by

no test coverage detected