I want to use API to update dataset, Which is CustomSql
and the only thing I want change is the SqlQuery
. The result of the columns is not my concern, and don’t want manually write into the parameter.
But seems that aws cli consider columns as a required field, which doesn’t make sense to me.
What if the customSql have a lot of fields in to result set? Api user need to manually input all the fields one by one?
My command is
qs update-data-set \
--aws-account-id $AWS_ACCOUNT \
--data-set-id "$1" \
--name "$2" \
--physical-table-map '{ "string": { "CustomSql": { "DataSourceArn": "arn:aws:quicksight:ap-southeast-1:0***********:datasource/196b****-****-****-****-********ddd2", "Name": "apply test", "SqlQuery": "SELECT * FROM information_schema.tables\n" } } }' \
--import-mode "DIRECT_QUERY"
And the error is
An error occurred (ValidationException) when calling the UpdateDataSet operation: 1 validation error detected: Value null at 'physicalT
ableMap.string.member.customSql.columns' failed to satisfy constraint: Member must not be null