Auto-detect 'column' fields in Quicksight CDK API?

Using the quicksight dashboard UI, I can always create a new DataSet in my dashboard, and the DataSet will automatically show me all the columns in it. However, using the CDK, it seems that column is a required field. Is there a way to auto-detect the column names?

The SDK documentation for CDK function doesn’t seem to describe how to ignore ‘column’: CfnDataSet — AWS Cloud Development Kit 2.213.0 documentation


new quicksight.CfnDataSet(this, dataSetName, {
      awsAccountId: this.account,
      dataSetId: dataSetName,
      name: dataSetName,
      importMode: 'DIRECT_QUERY',
      physicalTableMap: {
        physicalMapId: {
          customSql: {
            dataSourceArn: dataSourceArn,
            name: queryName,
            columns: [
              { name: 'need_to_manually_define_each_column_for_each_table' type: 'STRING' },
            ],
            sqlQuery: `SELECT * FROM 'database'.'table'`,
          },
        },
      },
      datasetParameters: [
        {
          stringDatasetParameter: {
            id: 'xxx',
            name: 'xxx',
            valueType: 'SINGLE_VALUED',
            defaultValues: {
              staticValues: ['null'],
            },
          },
        },
      ],
      permissions: xxxxxxx
    });

Hi @cinzy and welcome to the Quick Sight community!

Currently, I do not believe there’s a way to auto-detect the column names when using the CDK. I will mark this as a feature request to promote visibility to the support team.

Thank you

Hi @cinzy,

While I’ve marked this as a feature request already, following up here to see if you had any additional questions or comments to add?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Let me know how I can track the updates, so if the feature does get prioritized I would like to use it on the next available version

Hi @cinzy,

While Quick Sight does not provide information or timetables on their current roadmap, you can follow the ‘What’s New’ section in the community for all new updates that are made.