From a195f04737956b5a8afb158696a9d6cbe6df3906 Mon Sep 17 00:00:00 2001 From: Thad Guidry Date: Mon, 17 May 2021 17:34:58 -0500 Subject: [PATCH] Update the README.md for database extension (#3916) * Update the README.md for database extension * Update README.md * Add instructions to extend with other vendors Co-authored-by: Antonin Delpeuch --- extensions/database/README.md | 46 ++++++----------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/extensions/database/README.md b/extensions/database/README.md index 28231b7df..0dd07734c 100644 --- a/extensions/database/README.md +++ b/extensions/database/README.md @@ -1,41 +1,9 @@ -This project is an extension for OpenRefine that provides a way to import database data using JDBC. +This project is an OpenRefine extension for importing database data using JDBC. +For exporting to a database, other code can be found under folder `OpenRefine/main/src/com/google/refine/exporters/sql` +## Adding support for other database vendors -INSTALL - -1. Before installing this extension download OpenRefine code from http://code.google.com/p/google-refine/source/checkout. - -2. Pull this extension's code into folder database under folder /extensions. -For more information on how to write a OpenRefine extensions and where to put the files see http://code.google.com/p/google-refine/wiki/WriteAnExtension - -The folder structure should resemble this: -grefine-all/ -----------/extensions ---------------/database -------------------/module -------------------/src -------------------build.xml -------------------README (this file) - -3. Update build.xml in folder /extensions with build and clean ant tasks for database: - - - - - - - - - - - - - - - - - - - - -4. If using Eclipse, make sure that you build project with ant +1. You'll want to register an additional Database Service: https://github.com/OpenRefine/OpenRefine/blob/master/extensions/database/src/com/google/refine/extension/database/DatabaseService.java +2. Provide the connection and service classes, look at the PostgreSQL one or MySQL one as examples: https://github.com/OpenRefine/OpenRefine/tree/master/extensions/database/src/com/google/refine/extension/database +3. Then wire up the interface with defaults as desired: https://github.com/OpenRefine/OpenRefine/blob/master/extensions/database/module/scripts/index/database-source-ui.js#L93 +4. Add drivers manually to the classpath, or update the pom file to provide them as dependencies as other DB libraries are done: https://github.com/OpenRefine/OpenRefine/blob/master/extensions/database/pom.xml