Forum Discussion

Swam80's avatar
Swam80
Frequent Visitor
2 years ago

Importi ng Multiple CSV/Excel files.

Hello all,

 

I have a folder that has 5 distinct csv files. THese 5 files are 5 different tables so i do not wish to combine/merge them. How do I import them as 5 different tables?
I connected them to folder but every csv file has binary type which can only be combined.
How to go ahead?

7 Replies

  • Hi Swam80 

     

    Don't use the folder connector.  Import each file as its own separate file/query.  Just use the Text/CSV connector.

     

    Phil

    • Swam80's avatar
      Swam80
      Frequent Visitor

      But what if i have many files? It will be time consuming to manually load each and every file

  • Hi Swam80 

     

    You said you had 5 files - you have many more than that?

     

    The folder connector is designed to load multiple files of the same structure - that is they have the same tables in the that you want to append together.

     

    If you have lots of files with different tables in them, so you don't plan to join them all together, then the folder connector isn't the tool you need.

     

    If you do use the Folder connector, you can click on the Transform button during import (as opposed to Combine and Transform) and you'll get a list of files in that folder.  The first column will be the binarty content of the files.

     

    From this point you have to decide what you want to do.  What is the purpose of loading all these files?

     

    If you have different internal structures in the files, then any query/steps you write are particular to that file(s) structure and won't work for anything else.

     

    Phil

    • Swam80's avatar
      Swam80
      Frequent Visitor

      At present I have 5 files, but in general if we have many tables, then what is the alternative to manual loading is what I wanted to know. Every table has different structure.

      I thought about one way, if i right click on the binary part and select add as new query then I can get individual queries for every binary i.e table. But again that would be a manual task. So can we write a custom function which will do it for every row which is binary ?

      • dufoq3's avatar
        dufoq3
        Community Champion

        You mentioned that every table has different structure - so you have to edit every query manually anyway...