Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Blah, blah, blahInfinit.e supports harvesting data from traditional RDBMS (Relational Database Management Systems) using JDBC (Java Database Connectivity) drivers. The Sample Database Harvester Specification below demonstrates how to connect to and extract data from a database using the harvester:

Code Block
titleSample Database Harvester Specification
source : {
   ... 
   "extractType" : "Database",
   "authentication" : {
       "username" : "username", 
       "password" : "password"}, 
   "database" : {
       "databaseType" : "mysql",
       "hostname" : "my.databaseserver.com",
       "port" : "3306"
       "databaseName" : "database",
       "query" : "SELECT * FROM IncidentReport", 
       "deltaQuery" : "SELECT * FROM IncidentReport WHERE REPORTDATETIME >= (SELECT ADDDATE(CURDATE(),-7))",
       "deleteQuery" : "",
       "primaryKey" : "NID",
       "title" : "CCN",
       "snippet" : "OFFENSE",
       "publishedDate" : "REPORTDATETIME"
   }, 
   "useExtractor" : "none",
   ...
}

* extractType
The extractType field is used to tell the harvester the type of source to extract from, i.e.: Database. Other valid values include: File, Feed, etc.

  • authentication
    The Authentication object of the Source document is a subset of the full Authentication object in that it only uses the 'username' and 'password' fields. The Database Harvester uses the username and password from the Authentication object as database credentials (if needed).
    • username
    • password
      Note: The password field in the Authentication object is currently clear text. If the string value placed in password is clear text it is not encrypted by Infinit.e. Encryption of the password field is planned for a future release.
  • database
    The Database object 
    • databaseType
      The type of RDBMS to connect to. Valid values currently include: mysql, db2, oracle, mssqlserver, sybase.
    • hostname
    • port
    • databaseName
    • query
    • deltaQuery
    • deleteQuery
    • primaryKey
    • title
    • snippet
    • publishedData
  • useExtractor