Um mit dem Extractor Daten aus einer Datenbank zu extrahieren, müssen Sie die Daten, die Sie aus der Datenbank extrahieren möchten, mit Hilfe einer Extraktionsfilterdatei angeben. Der von Ihnen verwendete Extraktionsfilter hängt vom Typ der Daten ab, die Sie extrahieren möchten.
Beispiel für einen Extraktionsfilter
Im folgenden Beispiel extrahiert ein Extraktionsfilter Kategorie- und Produktinformationen aus den Tabellen CATGROUP, CATGRPDESC, CATGRPREL, CATENTRY, CATENTSHIP, OFFER, CATENTREL, CATGPENREL, CATENTDESC und ATTRVALUE:
<sqlx> <!-- **************************** --> <!-- extract Category information --> <!-- **************************** --> <functionDef id="Category" description="Extract Categories" schemaentity="catgroup"> <paramDef name=":lastRecord" type="string" value="10301" description="Last record before loading new data" /> <body> select * from catgroup where catgroup_id > :lastRecord </body> </functionDef> <execute id="Category" description="Extract Categories" schemaentity="catgroup"> <param name=":lastRecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <functionDef id="Category Description" description="Extract Category Descriptions for a Locale" schemaentity="catgrpdesc"> <paramDef name=":lastRecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from catgrpdesc where catgroup_id > :lastRecord </body> </functionDef> <execute id="Category Description" description="Extract Category Descriptions for a Locale" schemaentity="catgrpdesc"> <param name=":lastRecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <functionDef id="Category Relationship" description="Extract Category-Relations for a Locale" schemaentity="catgrprel"> <paramDef name=":lastRecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from catgrprel where catgroup_id_child > :lastRecord </body> </functionDef> <execute id="Category Relationship" description="Extract Category-Relations for a Locale" schemaentity="catgrprel"> <param name=":lastRecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <!-- *************************** --> <!-- extract Product information --> <!-- *************************** --> <functionDef id="Product" description="Extract Product" schemaentity="catentry"> <paramDef name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from catentry where catentry_id > :lastrecord </body> </functionDef> <execute id="Product" description="Extract Product" schemaentity="catentry"> <param name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <functionDef id="Product Relationship" description="Extract Product Ship information" schemaentity="catentrel"> <paramDef name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from catentrel where catentry_id_child > :lastrecord </body> </functionDef> <execute id="Product Relationship" description="Extract Product Ship information" schemaentity="catentrel"> <param name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <functionDef id="Product Description" description="Extract Product Description" schemaentity="catentdesc"> <paramDef name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from catentdesc where catentry_id > :lastrecord </body> </functionDef> <execute id="Product Description" description="Extract Product Description" schemaentity="catentdesc"> <param name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <functionDef id="Product Ship" description="Extract Product Ship information" schemaentity="catentship"> <paramDef name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from catentship where catentry_id > :lastrecord </body> </functionDef> <execute id="Product Ship" description="Extract Product Ship information" schemaentity="catentship"> <param name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <functionDef id="Category Product Relationship" description="Extract Category Product Relations" schemaentity="catgpenrel"> <paramDef name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from catgpenrel where catgroup_id > :lastrecord </body> </functionDef> <execute id="Category Product Relationship" description="Extract Category Product Relations" schemaentity="catgpenrel"> <param name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <!-- **************************************** --> <!-- Extract Product Attribute Information --> <!-- **************************************** --> <functionDef id="Product Attribute Values" description="Extract Product Attribute values for a Locale" schemaentity="attrvalue"> <paramDef name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from attrvalue where catentry_id > :lastrecord </body> </functionDef> <execute id="Product Attribute Values" description="Extract Product Attribute values for a Locale" schemaentity="attrvalue"> <param name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> </execute> <!-- ************************************************* --> <!-- Extract Product Price Information --> <!-- ************************************************* --> <functionDef id="Offer" description="Extract Offer" schemaentity="offer"> <paramDef name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> <body> select * from offer where catentry_id > :lastrecord </body> </functionDef> <execute id="Offer" description="Extract Offer" schemaentity="offer"> <param name=":lastrecord" type="string" value="10300" description="Last record before loading new data" /> </execute> </sqlx>
Beispiel zum Extrahieren von Daten
Im folgenden Beispiel werden Daten zum Member-Subsystem unter Verwendung der Datei MemberSubsystemFilter.xml aus einer Datenbank extrahiert.
![]()
![]()
![]()
![]()
![]()
java com.ibm.wca.MassExtract.Extract
-filter MemberSubsystemFilter.xml -outfile MemberSubsystemExtracted.xml
-dbname mall -dbuser myname -dbpwd mypassword -customizer MemberSubsystemCustomizer
QWEBCOMM/EXTWCSDTA FILTER(MemberSubsystemFilter.xml)
OUTFILE(MemberSubsystemExtracted.xml) DATABASE(database_name)
SCHEMA(mall) INSTROOT(/QIBM/UserData/WebCommerce/instances/mser)
PASSWD(mypassword)
![]() |