Create Dataset using parameter

hi.. i am trying to create a dataset with parameter.. i am getting eblow error, please help on the same:


image
My Sql Query as below:
select A,B,C FROM db_schema.db_view where year =<<$Year>>

Hello Suvarna,

When creating a dataset with parameters in QuickSight, you need to ensure that the parameter has a default value. Refer

For your specific case with the query “select A,B,C FROM db_schema.db_view where year =<<$Year>>”, you must first create the parameter “Year” and assign it a default value before using it in your custom SQL. Refer and Refer here a swell

When working with dataset parameters in custom SQL, the parameter needs to be properly defined and mapped.
Dataset parameters help optimize queries by allowing you to filter data at the source level rather than after retrieving all records.
To fix this issue:

  1. Create your parameter (Year) with a static default value

  2. Ensure the parameter is properly referenced in your SQL query with the correct syntax <<$Year>>

Hope this helps.

Cheers,
Deep