tests.system.databricks.example_databricks_sql
這是一個使用 DatabricksSqlOperator 和 DatabricksCopyIntoOperator 的示例 DAG。第一個任務建立表並插入值。第二個任務使用 DatabricksSqlOperator 選擇資料。第三個任務選擇資料,並將所選資料的輸出儲存到指定的檔案路徑和格式中。第四個任務執行 test.sql 檔案中編寫的 select SQL 語句。最後一個任務使用 DatabricksCopyIntoOperator 將從 file_location 傳遞的資料載入到 Delta 表中。
模組內容
-
tests.system.databricks.example_databricks_sql.ENV_ID[source]
-
tests.system.databricks.example_databricks_sql.DAG_ID = 'example_databricks_sql_operator'[source]
-
tests.system.databricks.example_databricks_sql.connection_id = 'my_connection'[source]
-
tests.system.databricks.example_databricks_sql.test_run[source]