O'Reilly logo

SAP Data Services 4.x Cookbook by Ivan Shomnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required