Best Approach for Naming Columns in CSV with no Header info

Hi all,

I have a bunch of csv files that are created by a Postgres GPFDIST process and since they are external writable tables they contain no header information. I need to be able to “name” the columns in the file prior to moving them. Any help in the best way to accomplish this would be greatly appreciated.

Thanks,

Keith

Hi Keith,

Typically, this is accomplished by using the “Rename with lookup” action:

  1. Import the CSV file with the “Columns don’t have headers” option checked. This will produce generic column names such as “Column 1”, “Column 2”, etc.
  2. Use the “Rename with lookup” action to rename columns using a 2-column name mapping table (name lookup table). The mapping table can be either hardcoded using the “Create list” action or imported from an external data source, e.g. a spreadsheet.