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 回答
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
已回答 4 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则