Hitachi Vantara Pentaho Community Wiki
Child pages
  • JDBC Metadata

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Background

All JDBC drivers offer metadata as defined in java.sql.DatabaseMetaData. For instance, there's catalog metadata, general driver metadata and lot more. This metadata can be useful to generate schema migrations, or alternative schema representations (like XML Schema) or even code generation.

The get_jdbc_metadata.ktr transformation expects an input stream containing these fields:

  • jdbc_driver
  • jdbc_url
  • jdbc_user
  • jdbc_password

The transformation uses this data in a number of javascript steps to instantiate an actual JDBC connection to get resultsets with metadata. These resultsets are then converted to kettle output streams. The following output streams are defined:

  • data types output (see: java.sql.DatabaseMetaData.getTypeInfo())
  • tables output (see: java.sql.DatabaseMetaData.getTables())
  • columns output (see: java.sql.DatabaseMetaData.getTables())
  • primary key output (see: java.sql.DatabaseMetaData.getPrimaryKeys())
  • imported key output (see: java.sql.DatabaseMetaData.getImportedKeys())
  • index info output (see: java.sql.DatabaseMetaData.getIndexInfo())

See Also: