From 1e7fec421dd48cddcd5d3fc122e1c1586ebbeff6 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Tue, 18 Jun 2024 09:32:16 +0100 Subject: [PATCH] feat(cli): Make ingest deploy create recipe with urn if not exists (#10724) --- metadata-ingestion/src/datahub/cli/ingest_cli.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/metadata-ingestion/src/datahub/cli/ingest_cli.py b/metadata-ingestion/src/datahub/cli/ingest_cli.py index 328a5dc507..bb8d67f843 100644 --- a/metadata-ingestion/src/datahub/cli/ingest_cli.py +++ b/metadata-ingestion/src/datahub/cli/ingest_cli.py @@ -224,7 +224,7 @@ def run( @click.option( "--urn", type=str, - help="Urn of recipe to update", + help="Urn of recipe to update. Creates recipe if provided urn does not exist", required=False, ) @click.option( @@ -293,10 +293,6 @@ def deploy( variables["schedule"] = {"interval": schedule, "timezone": time_zone} if urn: - if not datahub_graph.exists(urn): - logger.error(f"Could not find recipe for provided urn: {urn}") - exit() - logger.info("Found recipe URN, will update recipe.") graphql_query: str = textwrap.dedent( """