...
Description
Field | Description | Note | |
---|---|---|---|
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 | Username for the database credentials. | |
password | Password must be encrypted. download the jasypt command line utility to encrypt (link). | ||
databaseType | The type of RDBMS to connect to. Valid values currently include: mysql, db2, oracle, mssqlserver, sybase. | ||
hostanme | The hostname of the database server to connect to, i.e. "my.databaseserver.com" in the example above. | ||
port | The port that the database accepts incoming connections on. | ||
databaseName | The name of the database to connect to. | ||
query | The query field is used to specify the SQL used to perform a full extraction of data for the source. This is generally used the first time the harvester extracts data from a source with incremental extractions being specified using the deltaQuery below. | ||
deltaQuery | The deltaQuery field is used to specify the SQL that extracts data from the source RDBS based on one or more delta values, i.e. created or modified date for a record. | ||
deleteQuery | Note: The deleteQuery functionality of the Database Harvester is not implemented in the Beta version of Infinit.e. | ||
primaryKey | Primary key field in data set, used to help identify whether a record is new or previously harvested. | ||
title | Record field used to populate the document's title field. | ||
snippet | Record field used to populate the document's description field. | ||
publishedDate | Record field used to populate the document's published date field. |
Examples
The following input table represents an incident report which will be used by way of example.
nid | ccn | reportdatetime | shift | offense | method | blocksiteaddress | latitude | longitude | city | state | ward | anc | smd | district | psa |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
955778 | 11012669 | Jan 29, 2011 12:00:00 AM UTC | UNK | THEFT | 2 | 1300 B/O CONNECTICUT AVE NW | 38.90992780287290 | -77.04360677659660 | WASHINGTON | DC | 2 | 2B | 2B02 | SECOND | 208.0 |
In the following source example, the database block is configured to pull data from an the incident report provided the publishedDate
matches the criteria of the deltaQuery
mysql query.
...