You have a samples folder in your installation. Inside the transformations folder, you have the meta-inject folder with an example of how metadata injection works, precisely to read a csv file. Read the documentation about metadata injection also.
When creating a new transformation with metadata injection, I like to check the box to generate a transformation with the metadata injected to debug what I'm doing.