RebaseData Java Client

Java-Client for the RebaseData API to read and convert databases

License

License

MIT
Categories

Categories

Data CLI User Interface
GroupId

GroupId

com.rebasedata
ArtifactId

ArtifactId

client
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

RebaseData Java Client
Java-Client for the RebaseData API to read and convert databases
Project URL

Project URL

https://github.com/rebasedata/java-client
Source Code Management

Source Code Management

https://github.com/rebasedata/java-client

Download client

How to add to project

<!-- https://jarcasting.com/artifacts/com.rebasedata/client/ -->
<dependency>
    <groupId>com.rebasedata</groupId>
    <artifactId>client</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.rebasedata/client/
implementation 'com.rebasedata:client:0.0.5'
// https://jarcasting.com/artifacts/com.rebasedata/client/
implementation ("com.rebasedata:client:0.0.5")
'com.rebasedata:client:jar:0.0.5'
<dependency org="com.rebasedata" name="client" rev="0.0.5">
  <artifact name="client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.rebasedata', module='client', version='0.0.5')
)
libraryDependencies += "com.rebasedata" % "client" % "0.0.5"
[com.rebasedata/client "0.0.5"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

rebasedata-java-client

Introduction

This library allows to convert various database formats in Java using the RebaseData API. When processing a database, the database is first sent to the secure RebaseData servers which then return the converted data. See below for a list of examples.

Installation

Download the latest JAR file. There are no dependencies.

Command line examples

See detailed instructions how to run command line tool:

java -jar rebasedata-client.jar

Convert a MDB file and save the CSV files (one for each table) to a ZIP file. Keep in mind that CSV is the default output format.

java -jar rebasedata-client.jar convert database.mdb output.zip

Convert a MDB file and save the CSV files (one for each table) to a directory. Keep in mind that CSV is the default output format.

java -jar rebasedata-client.jar convert database.mdb /tmp/output/

Convert a MDB file to MySQL and save it in a local directory. After conversion, you'll have a MySQL script file in /tmp/output/data.sql.

java -jar rebasedata-client.jar convert --output-format=mysql database.mdb /tmp/output/

Convert a MDB file to MySQL and use an API key or a Customer Key.

java -jar rebasedata-client.jar convert --api-key=your-api-or-customer-key --output-format=mysql database.mdb /tmp/output/

Code examples

Convert a MDB database to a set of CSV files (one CSV for each table) and save it as a ZIP file.

import com.rebasedata.client.Converter;
import com.rebasedata.client.InputFile;

List<InputFile> inputFiles = new ArrayList();
inputFiles.add(new InputFile(new File("access.mdb")));

Converter converter = new Converter();
converter.convertAndSaveToZipFile(inputFiles, "csv", new File("/tmp/output.zip"));

Convert a MDB database to MySQL and save the result in a local directory.

import com.rebasedata.client.Converter;
import com.rebasedata.client.InputFile;

List<InputFile> inputFiles = new ArrayList();
inputFiles.add(new InputFile(new File("access.mdb")));

Converter converter = new Converter();
converter.convertAndSaveToDirectory(inputFiles, "mysql", new File("/tmp/output/"));

You can also change the configuration of the library:

import com.rebasedata.client.Config;
import com.rebasedata.client.Converter;

Config config = new Config();
config.setApiKey("your-api-key"); // In case you have an API or Customer Key
config.setWorkingDirectory("/tmp/working-dir"); // In case you want to change the working directory

Converter converter = new Converter(config);

License

This code is licensed under the MIT license.

Feedback

We love to get feedback from you! Did you discover a bug? Do you need an additional feature? Open an issue on Github and RebaseData will try to resolve your issue as soon as possible! Thanks in advance for your feedback!

Versions

Version
0.0.5
0.0.4
0.0.3