How to loop through a folder of csv files in an asset #23059
Answered
by
garethbrickman
JamarWhitfield
asked this question in
Q&A
-
Let's say you have two resources with csv files in different locations. How would you loop through the resources in an asset so that both of the csv files get ran one after another after materializing? |
Beta Was this translation helpful? Give feedback.
Answered by
garethbrickman
Jul 18, 2024
Replies: 1 comment 6 replies
-
Could you elaborate what you mean by the csv files getting "run" after materializing? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No problem, Resource is a more advanced Dagster concept that we'll bypass using for now.
Here's an example where we just provide a config to the asset that will specify the path to the folder that has the csv files in it. The asset materialization will process all csv files in the folder and then create new files prefixed with "processed_" in their name.