![]() ![]() import logging from datetime import datetime from typing import Any, Optional from github import GithubException from airflow import AirflowException from import DAG from .github import GithubOperator from .github import GithubSensor, GithubTagSensor dag = DAG ( 'example_github_operator', start_date = datetime ( 2021, 1, 1 ), tags =, catchup = False, ) # tag_sensor = GithubTagSensor ( task_id = 'example_tag_sensor', tag_name = 'v1.0', repository_name = "apache/airflow", timeout = 60, poke_interval = 10, dag = dag, ) # def tag_checker ( repo : Any, tag_name : str ) -> Optional : result = None try : if repo is not None and tag_name is not None : all_tags = result = tag_name in all_tags except GithubException as github_error : # type: ignore raise AirflowException ( f "Failed to execute GithubSensor, error:, result_processor = lambda repo : logging. See the License for the # specific language governing permissions and limitations # under the License. Apache Airflow: add validation tasks to production DAG for end-2-end tests. ![]() You may obtain a copy of the License at # 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. Short guide: How to use PostgresOperator in Apache Airflow code samples in postgresoperatorexample/. 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. Based on airflow-dbt documentation, operators accept multiple arguments, including target. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |