How to Query Java Objects with XPath

How to Query Java Objects with XPathData Pipeline’s query engine allows you to use XPath to query XML, JSON, and Java objects.  This walkthrough will show you how to query Java objects using XPath and save the results to a CSV file.  While the reading and writing will be done with the JavaBeanReader and CSVWriter classes, you can swap out the CSVWriter for any other endpoint or transformation that Data Pipeline supports. Continue reading

Data Pipeline 2.3 Now Available

  • added streaming JSON reading and writing (simple and template based)
  • added SimpleXmlWriter
  • improved handling of recursive XML-to-records
  • added user-definable demux strategies
  • DeMuxReader is no longer a public class since it should not be reference directly
  • improved exception handling in JdbcReader
  • BUGFIX: JavaBeanReader now handles xpath for recursive text children
  • updated Apache POI to v3.9
  • IncludeFields & ExcludeFields now accept a collection of field names in their constructor and add method
  • added JdbcReader.useColumnLabel property to allow fields to be named using the column labels (or aliases) instead of the underlying, real column names
  • added Excel 2007 provider (POI_XSSF)
    Excel handling now defaults to the Apache POI_XSSF (Excel 2007) provider, instead of POI (Excel 2003)
  • added FixedWidthField.align to allow left-filled (right aligned) fields
  • added FixedWidthField.fillChar to allow fields to specify a different filler from their reader/writer
  • reduced memory overhead for fields and records
  • CSV performance improvements
  • exception property values now truncated to 256 chars
  • using StringBuilder (instead of StringBuffer) internally to improve performance

6 Tips to Improve Your Exception Handling

6 Tips to Improve Your Exception Handling

Updated: July 2021

Proper exception handling can save you days in troubleshooting. Unexpected production issues can ruin anyone’s dinner and weekend plans, at any time. Furthermore, your reputation is on the line if you can’t resolve them quickly. A clear policy on exception management will save you diagnosis, reproduction, and correction time. What’s most important, it will give you peace of mind (and some hours back!).

Here are 6 tips on how you too can improve your exception handling.
Continue reading

Export CSV and Excel from Java web apps With Data Pipeline

Updated: July 2021

This article will demonstrate how to download CSV (comma-separated values) and Excel data from Java web applications using Data Pipeline. It will also show one way to plug Data Pipeline into your JSPs.

Data Pipeline is often used in non-GUI applications to move data from one place/format to another. However, Data Pipeline can just as easily be plugged into your web, mobile, and desktop applications. Being as lightweight and Java-centric as it is, it is perfect for handling your data conversion and manipulation use-cases.

Continue reading

Data Pipeline 2.2.8 Now Available

  • added TemplateWriter for writing text streams using FreeMarker templates
  • added new examples for writing XML and HTML files using TemplateWriter
  • BUGFIX: XmlWriter’s (XmlTemplate, File) constructor now calls setFieldNamesInFirstRow(false) by default
  • BUGFIX: The JxlProvider now converts intervals and user-defined types to string when generating Excel files
  • Intervals are no longer converted to strings when added to a field/record
  • BasicFieldTransformer can now convert numbers to intervals (seconds, months, days, minutes, etc.)
  • JdbcWriter now has public accessors for connection, tableName, batchMode, and jdbcTypes
  • individual fields can now be removed from a FieldList
  • FieldList can now accept collections of strings
  • updated Apache POI to v3.8