Loading data from a flat file

You can use the same File Format object created in the previous recipe to load data from a flat file. In the following section, we will take a closer look at file format options relevant to loading data from the files.

How to do it…

  1. Create a new job and a new dataflow object in it.
  2. Create a new text file, Friends_30052015.txt, with the following lines inside it:
    NAME|DOB|HEIGHT|HOBBY
    JANE|12.05.1985|176|HIKING
    JOHN|07-08-1982|182|FOOTBALL
    STEVE|01.09.1976|152|SLEEPING|10
    DAVE|27.12.1983|AB5
  3. Go to Local Object Library and create a new file format by right-clicking on Flat Files and choosing New.
  4. Populate the File Format options as shown in the following screenshot:
    • Delimiters | Column is set to | in this case as our file ...

Get SAP Data Services 4.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.