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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

○ The key area of the input values<br />

○ If values are optionally enclosed by an given delimiter<br />

Table Import Model Example<br />

The following example shows how to use the file list types csvFileList and csvFileListExt in the table-import<br />

model definition:<br />

listCsvFile csvFiles;<br />

import csvFiles "TISCHEMA" "TiPackage::TiTable";<br />

listCsvFileExt csvFilesExt;<br />

import csvFilesExt "TISCHEMA" "TiPackage::TiTableExt";<br />

Table Import Data Example<br />

The following example shows how to use the file list types csvFileList and csvFileListExt in the table-import<br />

data definition:<br />

implements TiPackage:TiModel.hdbtim;<br />

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

csvFilesExt = [<br />

{<br />

file="TiPackage:TiCsv.csv"<br />

},<br />

{<br />

header = false;<br />

file = "sap.xse:csv_config.csv";<br />

keys = [ "Col1" : "b*", "Col1" : "a"];<br />

}<br />

];<br />

5.10 Importing Data Using Table Import<br />

The table-import function imports data from comma-separated values (CSV) files into <strong>SAP</strong> <strong>HANA</strong> tables.<br />

Before you start this task, make sure that the following prerequisites are met:<br />

● An <strong>SAP</strong> <strong>HANA</strong> database instance is available.<br />

● The <strong>SAP</strong> <strong>HANA</strong> database client is installed and configured.<br />

● You have a database user account set up with the roles containing sufficient privileges to perform actions in<br />

the repository, for example, add packages, add objects, and so on.<br />

● The <strong>SAP</strong> <strong>HANA</strong> studio is installed and connected to the <strong>SAP</strong> <strong>HANA</strong> repository.<br />

● You have a development environment including a repository workspace, a package structure for your<br />

application, and a shared project to enable you to synchronize changes to the project files in the local file<br />

system with the repository.<br />

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

Setting Up the Persistence Model<br />

P U B L I C<br />

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

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

Saved successfully!

Ooh no, something went wrong!