Azure / Azure/azure-cli-extensions

Azure Data Factory Extension - Trigger Creation - not reading JSON file

Open
#3,034 2 comments 0 reactions 1 assignee Claimed by @qwordy View on GitHub
Data Factory feature-request
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Extension: Datafactory

### Description of issue (in as much detail as possible)
When I am trying to run the cli tool to create a trigger, the properties flag does not read the json file and instead passes a default string to the API.

az-cli command
```
az datafactory trigger create --factory-name REDACTED_FACTORY_NAME --resource-group REDACTED_RESOURCE_GROUP_NAME --properties @datafactory/triggers/sample-trigger-file.json --name REDACTED_TRIGGER_NAME --debug --verbose
```
Debug log for request
```
azure.core.pipeline.policies._universal: Request URL: 'https://management.azure.com/subscriptions/{redacted}/resourceGroups/{redacted}/providers/Microsoft.DataFactory/factories/{redacted}/triggers/{redacted}?api-version=2018-06-01'
azure.core.pipeline.policies._universal: Request method: 'PUT'
azure.core.pipeline.policies._universal: Request headers:
azure.core.pipeline.policies._universal: 'Content-Type': 'application/json'
azure.core.pipeline.policies._universal: 'Accept': 'application/json'
azure.core.pipeline.policies._universal: 'Content-Length': '35'
azure.core.pipeline.policies._universal: 'x-ms-client-request-id': '{redacted}'
azure.core.pipeline.policies._universal: 'CommandName': 'datafactory trigger create'
azure.core.pipeline.policies._universal: 'ParameterSetName': '--factory-name --resource-group --properties --name --debug --verbose'
azure.core.pipeline.policies._universal: 'User-Agent': 'AZURECLI/2.19.1 (RPM) azsdk-python-datafactorymanagementclient/unknown Python/3.6.8 ({redacted})'
azure.core.pipeline.policies._universal: 'Authorization': '*****'
azure.core.pipeline.policies._universal: Request body:
azure.core.pipeline.policies._universal: {"properties": {"type": "Trigger"}}
```
Here, the request body is set to
```
{"properties": {"type": "Trigger"}}
```
instead of the contents of the json file.

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.