-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.py
46 lines (38 loc) · 1.45 KB
/
constants.py
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
import numpy as np
from dagster_postgres.utils import get_conn_string
from dagster.utils import file_relative_path
# =========================================================================
# To get this value, run `python -m modern_data_stack_assets.setup_airbyte`
# and grab the connection id that it prints at the end
# AIRBYTE_CONNECTION_ID = "your_airbyte_connection_id"
AIRBYTE_CONNECTION_ID = "5c5c39ce-422f-4a1a-aacf-513d190e1062"
# =========================================================================
def model_func(x, a, b):
return a * np.exp(b * (x / 10 ** 18 - 1.6095))
PG_SOURCE_CONFIG = {
"username": "docker",
"password": "docker",
"host": "localhost",
"port": 5432,
"database": "postgres",
}
PG_DESTINATION_CONFIG = {
"username": "docker",
"password": "docker",
"host": "localhost",
"port": 5432,
"database": "postgres_replica",
}
AIRBYTE_CONFIG = {"host": "localhost", "port": "8000"}
DBT_PROJECT_DIR = file_relative_path(__file__, "../mds_dbt")
DBT_PROFILES_DIR = file_relative_path(__file__, "../mds_dbt/config")
DBT_CONFIG = {"project_dir": DBT_PROJECT_DIR, "profiles_dir": DBT_PROFILES_DIR}
PANDAS_IO_CONFIG = {
"con_string": get_conn_string(
username=PG_DESTINATION_CONFIG["username"],
password=PG_DESTINATION_CONFIG["password"],
hostname=PG_DESTINATION_CONFIG["host"],
port=str(PG_DESTINATION_CONFIG["port"]),
db_name=PG_DESTINATION_CONFIG["database"],
)
}