I have to load 46 tables with data using SQL Loader for Oracle. All the data files are CSV.
The column order in the CSV matches the column order in the table.
I need to create a control file for each table.
What is the best way for me to mass produce these files?
I have been do similar thing (about 120 tables with over 1500 columns). I used excel (because my working result is an excel file).
From Excel macro I read tables meta from DB as Adam Musch suggested, then fill into the Sheets.
I think this will work for you too.
Or you can create a tool use you familiar language to do the same.
I know this is an old question, but it is still a relevant question. For future searchers here is a procedure I added to our utility package that generates a skeleton control file for a table. Pass it the table name and it outputs a default control file that you can tweak where needed. You may need to edit to fit your needs first.
Call like this:
The procedure: