Skip to Content

Using flat file (delimited file) as a source in Data Services

Here is an example of how to use a delimited flat file as a source in BODS.

  • Login to BODS Designer.
  • Create a test Project (TEST_PROJECT).
  • Create a test Job (JOB_TEST_FLATFILE)
  • Create a Dataflow and name as (DF_FLATFILE)

Now we need to create a File Format for which we will be using our input file as a source.

  • Go to the Local Object Library and click on the Formats Tab.
  • Right click the Flat files and click on NEW. The below screen appears.
  • Make sure the file type you select is “Delimited” for the delimited file format.

/wp-content/uploads/2013/04/1_201772.jpg

  • Give appropriate name for the File Format. Say Test_FF
  • Root Directory – Select the location from where the input file needs to be picked up from.
  • File Name – Under this we have to select the file which needs to be taken as an input
  • Under delimiters, select the row delimiter (| in this example) and the column delimiter. (Mostly a new line)
  • If your file contains header as the first line and if you do not want it to appear in the source, then select the option ‘Skip row header’ as ‘Yes’.

/wp-content/uploads/2013/04/2_201779.jpg

/wp-content/uploads/2013/04/3_201781.jpg

  • Now click on Save and close.
  • The file format will be created and this can be now used as an input for your job.

Using Multiple flat files (delimited) as source with single file format

We can also choose multiple files instead of single file by separating the file names with commas or placing wild card character at the end of the file name.

For example I have taken 2 input files Test1.txt and Test2.txt

Below are the inputs of these 2 files.

/wp-content/uploads/2013/04/4_201782.jpg

In the File Format Editor, the place where the File name is specified, place Test*.txt. This takes the input from 2 files (Test1.txt and Test2.txt). We can also provide the file names separated by commas.

/wp-content/uploads/2013/04/5_201783.jpg

The output of the job is combined with both input file Test1.txt and Test2.txt  as shown below.

/wp-content/uploads/2013/04/6_201784.jpg

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. sree ranganath

    Hello Sasikala,

    It’s really good there is a  Trick (file name*.txt)  to read multiple files.Thanks for sharing this information.

    Regards,

    Sree

    (0) 

Leave a Reply