2 Replies Latest reply on Oct 22, 2014 12:58 AM by Paul Szegedin

    How to map cells from csv (not columns) to columns in table, importing with sql loader

    Paul Szegedin

      Given csv file 'example.csv'

       

      I would like to load data in:

      cell C7 into column X

      cell D8 into column Y

      cell F7 into column Z

       

      of oracle table 'exampletable' And so on. The csv file does not have orderly rows and columns, so I cannot just load the csv file into a new table cleanly. So what I am asking is how to map cells to table columns loading this file into Oracle (XE). Can anyone point me to a tutorial?

       

      I realize this is pretty elementary, please let me know if I have under-specified anything in the question.

        • 1. Re: How to map cells from csv (not columns) to columns in table, importing with sql loader
          Given csv file 'example.csv'

           

          I would like to load data in:

          cell C7 into column X

          cell D8 into column Y

          cell F7 into column Z

           

          of oracle table 'exampletable' And so on. The csv file does not have orderly rows and columns, so I cannot just load the csv file into a new table cleanly. So what I am asking is how to map cells to table columns loading this file into Oracle (XE). Can anyone point me to a tutorial?

          No - there IS NO such tutorial and there is no such functionality. Data sets need to be rectangular; all rows have the same number of columns and data for each column is the same datatype. The ONLY exception is that trailing columns that are ALL null don't need to be specified or have placeholders.

           

          You will have to write code to implement a custom mapping.

          • 2. Re: How to map cells from csv (not columns) to columns in table, importing with sql loader
            Paul Szegedin

            I ended up doing this in Excel, through a very laborious process that will doubtless be repeated by others.

             

            It's too bad there is no functionality in Oracle for this kind of more flexible data import. Data analysts often get thrown spreadsheets that look like this, (or 485 of them) which have to get into a database one way or another.

             

            sheet.jpg