Skip to content

Commit 5096193

Browse files
authored
Added SQL example for databricks_job documentation (#1967)
1 parent 33151cc commit 5096193

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/resources/job.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,22 @@ One of the `query`, `dashboard` or `alert` needs to be provided.
201201
* `dashboard` - (Optional) block consisting of single string field: `dashboard_id` - identifier of the Databricks SQL Dashboard [databricks_sql_dashboard](sql_dashboard.md).
202202
* `alert` - (Optional) block consisting of single string field: `alert_id` - identifier of the Databricks SQL Alert.
203203

204+
Example
205+
```hcl
206+
resource "databricks_job" "sql_aggregation_job" {
207+
name = "Example SQL Job"
208+
task {
209+
task_key = "run_agg_query"
210+
sql_task {
211+
warehouse_id = databricks_sql_endpoint.sql_job_warehouse.id
212+
query {
213+
query_id = databricks_sql_query.agg_query.id
214+
}
215+
}
216+
}
217+
}
218+
```
219+
204220
### Exported attributes
205221

206222
In addition to all arguments above, the following attributes are exported:

0 commit comments

Comments
 (0)