how to get dynamic column list for a source table

is there a way to get the actual column list to use in select statement from a source table? I used select * from source table for now.

Not exactly sure what you’re trying to do, but assuming you have a source and you want to create a model based on those columns, using the <https://github.com/dbt-labs/dbt-codegen|codegen package> will probably be helpful?

Note: @lisa fang originally posted this reply in Slack. It might not have transferred perfectly.