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

Function parse_args

shared/scripts/run_sql.py:47–71  ·  view source on GitHub ↗

Parse command line arguments.

()

Source from the content-addressed store, hash-verified

45
46
47def parse_args() -> argparse.Namespace:
48 """Parse command line arguments."""
49 parser = argparse.ArgumentParser(
50 description="Run SQL queries against DuckDB or Snowflake databases"
51 )
52 parser.add_argument(
53 "--db-type",
54 type=str,
55 required=True,
56 choices=["duckdb", "snowflake"],
57 help="Database type (duckdb or snowflake)",
58 )
59 parser.add_argument(
60 "--project-type", type=str, default="dbt", help="Project type (default: dbt)"
61 )
62 parser.add_argument(
63 "--sql-file", type=str, help="Path to SQL file (if not provided, reads from stdin)"
64 )
65 parser.add_argument(
66 "--profiles-path",
67 type=str,
68 default="/app/profiles.yml",
69 help="Path to profiles.yml file (default: /app/profiles.yml)",
70 )
71 return parser.parse_args()
72
73
74def load_profiles(profiles_path: str) -> Dict[str, Any]:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected