3 Replies Latest reply on Aug 28, 2013 3:12 PM by JTF85

    How to load file with seperators


      Hi, I am attempting to load a CSV file. Currently the first column has data in the format '101-000-12345-345' where

      101 is the entity

      000 is the Custom1

      12345 is account

      345 is ICP. There are other columns in the file for C2, C3 etc. My problem is that I need help on how to define an Import format which can (in the above example) pick up 101 for entity, 000 for Custom 1 etc. Please note the length for ENtity, C1, Account and ICP is fixed.

      Please advise

        • 1. Re: How to load file with seperators



          It sounds like you need to define "-" as your delimiter for that specific Import Group.


          When you first create your Import Group you will need to define the delimiter. Once you have done this, you can then begin to define your Dimensions - here you are defining the format of your datafile. You have a couple options here - my recommendation would be to use the Import Format Builder - it will let you drag and drop sections to define your dimension. This will get you a bit more familiar with how this works.


          I would strongly recommend taking a look at the FDM Admin Guide, there is an entire section dedicated to creating an Import Group. Here is the link to the doc - though you may be on a different version: http://docs.oracle.com/cd/E17236_01/epm.1112/fdm_admin.pdf


          Good luck!

          • 2. Re: How to load file with seperators

            Hi. Thanks for the quick reply. What I am now confused about is that if I choose the delimiter as '-', then the rest of teh file is a CSV ie seperated by a comma. i preumably cannot have a '-' and a ',' as a separator in the same load file. This means that the first column has Account, C1 , entity and ICP seperated by '-' whereas the second column in teh CSV file is C2 and third clumn is C3

            • 3. Re: How to load file with seperators

              You may want to look at creating an import script for this, that is the only way I could think of doing this.  There is an accelerator just for this purpose, your import could be as simple as one line.


              Function GetColEntity(StrField,StrRecord)


              GetColEntity = DW.Utilities.fParseString(StrField,4,1,"-")


              End Function


              The 4 would represent the 4 columns in your string, and we are selecting the first column.  StrField represents the field you have selected in the import format, and the StrRecord represents the entire line.



              1 person found this helpful