@click.command( context_settings=CONTEXT_SETTINGS, short_help='Deploys a delta pipeline according to the pipeline specification' ) @click.argument('spec_arg', default=None, required=False) @click.option('--spec', default=None, type=PipelineSpecClickType(), help=PipelineSpecClickType.help) @click.option('--allow-duplicate-names', is_flag=True, help="Skip duplicate name check while deploying pipeline") @click.option('--pipeline-id', default=None, type=PipelineIdClickType(), help=PipelineIdClickType.help) @debug_option @profile_option @pipelines_exception_eater @provide_api_client def deploy_cli(api_client, spec_arg, spec, allow_duplicate_names, pipeline_id): """ Deploys a delta pipeline according to the pipeline specification. The pipeline spec is a specification that explains how to run a Delta Pipeline on Databricks. All local libraries referenced in the spec are uploaded to DBFS. If the pipeline spec contains an "id" field, or if a pipeline id is specified directly (using the --pipeline-id argument), attempts to update an existing pipeline with that ID. If it does not, creates a new pipeline and logs the id of the new pipeline to STDOUT. Note that if an id is both specified in the spec and passed via --pipeline-id,
try: json_parse_exception = json.decoder.JSONDecodeError except AttributeError: # Python 2 json_parse_exception = ValueError PIPELINE_ID_PERMITTED_CHARACTERS = set(string.ascii_letters + string.digits + '-_') @click.command(context_settings=CONTEXT_SETTINGS, short_help='Deploys a delta pipeline according to the pipeline specification') @click.argument('spec_arg', default=None, required=False) @click.option('--spec', default=None, type=PipelineSpecClickType(), help=PipelineSpecClickType.help) @click.option('--allow-duplicate-names', is_flag=True, help="Skip duplicate name check while deploying pipeline") @click.option('--pipeline-id', default=None, type=PipelineIdClickType(), help=PipelineIdClickType.help) @debug_option @profile_option @pipelines_exception_eater @provide_api_client def deploy_cli(api_client, spec_arg, spec, allow_duplicate_names, pipeline_id): """ Deploys a delta pipeline according to the pipeline specification. The pipeline spec is a specification that explains how to run a Delta Pipeline on Databricks. All local libraries referenced in the spec are uploaded to DBFS. If the pipeline spec contains an "id" field, or if a pipeline id is specified directly (using the --pipeline-id argument), attempts to update an existing pipeline with that ID. If it does not, creates a new pipeline and logs the id of the new pipeline to STDOUT. Note that if an id is both specified in the spec and passed via --pipeline-id,