When calling the CreateTemplate operation: Expected 1 placeholders. Given 2

Hi,
I am trying to create a QuickSight template with create-template cli command and the parameter file below. I need to reference two datasets so I specified them in the file.

When I run the command, it keeps showing the error below.

An error occurred (InvalidParameterValueException) when calling the CreateTemplate operation: Expected 1 placeholders. Given 2.

As per the link, there should be separate placeholders for each dataset so I specified each placeholder and datasets arn but it said that the number of arguments is not correct.

I don’t know how to fix this issue and create template with multiple datasets.

{	
	"AwsAccountId": "{account}",
	"TemplateId": "Billing-Temp3",
    "Name": "Billing-Temp3",
    "Permissions": [
        {"Principal": "arn:aws:quicksight:ap-northeast-2:{account}:user/default/{user}", 
          "Actions": [ "quicksight:CreateTemplate",
                       "quicksight:DescribeTemplate",                   
                       "quicksight:DescribeTemplatePermissions",
                       "quicksight:UpdateTemplate"         
            ] } ] ,
     "SourceEntity": {
       "SourceAnalysis": {
         "Arn": "arn:aws:quicksight:ap-northeast-2:{account}:analysis/{no}",
         "DataSetReferences": [
           {
             "DataSetPlaceholder": "quicksight-placeholder1",
             "DataSetArn": "arn:aws:quicksight:ap-northeast-2:{account}:dataset/{no}"
           },
           {
            "DataSetPlaceholder": "quicksight-placeholder2",
            "DataSetArn": "arn:aws:quicksight:ap-northeast-2:{account}:dataset/{no}"
          }
         ]
       }
     },
     "VersionDescription": "1"
    }

Hi @phoebe

Welcome to QuickSight Community .

can you please run the describe command and check its referring to one/two datasets in analysis ? And update with us with screenshot

aws quicksight describe-analysis --aws-account-id 31********64 --analysis-id "D*************"

Thanks
Vinod

2 Likes

Hi apjvinod,
I checked the template’s detailed info and I found that there are two templates with the same name.
That was the reason it keeps showing the argument error.

Now I found the right template with two datasets and it works just fine!
Highly appreciate your prompt support. :slight_smile: