1.1.1

Table Of Contents
</taskdef>
<databaseToDdl verbosity="debug">
<database url="jdbc:sqlfire://localhost:1527"
driverClassName="com.vmware.sqlfire.jdbc.ClientDriver"
username="app"
password="app"/>
<writeSchemaSqlToFile outputFile="db-schema1.sql" dodrops="true"
failonerror="false" alterdatabase="false"/>
</databaseToDdl>
</target>
<!-- Imports data rows into a database.
If your table names or column names contain embedded spaces, set
usedelimitedsqlidentifiers to true.
-->
<target name="ImportDataToDB" description="Import the data ..">
<taskdef classname="org.apache.ddlutils.task.DdlToDatabaseTask"
name="ddlToDatabase"
classpathref="runtime-classpath"/>
<ddlToDatabase usedelimitedsqlidentifiers="false">
<database url="jdbc:sqlfire://localhost:1527"
driverClassName="com.vmware.sqlfire.jdbc.ClientDriver"
username="app"
password="app"/>
<fileset dir=".">
<include name="db-schema1.xml"/>
</fileset>
<writedatatodatabase datafile="data.xml"
usebatchmode="true"
batchsize="1000"/>
</ddlToDatabase>
</target>
</project>
Exporting and Importing Data from Text Files
SQLFire provides several procedures to help you import and export delimited data in text les. You can use
these procedures to transfer data between various programs and SQLFire. For example, you can use the procedures
to import data as comma-separated values (a CSV le).
Note: As a best practice, use the SYS.CREATE_ALL_BUCKETS procedure to pre-allocate partitioned
table buckets before you import data into a partitioned table. This helps to ensure that partitioned table
data is evenly distributed throughout the distributed system, even if you import table data using concurrent
processes.
These procedures are used to export and import data using delimited text les:
SYSCS_UTIL.EXPORT_QUERYWrites the results of a SQLFire query to a text le using delimiters that
you specify.
SYSCS_UTIL.EXPORT_TABLEWrites the data from a SQLFire table to a text le using delimiters that
you specify.
vFabric SQLFire User's Guide104
Managing Your Data in vFabric SQLFire