Azure / Azure/azure-cli

az synapse pipeline show does not return full json

Open
#20,501 9 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Service Attention Synapse
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

I should be able to download the json of a pipeline and then use that very same json to create a pipeline

For instance if I run
```
artifact_json=$(az synapse ${artifact_type} show \
--workspace-name "${SYNAPSE_WORKSPACE_NAME}" \
--name ${artifact} \
--output json)
```

I will be missing the top level "properties" key that contains "activities".

This means I cannot use this command
```
az synapse ${artifact_type} create --file "${artifact_json}" --name "${artifact_name}"\
--workspace-name "${SYNAPSE_WORKSPACE_NAME}" "${args[@]}" -o json
```

you will get an error

```
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/synapse/manual/operations/artifacts.py", line 80, in create_or_update_pipeline
properties = PipelineResource.from_dict(definition_file['properties'])
KeyError: 'properties'
```
---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 951246e6-c415-7f63-5655-8e590ba37171
* Version Independent ID: c9fe58c0-2a4f-6f46-43d7-c6942852923a
* Content: [az synapse pipeline](https://docs.microsoft.com/en-us/cli/azure/synapse/pipeline?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/synapse/pipeline.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/synapse/pipeline.yml)
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.