Update-data-set columns is an required parameter?

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

You can use DescribeDataSet on the dataset that you want to update, copy and paste the values you don’t want to change, and just change the SQL query.

The thing is I already what to update the dataset, means that there’s changes, So copy from previous one is also doesn’t make sense. What if there’s huge change? What if there are bunch of dataset I want update by this API? This gonna be a lot of manual work to use this update API

And also from the QS dataset UI point of view, if I want to edit the dataset, there’s no required actions to ask me to manually type in columns after I changed the SQL

Hi,
I want to use API to update-data-set as you did, I got syntax error about --physical-table-map. Can you help me?