| 1 |
<HTML> |
| 2 |
<HEAD> |
| 3 |
<TITLE>stag-bulkload</TITLE> |
| 4 |
<LINK REV="made" HREF="mailto:[email protected]"> |
| 5 |
</HEAD> |
| 6 |
|
| 7 |
<BODY> |
| 8 |
|
| 9 |
<A NAME="__index__"></A> |
| 10 |
<!-- INDEX BEGIN --> |
| 11 |
|
| 12 |
<UL> |
| 13 |
|
| 14 |
<LI><A HREF="#name">NAME</A></LI> |
| 15 |
<LI><A HREF="#synopsis">SYNOPSIS</A></LI> |
| 16 |
<LI><A HREF="#description">DESCRIPTION</A></LI> |
| 17 |
<LI><A HREF="#arguments">ARGUMENTS</A></LI> |
| 18 |
<LI><A HREF="#see also">SEE ALSO</A></LI> |
| 19 |
</UL> |
| 20 |
<!-- INDEX END --> |
| 21 |
|
| 22 |
<HR> |
| 23 |
<P> |
| 24 |
<H1><A NAME="name">NAME</A></H1> |
| 25 |
<P>stag-bulkload.pl - creates bulkload SQL for input data</P> |
| 26 |
<P> |
| 27 |
<HR> |
| 28 |
<H1><A NAME="synopsis">SYNOPSIS</A></H1> |
| 29 |
<PRE> |
| 30 |
# convert XML to IText |
| 31 |
stag-bulkload.pl -l person file1.xml file2.xml</PRE> |
| 32 |
<PRE> |
| 33 |
# use a custom parser/generator and a custom writer/generator |
| 34 |
stag-bulkload.pl -p MyMod::MyParser file.txt</PRE> |
| 35 |
<P> |
| 36 |
<HR> |
| 37 |
<H1><A NAME="description">DESCRIPTION</A></H1> |
| 38 |
<P>Creates bulkload SQL statements for an input file</P> |
| 39 |
<P>Works only with certain kinds of schemas, where the FK relations make |
| 40 |
a tree (not a graph); i.e. the only FKs are to the parent</P> |
| 41 |
<P>You do not need a connection to the DB</P> |
| 42 |
<P>It is of no use for incremental loading - it assumes integer surrogate |
| 43 |
promary keys and starts these from 1</P> |
| 44 |
<P> |
| 45 |
<HR> |
| 46 |
<H1><A NAME="arguments">ARGUMENTS</A></H1> |
| 47 |
<DL> |
| 48 |
<DT><STRONG><A NAME="item_%2Dp%7Cparser_FORMAT">-p|parser FORMAT</A></STRONG><BR> |
| 49 |
<DD> |
| 50 |
FORMAT is one of xml, sxpr or itext, or the name of a perl module |
| 51 |
<P>xml assumed as default</P> |
| 52 |
<P></P> |
| 53 |
<DT><STRONG><A NAME="item_%2Dl%7Cloadrecord_NODE">-l|loadrecord NODE</A></STRONG><BR> |
| 54 |
<DD> |
| 55 |
adds a COMMIT statement after the INSERTs for this node |
| 56 |
<P></P></DL> |
| 57 |
<P> |
| 58 |
<HR> |
| 59 |
<H1><A NAME="see also">SEE ALSO</A></H1> |
| 60 |
<P><A HREF="./Data/Stag.html">the Data::Stag manpage</A></P> |
| 61 |
<P><A HREF="./DBIx/DBStag.html">the DBIx::DBStag manpage</A></P> |
| 62 |
|
| 63 |
</BODY> |
| 64 |
|
| 65 |
</HTML> |