28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

● A CSV file, for example, TiCsv.csv<br />

Contains the data to be imported into the <strong>SAP</strong> <strong>HANA</strong> table<br />

● A second CSV file, for example, TiCsvExtend.csv<br />

Contains the new (extended) data to be imported into the table<br />

● A table definition, for example, TiTable.hdbtable<br />

Defines the structure of the target import table<br />

● The schema definition, for example, TISCHEMA.schema<br />

Specifies the name of the schema in which the target import table is created<br />

● An application-logic, for example, TiConsumerApp.xsjs<br />

1. Open the repository package that contains the table-import data file (for example, TiData.hdbtid) that you<br />

want to extend.<br />

2. Create a CSV file and give the new CSV file a name, for example, TiCsvExtend.csv.<br />

This is the CSV file that contains the new, extended data to be imported into the table. The extended data<br />

either changes or adds to the date specified in the original CSV file TiCsv.csv.<br />

3. Open the new CSV file TiCsvExtend.csv in any code editor and enter the new, extended values you want to<br />

import separated by a comma.<br />

For example, enter the name NewFoo,Bar.<br />

NewFoo,Bar<br />

Note: The value NewFoo in theTiCsvExtend.csv modifies the original Foo value specified in the first<br />

CSV file TiCsv.csv.<br />

4. Create a table-import data-extension file (for example, TiDataExtend.hdbtid) and place the new data-<br />

extension file in the same package (for example, TiPackage) as the other files.<br />

5. Enter the following lines into the data-extension file TiDataExtend.hdbtid.<br />

Note: The following example is for illustration purposes only. In the example shown,<br />

.TiPackage is the absolute path to the table-import package in the repository and<br />

TiData.hdbtid is the name of the data-extension file for the data-import operation.<br />

modifies TiPackage:TiData.hdbtid;<br />

csvFiles = csvFiles + ["TiPackage:TiCsvExtend.csv"];<br />

6. In the <strong>SAP</strong> <strong>HANA</strong> XS application .xsjs, modify the script to query the<br />

90<br />

new value(s) specified in the table-import extension configuration.<br />

In this example, the table-import extension adds the name NewFoo to the data to be imported to <strong>SAP</strong> <strong>HANA</strong>;<br />

you now want to query the value NewFoo.<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up the Persistence Model

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!