@@ -56,6 +56,36 @@ type PipelineTask struct {
5656 PipelineID string `json:"pipeline_id"`
5757}
5858
59+ type sqlQuery struct {
60+ QueryID string `json:"query_id"`
61+ }
62+
63+ type sqlDashboard struct {
64+ DashboardID string `json:"dashboard_id"`
65+ }
66+
67+ type sqlAlert struct {
68+ AlertID string `json:"alert_id"`
69+ }
70+
71+ // SqlTask contains information about DBSQL task
72+ // TODO: add validation & conflictsWith
73+ type SqlTask struct {
74+ Query * sqlQuery `json:"query,omitempty"`
75+ Dashboard * sqlDashboard `json:"dashboard,omitempty"`
76+ Alert * sqlAlert `json:"alert,omitempty"`
77+ WarehouseID string `json:"warehouse_id,omitempty"`
78+ Parameters map [string ]string `json:"parameters,omitempty"`
79+ }
80+
81+ // DbtTask contains information about DBT task
82+ // TODO: add validation for non-empty commands
83+ type DbtTask struct {
84+ ProjectDirectory string `json:"project_directory,omitempty"`
85+ Commands []string `json:"commands"`
86+ Schema string `json:"schema,omitempty" tf:"default:default"`
87+ }
88+
5989// EmailNotifications contains the information for email notifications after job completion
6090type EmailNotifications struct {
6191 OnStart []string `json:"on_start,omitempty"`
@@ -102,6 +132,8 @@ type JobTaskSettings struct {
102132 SparkSubmitTask * SparkSubmitTask `json:"spark_submit_task,omitempty" tf:"group:task_type"`
103133 PipelineTask * PipelineTask `json:"pipeline_task,omitempty" tf:"group:task_type"`
104134 PythonWheelTask * PythonWheelTask `json:"python_wheel_task,omitempty" tf:"group:task_type"`
135+ SqlTask * SqlTask `json:"sql_task,omitempty" tf:"group:task_type"`
136+ DbtTask * DbtTask `json:"dbt_task,omitempty" tf:"group:task_type"`
105137 EmailNotifications * EmailNotifications `json:"email_notifications,omitempty" tf:"suppress_diff"`
106138 TimeoutSeconds int32 `json:"timeout_seconds,omitempty"`
107139 MaxRetries int32 `json:"max_retries,omitempty"`
0 commit comments