You could extract the String from the DB using the proper Input component. Then use tExtractDelimitedField to split this long String string against a separator character (the comma, I guess). Don't forget to specify carefully your output schema
Finally, use tFileDelimitedOut to write the delimited file with data from the outgoing connection on the file system.
This could help: Validate a csv file