scriptella

Scriptella: XML to DB: Insert Into from XPATH

痴心易碎 提交于 2019-12-24 12:16:29
问题 I have an XML file that looks like this: <XML> <Table name='test'> <Row> <Field name='key'>1000</Field> <Field name='text'>Test</Field> </Row> </Table> </XML> id like to parse this xml and use it within an insert statement: <query connection-id="in"> /XML/Table/Row <script connection-id="out"> INSERT INTO X t ( t.entitykey, t.text ) VALUES ( ???????? ); </script> </query> How do I access a specific Field-Tag from within the insert statement using XPATH? We prefer to have one XSD that takes

Duplicate Key error when using INSERT DEFAULT

耗尽温柔 提交于 2019-12-08 07:33:37
问题 I am getting a duplicate key error, DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, when I try to INSERT records. The primary key is one column, INTEGER 4, Generated, and it is the first column. the insert looks like this: INSERT INTO SCHEMA.TABLE1 values (DEFAULT, ?, ?, ...) It's my understanding that using the value DEFAULT will just let DB2 auto-generate the key at the time of insert, which is what I want. This works most of the time, but sometimes/randomly I get the duplicate key error.

How to ETL multiple files using Scriptella?

有些话、适合烂在心里 提交于 2019-12-06 07:46:53
问题 I am having multiple log files 1.csv,2.csv and 3.csv generated by a log report. I want to read those files and parse them concurrently using Scriptella. 回答1: Scriptella does not provide parallel job execution out of the box. Instead you should use a job scheduler provided by an operating system or a programming environment (e.g. run multiple ETL files by submitting jobs to an ExecutorService). Here is a working example to import a single file specified as a system property: ETL file : <

How to ETL multiple files using Scriptella?

可紊 提交于 2019-12-04 14:16:12
I am having multiple log files 1.csv,2.csv and 3.csv generated by a log report. I want to read those files and parse them concurrently using Scriptella. Scriptella does not provide parallel job execution out of the box. Instead you should use a job scheduler provided by an operating system or a programming environment (e.g. run multiple ETL files by submitting jobs to an ExecutorService). Here is a working example to import a single file specified as a system property: ETL file : <!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd"> <etl> <connection id="in" driver="csv" url="