Todd de Quincey
08/09/2023, 3:34 PMTodd de Quincey
08/09/2023, 3:36 PMget_tunnel
method from the ssh_resource
? I am clearly missing some fundamental knowledge as to how to the Dagster resources fit together.
I know I want it to be called in the assets, but given I am just returning the assets via load_assets_from_dbt_project
, how do we achieve this?
assets = with_resources(
load_assets_from_dbt_project(
profiles_dir=DBT_PROJECT_PATH,
project_dir=DBT_PROFILES,
use_build_command=False,
display_raw_sql=True,
),
{
"dbt": dbt_cli_resource.configured(
{
"project_dir": DBT_PROJECT_PATH,
"profiles_dir": DBT_PROFILES,
},
),
"ssh": ssh_resource.configured(
{
"remote_host": os.getenv("SSH_HOST"),
"remote_port": 22,
"username": os.getenv("SSH_USER"),
"key_file": "~/.ssh/dagster_rsa",
}
),
},
)
dbt profile
host: localhost
port: 5439
user: xxxxx
pass: xxxxx
dbname: xxxxx
Todd de Quincey
08/09/2023, 3:49 PMssh -fN dagster@SSH.SERVER.IP.ADDRESS -i ~/.ssh/dagster_rsa -L 5439:WAREHOUSE.ADDRESS:5439