-
Notifications
You must be signed in to change notification settings - Fork 380
Expand file tree
/
Copy pathconfig.py
More file actions
55 lines (41 loc) · 1.08 KB
/
config.py
File metadata and controls
55 lines (41 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import os
import duckdb
from sqlmesh.core.config import AirflowSchedulerBackend, Config
DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
DEFAULT_KWARGS = {
"engine_dialect": "duckdb",
"engine_connection_factory": duckdb.connect,
}
# An in memory DuckDB config.
config = Config(**DEFAULT_KWARGS)
# A stateful DuckDB config.
local_config = Config(
**{
**DEFAULT_KWARGS,
"engine_connection_factory": lambda: duckdb.connect(
database=f"{DATA_DIR}/local.duckdb"
),
}
)
# The config to run model tests.
test_config = Config(**DEFAULT_KWARGS)
# A config that uses Airflow + Spark.
DEFAULT_AIRFLOW_KWARGS = {
**DEFAULT_KWARGS,
"backfill_concurrent_tasks": 4,
"ddl_concurrent_tasks": 4,
}
airflow_config = Config(
**{
**DEFAULT_AIRFLOW_KWARGS,
"scheduler_backend": AirflowSchedulerBackend(),
}
)
airflow_config_docker = Config(
**{
**DEFAULT_AIRFLOW_KWARGS,
"scheduler_backend": AirflowSchedulerBackend(
airflow_url="http://airflow-webserver:8080/"
),
}
)