providers/databricks/docs/operators/repos_update.rst
.. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Use the :class:~airflow.providers.databricks.operators.DatabricksReposUpdateOperator to update code in an existing
Databricks Repos <https://docs.databricks.com/repos/index.html>_ to a given Git branch or tag
via api/2.0/repos/ <https://docs.databricks.com/dev-tools/api/latest/repos.html#operation/update-repo>_ API endpoint.
Using the Operator ^^^^^^^^^^^^^^^^^^
Usually this operator is used to update a source code of the Databricks job before its execution.
To use this operator you need to provide either branch or tag and either repo_path or repo_id.
.. list-table:: :widths: 15 25 :header-rows: 1
tag isn't provided).branch isn't provided)./Repos/<user_email>/repo_name (required if repo_id isn't provided).repo_path isn't provided).Updating Databricks Repo by specifying path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An example usage of the DatabricksReposUpdateOperator is as follows:
.. exampleinclude:: /../../databricks/tests/system/databricks/example_databricks_repos.py :language: python :start-after: [START howto_operator_databricks_repo_update] :end-before: [END howto_operator_databricks_repo_update]