Create AWS Quicksight Dataset using CDK

0

When creating a QuickSight Dataset using CDK, we have to specify the input_columns parameter for physical_table_map. Is there a way to include all columns in the table without having to write out all of them? I am connecting to s3 bucket through Athena and glue. So the table and column info should be able to retrieve from glue or Athena but cannot find out a way to do that...

1 Answer
0

Given that CDK renders a static (declarative) CloudFormation template, there is no native way for it to infer any information that it doesn't have at the time of synthesis.

A workaround might be using a CustomResource to fetch this information from Glue and then pass it to the CfnDataSet, but not sure if that'd work, given that data set definitions (data types) and Glue data type may not map directly. So you'd have to implement your custom resource logic and then to also do this remapping to convert the return value to DataSet specific way of declaring the data types.

Overall, I do not recommend this approach. I think it's better to have your code be the source of truth, which then declares both Glue and QS DataSet definitions from one place.

profile picture
m0ltar
answered 4 months ago
profile picture
EXPERT
reviewed 23 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions