@@ -60,8 +60,8 @@ def load_dbt_tasks(self,
60
60
end_node : BaseOperator = None ,
61
61
tag : str = None ,
62
62
resource_type = "all" ,
63
- run_dbt_seeds = False ,
64
- run_singular_tests = False ) -> Tuple [BaseOperator , BaseOperator ]:
63
+ include_dbt_seeds = False ,
64
+ include_singular_tests = False ) -> Tuple [BaseOperator , BaseOperator ]:
65
65
"""
66
66
This method is used to add dbt tasks to Given DAG.
67
67
@@ -81,7 +81,7 @@ def load_dbt_tasks(self,
81
81
dag = dag )
82
82
end_node = end_node if end_node else EmptyOperator (task_id = 'dbt-%s-end' % self .project_dir .name , dag = dag )
83
83
84
- if run_dbt_seeds :
84
+ if include_dbt_seeds :
85
85
# add dbt seeds job after start node abd before all other dbt jobs
86
86
first_node = start_node
87
87
start_node = OpenDbtExecutorOperator (dag = dag ,
@@ -106,7 +106,7 @@ def load_dbt_tasks(self,
106
106
if resource_type == "test" and not str (node .name ).startswith ("source_" ):
107
107
if node .resource_type == "test" :
108
108
dbt_tasks [node .unique_id ] = OpenDbtExecutorOperator (dag = dag ,
109
- task_id = node .unique_id . rsplit ( '.' , 1 )[ 0 ] ,
109
+ task_id = node .unique_id ,
110
110
project_dir = self .project_dir ,
111
111
profiles_dir = self .profiles_dir ,
112
112
target = self .target ,
@@ -132,7 +132,7 @@ def load_dbt_tasks(self,
132
132
# we are skipping model tests because they are included above with model execution( `build` command)
133
133
# source table tests
134
134
dbt_tasks [node .unique_id ] = OpenDbtExecutorOperator (dag = dag ,
135
- task_id = node .unique_id . rsplit ( '.' , 1 )[ 0 ] ,
135
+ task_id = node .unique_id ,
136
136
project_dir = self .project_dir ,
137
137
profiles_dir = self .profiles_dir ,
138
138
target = self .target ,
@@ -153,7 +153,7 @@ def load_dbt_tasks(self,
153
153
task .set_upstream (dbt_tasks [upstream_id ])
154
154
155
155
singular_tests = None
156
- if run_singular_tests :
156
+ if include_singular_tests :
157
157
singular_tests = OpenDbtExecutorOperator (dag = dag ,
158
158
task_id = f"{ self .project_dir .name } _singular_tests" ,
159
159
project_dir = self .project_dir ,
@@ -167,7 +167,7 @@ def load_dbt_tasks(self,
167
167
# set downstream dependencies for the end nodes.
168
168
self .log .debug (f"Setting downstream of { task .task_id } -> { end_node .task_id } " )
169
169
170
- if run_singular_tests and singular_tests :
170
+ if include_singular_tests and singular_tests :
171
171
task .set_downstream (singular_tests )
172
172
else :
173
173
task .set_downstream (end_node )
@@ -177,6 +177,6 @@ def load_dbt_tasks(self,
177
177
self .log .debug (f"Setting upstream of { task .task_id } -> { start_node } " )
178
178
task .set_upstream (start_node )
179
179
180
- if run_singular_tests :
180
+ if include_singular_tests :
181
181
singular_tests .set_downstream (end_node )
182
182
return start_node , end_node
0 commit comments