The JDBC Importer provides a consistent mechanism of importing data from files into a JDBC compliant database through a simple interface and an XML config file.
very easy to use and worked out of the box
JDBCImporter v0.74 =============================== Changes From v0.73 ------------------ - Added header property for CSVDelimiterFormatter to set the initial contents of the csv file - Added BinaryDelimiterParser interface to parse binary files Changes From v0.72 ------------------ - Fix for csv delimited files with multi-lines causing a NullPointerException Changes From v0.71 ------------------ - Fix for exporting Times and Timestamps from Oracle9i database - Added row translator interface that can modify the row or indicate that the row should be skipped Changes From v0.70 ------------------ - Added new attribute on entity element called 'encoding' - Added sample export engine that uses an entity property for the select statement Changes From v0.69 ------------------ - Added new properties to specify XML element names produced by XMLDelimiterFromatter - Added current date value generator - Added ability to generate column values during import Changes From v0.68 ------------------ - Fixed parsing of XML when indent is used in XSLT - Added system property 'jdbcimporter.failonerror' that when set to 'true' will cause the JDBCImporter to end the import if an error occurrs - Added source entity concept to data generation where entity data stored in files and/or a database can be used as source data for data generation Changes From v0.67 ------------------ - Fixed BeanInfo for CSVDelimiterParser to return two new properties Changes From v0.66 ------------------ - Checking for string containing whitespace when parsing numbers/dates - Added ability to a file containing sql statemetns that are executed before and after the import (use the 'preSQLFile' and 'postSQLFile' attributes on the import element) - Added ability to trim all strings parsed before passing them onto a column translator and the import engine (use the 'trimValues' attribute on the import element) - Added ability to specify export engine per entity (use the 'engine' attribute on the entity element) Changes From v0.65 ------------------- - Fixed handling of catalog and schema - Added support Database Aware Column Translator Changes From v0.64 ------------------- - Fixed bug in CSVDelimiterFormatter and FixedDelimiterFormatter that caused null values to be printed out as 'null' - Added better support for parsing csv files (escaped enclosed delimiters, multi line) - Added ability to specify import engine per entity (use the 'engine' attribute on the entity element) Changes From v0.63 ------------------- - Fixed bug in CSV Delimiter Parser when a line ended with a column delimiter - Added support for BINARY, VARBINARY, LONGVARCHAR, LONGVARBINARY - Added column translators to read/save files to/from inputstreams Changes From v0.62 ------------------- - Moved column translator definition to 'translator' tag inside 'column' tag, so that properties can be applied to column translators - Added properties to column translators booleanToInt, intToBoolean and systemtime - Added default prefices for all delimiter parsers/formatters, connection definitions, column translators, column generators Changes From v0.61 ------------------- - Fixed NullPointerException when using batch and update engine with an entity definition that has no primary keys - Added BOOLEAN support - Added column translators that translate boolean values to int values Changes From v0.6 ------------------ - Added Pattern formatter and parser which uses a pattern (similar to a java.text.MessageFormat pattern) to format/parse lines - Added property 'ignoredPositions' to CSV Delimiter Parser - Added property 'length' to Fixed Delimiter Parser and Fixed Delimiter Formatter - Added property 'emptyPositions' to CSV Delimiter Formatter Changes From v0.6b8 --------------------- - Fixed parsing of custom format pattern for a column - Fixed error handling in datagenerator when there is no connection and several columns don't have types - Fixed problem with where attribute not being used in Ant wrapper for JDBC Exporter - Fixed if setFormat is called twice on a column (once when type is set and next time when a custom format is set) - Added unit tests - Added JNDI Connection Def and web test Changes From v0.6b7 --------------------- - Fixed error message when a number could not be parsed from a string in JDBCImporter - Added tutorials for Data Generator Changes From v0.6b6 --------------------- - Fixed bug where update and select statements where not cleaned up in the UpdateEngine - Added better logging of SQLExceptions (include Error Code and SQL State) Changes From v0.6b5 --------------------- - Added JDBCExporter tutorials - Fixed bug where exception is not being logged at the end of an import Changes From v0.6b4 -------------------- - Added commitCount attribute on import element (specifies how many rows to import before calling commit, default is 1) - Added Apache Commons Logging and logging statements in code - Fixed incorrect handling of SQLExceptions thrown by the JDBC driver when executeBatch was called. Changes From v0.6b3 --------------------- - Added ImportListener interface for capturing events during the import - Changed logging to use the ImportListener interface Changes From v0.6b2 ------------------- - JDK1.3 level API - A property element can be specified under an entity element. this property is a key/value pair of strings that can be used by a an import engine - The Update Engine (net.sourceforge.jdbcimporter.engine.UpdateEngine) now looks for the following properties on a column : - name = 'selectPostfix', value = '<sql after where clause>' : this will be added after the where clause that the UpdateEngine generates Changes From v0.6b ------------------- - A property element can be specified under a column element. this property is a key/value pair of strings that can be used by a delimiter parser, column translator and import engine - The Update Engine (net.sourceforge.jdbcimporter.engine.UpdateEngine) now looks for the following properties on a column : - name = 'primaryKey', value = 'true' : this will indicate that the column is part of the primary key - name = 'updateExpression', value = '<expression>' : this will replace the normal '?' in the set part of update statement with the expression. the expression must have only one '?' - Added 'batchCount' attribute to import element that specifies how many rows to import before committing or executing a batch update example : java -Djdbcimporter.engine=net.sourceforge.jdbcimporter.engine.UpdateEngine import.xml ----------Begin import.xml <import batchCount="10"> ... <entity table="test"> ... <column name="A"> <property name="primaryKey" value="true"/> </column> <column name="B"> <property name="updateExpression" value="? + B"/> </column> ... </entity> ... </import> -----------End import.xml This will cause the UpdateEngine to not look at the DatabaseMeta for the primary keys and to generate the following update sql statement: update test set ... B = ? + B ... where A = ? Also, If the JDBC driver supports batch mode the JDBCImporter will execute the batch update after every 10 rows. Otherwise, the JDBCImporter will turn off the auto commit and commit every 10 rows.
JDBCImporter v0.74 =============================== Changes From v0.73 ------------------ - Added header property for CSVDelimiterFormatter to set the initial contents of the csv file - Added BinaryDelimiterParser interface to parse binary files Changes From v0.72 ------------------ - Fix for csv delimited files with multi-lines causing a NullPointerException Changes From v0.71 ------------------ - Fix for exporting Times and Timestamps from Oracle9i database - Added row translator interface that can modify the row or indicate that the row should be skipped Changes From v0.70 ------------------ - Added new attribute on entity element called 'encoding' - Added sample export engine that uses an entity property for the select statement Changes From v0.69 ------------------ - Added new properties to specify XML element names produced by XMLDelimiterFromatter - Added current date value generator - Added ability to generate column values during import Changes From v0.68 ------------------ - Fixed parsing of XML when indent is used in XSLT - Added system property 'jdbcimporter.failonerror' that when set to 'true' will cause the JDBCImporter to end the import if an error occurrs - Added source entity concept to data generation where entity data stored in files and/or a database can be used as source data for data generation Changes From v0.67 ------------------ - Fixed BeanInfo for CSVDelimiterParser to return two new properties Changes From v0.66 ------------------ - Checking for string containing whitespace when parsing numbers/dates - Added ability to a file containing sql statemetns that are executed before and after the import (use the 'preSQLFile' and 'postSQLFile' attributes on the import element) - Added ability to trim all strings parsed before passing them onto a column translator and the import engine (use the 'trimValues' attribute on the import element) - Added ability to specify export engine per entity (use the 'engine' attribute on the entity element) Changes From v0.65 ------------------- - Fixed handling of catalog and schema - Added support Database Aware Column Translator Changes From v0.64 ------------------- - Fixed bug in CSVDelimiterFormatter and FixedDelimiterFormatter that caused null values to be printed out as 'null' - Added better support for parsing csv files (escaped enclosed delimiters, multi line) - Added ability to specify import engine per entity (use the 'engine' attribute on the entity element) Changes From v0.63 ------------------- - Fixed bug in CSV Delimiter Parser when a line ended with a column delimiter - Added support for BINARY, VARBINARY, LONGVARCHAR, LONGVARBINARY - Added column translators to read/save files to/from inputstreams Changes From v0.62 ------------------- - Moved column translator definition to 'translator' tag inside 'column' tag, so that properties can be applied to column translators - Added properties to column translators booleanToInt, intToBoolean and systemtime - Added default prefices for all delimiter parsers/formatters, connection definitions, column translators, column generators Changes From v0.61 ------------------- - Fixed NullPointerException when using batch and update engine with an entity definition that has no primary keys - Added BOOLEAN support - Added column translators that translate boolean values to int values Changes From v0.6 ------------------ - Added Pattern formatter and parser which uses a pattern (similar to a java.text.MessageFormat pattern) to format/parse lines - Added property 'ignoredPositions' to CSV Delimiter Parser - Added property 'length' to Fixed Delimiter Parser and Fixed Delimiter Formatter - Added property 'emptyPositions' to CSV Delimiter Formatter Changes From v0.6b8 --------------------- - Fixed parsing of custom format pattern for a column - Fixed error handling in datagenerator when there is no connection and several columns don't have types - Fixed problem with where attribute not being used in Ant wrapper for JDBC Exporter - Fixed if setFormat is called twice on a column (once when type is set and next time when a custom format is set) - Added unit tests - Added JNDI Connection Def and web test Changes From v0.6b7 --------------------- - Fixed error message when a number could not be parsed from a string in JDBCImporter - Added tutorials for Data Generator Changes From v0.6b6 --------------------- - Fixed bug where update and select statements where not cleaned up in the UpdateEngine - Added better logging of SQLExceptions (include Error Code and SQL State) Changes From v0.6b5 --------------------- - Added JDBCExporter tutorials - Fixed bug where exception is not being logged at the end of an import Changes From v0.6b4 -------------------- - Added commitCount attribute on import element (specifies how many rows to import before calling commit, default is 1) - Added Apache Commons Logging and logging statements in code - Fixed incorrect handling of SQLExceptions thrown by the JDBC driver when executeBatch was called. Changes From v0.6b3 --------------------- - Added ImportListener interface for capturing events during the import - Changed logging to use the ImportListener interface Changes From v0.6b2 ------------------- - JDK1.3 level API - A property element can be specified under an entity element. this property is a key/value pair of strings that can be used by a an import engine - The Update Engine (net.sourceforge.jdbcimporter.engine.UpdateEngine) now looks for the following properties on a column : - name = 'selectPostfix', value = '<sql after where clause>' : this will be added after the where clause that the UpdateEngine generates Changes From v0.6b ------------------- - A property element can be specified under a column element. this property is a key/value pair of strings that can be used by a delimiter parser, column translator and import engine - The Update Engine (net.sourceforge.jdbcimporter.engine.UpdateEngine) now looks for the following properties on a column : - name = 'primaryKey', value = 'true' : this will indicate that the column is part of the primary key - name = 'updateExpression', value = '<expression>' : this will replace the normal '?' in the set part of update statement with the expression. the expression must have only one '?' - Added 'batchCount' attribute to import element that specifies how many rows to import before committing or executing a batch update example : java -Djdbcimporter.engine=net.sourceforge.jdbcimporter.engine.UpdateEngine import.xml ----------Begin import.xml <import batchCount="10"> ... <entity table="test"> ... <column name="A"> <property name="primaryKey" value="true"/> </column> <column name="B"> <property name="updateExpression" value="? + B"/> </column> ... </entity> ... </import> -----------End import.xml This will cause the UpdateEngine to not look at the DatabaseMeta for the primary keys and to generate the following update sql statement: update test set ... B = ? + B ... where A = ? Also, If the JDBC driver supports batch mode the JDBCImporter will execute the batch update after every 10 rows. Otherwise, the JDBCImporter will turn off the auto commit and commit every 10 rows.
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?
Thanks for your review!
Get credit for your review by logging in via OpenID. Click your account provider: