I'm running 'x' number of APIs that deliver .csv flat files. I put them in their own directory.
I name them according to the ID# that served as the identifier in the API call that downloaded the file. For example 1234-234-234-5432.csv.
That identifier is not in the downloaded file. I want to add that identifier to the file as a column, so, an extra field is added to all rows. Then publish the file to SQL Server. All from my local machine. That identifier serves as the key field to the rows in the file.
Trying to do this on the fly is very problematic, I have to use dynamic rename and the append fields tools, and they do not get along well. When I do the append fields, I'm pulling in "only" the ID - no other fields. And then, not all the columns of my file import. I can avoid hassles just by going from API call straight to the download tool and save it locally.
But, I have to put these files on SQL Server with that ID as I explained.
So in theory, I'd like to just download all the .csv files; then Insert into each file their ID, ( which is the name of the file ) as a new column, upload to SQL.
Thanks for any assistance,
Chris