JDBC

Java Database Connectivity is an application programming interface for the programming language Java, which defines how a client may access a database. It is a Java-based data access technology used for Java database connectivity. It is part of the Java Standard Edition platform, from Oracle Corporation.

Java Tutorial: JDBC Basics

Click the following link to see an example of this set up process using JDBC as the repository connector and BFS as the Output connector. JDBC to BFS Oracle Integration


Authentication Connection

This connector works for any Database that accepts JDBC connections. It requires knowledge of which JDBC Driver you will be using, as well as the specific connection parameters to your JDBC Instance. These can vary greatly by system. Click here for more information on setting up an Authentication Connection.

JDBC Authentication Connection Configuration

  • Name: Unique name for this auth connector.

  • Username: The Username of the user to authenticate with to the JDBC DB Instance.

  • Password: The password associated with the above username.

  • JDBC URL: The Full JDBC URL to connect to. Required.

  • JDBC Driver: The JDBC Driver to use, based on the DB you are connecting to.

    • Use the table below to find and retrieve the jar file for your database, and place it in the tomcat/lib folder

Note:  
JDBC is a widely used protocol, and has not been tested with every system on this list.


Discovery Connector

JDBC Discovery Connector Configurations

  • Name: A name for the Discovery Connection to identify it in the UI.

  • Authentication Connection: JDBC Authentication Connector

  • Ignore Types: Comma delimited list of types to ignore. Note that you can have regex as well. So to ignore all types with "workflow" in the name, you would enter(.)workflow(.) into the ignore types textbox.

  • Table Types: Types of tables delimited by comma to retrieve. Normal values are TABLE,VIEW,SYSTEM TABLE,GLOBAL TEMPORARY,LOCAL TEMPORARY,ALIAS,SYNONYM. The default value and the one used mostly is TABLE

  • Driver: JDBC Driver class (i.e.com.mysql.jdbc.Driver)

  • Catalogue: Enter text to narrow results or leave blank to not use Catalogue in Discovery.

  • Schema Pattern: Must match the schema name as it is stored in the database. Enter a single space to discover those without a schema. Leave blank if you do not want to use the schema name to narrow the search.

  • Table Name Pattern: Enter % to search for all tables or enter text to match against.


JDBC Integration Connection

Your JDBC Integration connection allows 3Sixty to input and output data to and from your JDBC repository.

The Output Connection will push records, metadata, and permissions into the target repository. They also handle deleting content in sync mode. These connectors output files, folders, metadata, versions and renditions to the output system associated with this connector. Every Output Connector can define custom fields that it needs to be able to connect and write to the repository. These fields are defined during the development of the individual connectors.

The Repository Connector allows organisations to read from Repositories using a Java Database Connectivity (JDBC) technology. This means that using 3Sixty and your JDBC Driver of choice, you can connect to many repositories to retrieve data and content.

Click here for more information on setting up an integration connection.

JDBC Integration Connection Configuration

  • Connection Name: This is a unique name given to the connector instance upon creation.

  • Description: A description of the connector to help identify it.

  • Authentication Connection: Your JDBC Auth connection


JDBC Job Configuration

Currently, there are two processors included out of the box:

  • Default JDBC Processor

  • Failed ID Processor

JDBC Processor Config

The JDBC Connector uses different processors which process results in different ways. Some fields will only function with certain processors.

  • SQL Query: The SQL Query to run.

  • Failed ID: Only works for the Failed ID JDBC Processor (See below)

  • ID Field: The field to use as the source repository id

  • Fetch Size: Refers to how many rows to fetch from the data source at one time. Default is 10.

  • Input Directory: This is for processors where metadata is in the database but the binary content files are on the filesystem. This would be the root directory of the files. You can leave blank if not needed.

  • Output Directory: Some processors needs a place to safely store files while doing conversions and processing. This is such a place. You can leave blank if not needed.

  • Internal Queue Size: Records to queue before halting read from the data source. Once records fall below the internal queue size, reading will resume.

  • Include Content: Check to include content or un-check to exclude content and only retrieve metadata.

  • Processor Class: The Processor Class is a registered Spring Bean and is used to process the ResultSet.

Default JDBC Processor

The default processor runs a query and will convert the table rows into processable documents. It does not use the start and end times configured in the Details tab. In order to filter on date fields, you will need your own WHERE clause.

Failed ID Processor

The Failed ID processor is used for running errors. It is run for each failed document ID and offers the following parameter to insert the id into your failed ids query.

${DOC_ID}

So an example of a failed ID query would be

Copy
SELECT * FROM MYTABLE WHERE OBJECTID = '${DOC_ID}'

Output Specification

  • JDBC Output Table Name: This field is the name of the table to output items to. Required if not using Auto Create (If not set, and Auto Create is used. The Job Name will be used instead).

  • JDBC Output Key: The unique key to find/set/update in the table. Required if not using Auto Create.

  • Catalogue: The Catalogue (Or Domain) of the JDBC Instance to connect to. Required if not using Auto Create.

  • Schema: The Schema (Or Database/NameSpace) of the JDBC Instance to connect to. Require for Output.

  • Binary Column Name: The name of the column where document binaries will be sent to if "Include Binaries" is checked in the job configuration.

  • Auto Create: See below

  • Quote Identifier: If there are spaces in your table names, catalog names, schema names or column names, enter a quote identifier. For example, SQL Server and Oracle use a double quote ". MySQL uses a backtick `

Important:  AUTO CREATE
Use extreme caution when using this field. The Default for this field is False. If Checked it will only use the Table Name, Schema Name, and Binary Column Name fields from this tab.


Content Service Connection

This section covers the JDBC specific configuration of the Content Service Connector. For a description of how to set up a content services connector generically see Content Service Connectors.

Configuration Fields

This section covers the JDBC specific configuration of the Content Service Connector.

  • JDBC Table Name: Database table name.

  • Schema: Database schema name.

  • Catalogue: Database catalog name.

  • ID Field: The primary key column to use as the unique ID (expecting an auto generated (i.e. auto increment) field.

  • Name Property: The column to use as the "document name". This field should not be left blank.

  • Created Date Property: The column to use as the "document created date". This field should not be left blank.

  • Modified Date Property: he column to use as the "document modified date". This field should not be left blank.

  • Binary Property: The column to use as the file content. This field can be left blank.

  • Root Version Id Property: If the entities in the table track versions, this should provide the column that contains the root version id. This field can be left blank.

  • Is Latest Version Property: This field is only used if the Root Version Id Field is populated. This field can be left blank only if the Root Version Id Field is also blank. If the entities in the table track versions, this should provide the column that contains whether the version is the latest (as a boolean).

  • Major Version Label Property: This field is only used if the Root Version Id Field is populated. This field can be left blank. If the entities in the table track versions, this should provide the column that contains the major version portion of a version label.

  • Minor Version Label Property: This field is only used if the Root Version Id Field is populated. This field can be left blank. If the entities in the table track versions, this should provide the column that contains the major version portion of a version label.

  • Quote Identifier Property: If there are spaces in your table names, catalog names, schema names or column names, enter a quote identifier. For example, SQL Server and Oracle use a double quote ". MySQL uses a backtick `

Supported Methods

  • createFile

  • deleteObjectByID

  • findTypeDefinition

  • getFileContent

  • getObjectProperties

  • updateFile

  • updateProperties


Advanced Topic: Connecting to a Microsoft Access Database

To use an Access database you'll need a JDBC Driver here

You will need to install the jars in the 3sixty-admin web app. This post tells you the jars you will need:

Place them into 3sixty-admin/WEB-INF/lib

After installing the jars you should be able to start 3Sixty and use the JDBC connector as per usual.


API Keys

JDBC Connector: Read=true: Write=true: MIP=false

Repo (Read) Specs

Key

Description

Data Type

processorclass Processor Class String

query

SQL Query

String

fquery

Failed ID Query

String

idField

ID Field

String

fetchsize

Fetch Size

String

inputdirectory

Input Directory

String

outputdirectory

Output Directory

String

internalqueuesize

Internal Queue Size

String

process_content

Include Content

Boolean

minPoolSize

Minimum connection pool size

Long

Output (Write) Specs

Key

Description

Data Type

jdbc_table JDBC Table Name String

jdbc_key

JDBC Output Key

String

jdbc_catalog

Catalog

String

jdbc_schema

Schema

String

jdbc_binary_column_name

Binary Column Name

String

jdbc_datetime_format

JDBC Date Time Format

String

jdbc_auto_create

Auto Create

Boolean

quoteIdentifier

Quote Identifier Property

String

minPoolSize

Minimum connection pool size

Long


Need to move or manage database content? See how we can help.