Git Product home page Git Product logo

salesforce-jdbc's Introduction

sforce-jdbc Build Status Build Status

Salesforce JDBC driver allows Java programs to connect to Salesforce data services using standard, database independent Java code. It is an open source JDBC driver written in Pure Java, and communicates over SOAP/HTTP(S) protocol.

The main purpose of the driver is to retrieve (only) data from Salesforce services for data analysis. Primary target platform for the driver usage is Eclipse BIRT engine.

Supported Salesforce and Java versions

The current version of the driver should be compatible with Salesforce Partner API version 39.0 and higher and Java 8.

Get the driver

Download the driver here

With Maven

Add repositories

<repositories>
    <repository>
        <id>com.ascendix.maven</id>
        <name>Ascendix Maven Repo</name>
        <url>https://github.com/ascendix/mvnrepo/raw/master</url>
    </repository>
    <repository>
        <id>mulesoft-releases</id>
        <name>MuleSoft Releases Repository</name>
        <url>http://repository.mulesoft.org/releases/</url>
        <layout>default</layout>
    </repository>
</repositories>

Add dependency

<dependency>
    <groupId>com.ascendix.salesforce</groupId>
    <artifactId>salesforce-jdbc</artifactId>
    <version>1.1-20180403.104727-1</version>
 </dependency>

How to connect

Driver class name

com.ascendix.jdbc.salesforce.ForceDriver

JDBC URL format

jdbc:ascendix:salesforce://[;propertyName1=propertyValue1[;propertyName2=propertyValue2]...]

There are two ways to connect to Salesforce:

  1. by using user and password;
  2. by using sessionId.

User and password parameters are ignored if sessionId parameter is set.

An example for a connection URL with user and password parameters:

jdbc:ascendix:salesforce://;[email protected];password=passwordandsecretkey

An example for a connection URL with sessionId parameter:

jdbc:ascendix:salesforce://;sessionId=uniqueIdAssociatedWithTheSession

Configuration Properties

Property Description
user Login username.
password Login password is associated with the specified username.
Warning! A password provided should contain your password and secret key joined in one string.
sessionId Unique ID associated with this session.
loginDomain Top-level domain for a login request.
Default value is login.salesforce.com.
Set test.salesforce.com value to use sandbox.
https Switch to use HTTP protocol instead of HTTPS
Default value is true
api Api version to use.
Default value is 50.0.
Set test.salesforce.com value to use sandbox.
client Client Id to use.
Default value is empty.

Supported features

  1. Queries support native SOQL;
  2. Nested queries are supported;
  3. Request caching support on local drive. Caching supports 2 modes: global and session. Global mode means that the cached result will be accessible for all system users for certain JVM session. Session cache mode works for each Salesforce connection session separately. Both modes cache stores request result while JVM still running but no longer than for 1 hour. The cache mode can be enabled with a prefix of SOQL query. How to use: =======
  • Global cache mode:
CACHE GLOBAL SELECT Id, Name FROM Account
  • Session cache mode
CACHE SESSION SELECT Id, Name FROM Account

Limitations

  1. The driver is only for read-only purposes now. Insert/udate/delete functionality is not implemented yet.

Configure BIRT Studio to use Salesforce JDBC driver

  1. How to add a JDBC driver

  2. How to set configuration properties for Salesforce JDBC driver.

    Birt provides various ways to set parameters for JDBC driver. For example, it can be done with the property binding feature in the data source editor and a report parameter.

    image

    See how it's done in [Salesforce JDBC report sample](docs/birt/Salesforce JDBC sample.rptdesign)

Sponsors

Ascendix Technologies Inc.

salesforce-jdbc's People

Contributors

eryabitskiy-acx avatar vyermakov avatar oleh-horchenok avatar nikolaymatokh avatar dependabot[bot] avatar gorchenok avatar asl-acx avatar eryabitskiy avatar ggrossetie avatar pgagnon avatar spuliaiev-sfdc avatar ascendixpr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.