Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Salesforce JDBC Connector #2548

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bf6f0ae
Add Salesforce JDBC Connector
pgagnon Dec 15, 2019
8a5f153
Implement credentials provisioning through catalog properties in Sale…
pgagnon Jan 19, 2020
beddacb
Implement wasNull in Salesforce JDBC driver
pgagnon Jan 19, 2020
e060ed9
Remove extraneous credentialsConfig binding
pgagnon Feb 7, 2020
7341c8d
Remove presto-salesforce from development config.properties default p…
pgagnon Feb 7, 2020
c92216c
Update presto-salesforce/pom.xml to version 330-SNAPSHOT
pgagnon Feb 7, 2020
122c378
Remove ForceSoapValidator
pgagnon Feb 28, 2020
126cabb
Rename ParameterMetadataImpl to ForceParameterMetadata
pgagnon Feb 28, 2020
860c3be
Modify ForceResultField hash and equals methods to use Objects functions
pgagnon Feb 28, 2020
2ec0fe1
Make name and type fields mandatory
pgagnon Feb 28, 2020
b7d5938
Make FieldDef hash and equals methods take advantage of Objects funct…
pgagnon Feb 28, 2020
770ea1c
Add salesforce.fetch-size configuration parameter
pgagnon Feb 28, 2020
31887d8
Improve module configuration code
pgagnon Feb 28, 2020
3c4d993
Update pom.xml to 331-SNAPSHOT
pgagnon Feb 28, 2020
d96c082
Fix checkstyle errors
pgagnon Apr 11, 2020
4a34b34
Remove unused argument from getConnectionFactory
pgagnon Apr 11, 2020
4075dc7
Add rudimentary documentation for salesforce connector
pgagnon Apr 11, 2020
ea7cf96
Resolve review comments in ForceConnection
pgagnon Apr 11, 2020
48da5bb
Remove unused import in SalesforceClientModule
pgagnon Apr 11, 2020
72ced05
Add explicit constructor to ForceConnectionInfo
pgagnon Apr 11, 2020
874f600
Throw on usage of unimplemented JDBC methods
pgagnon Apr 11, 2020
4b07cd7
Remove dead code related to caching
pgagnon Apr 12, 2020
8f3f0ee
Update pom.xml to version 339-SNAPSHOT
pgagnon Jul 12, 2020
50d238c
Migrate to objectMapping instead of blockMapping
pgagnon Jul 13, 2020
f37a406
Fix timezone handling in convertToSoqlParam
pgagnon Jul 13, 2020
864d465
Fix docs snafu
pgagnon Jul 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 57 additions & 59 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,81 +76,79 @@
</properties>

<modules>
<module>presto-accumulo</module>
<module>presto-accumulo-iterators</module>
<module>presto-array</module>
<module>presto-atop</module>
<module>presto-base-jdbc</module>
<module>presto-benchmark</module>
<module>presto-benchmark-driver</module>
<module>presto-benchto-benchmarks</module>
<module>presto-bigquery</module>
<module>presto-blackhole</module>
<module>presto-cassandra</module>
<module>presto-cli</module>
<module>presto-client</module>
<module>presto-docs</module>
<module>presto-druid</module>
<module>presto-elasticsearch</module>
<module>presto-example-http</module>
<module>presto-geospatial</module>
<module>presto-geospatial-toolkit</module>
<module>presto-google-sheets</module>
<module>presto-hive</module>
<module>presto-hive-hadoop2</module>
<module>presto-iceberg</module>
<module>presto-jdbc</module>
<module>presto-spi</module>
<module>presto-array</module>
<module>presto-jmx</module>
<module>presto-record-decoder</module>
<module>presto-kafka</module>
<module>presto-kinesis</module>
<module>presto-kudu</module>
<module>presto-local-file</module>
<module>presto-main</module>
<module>presto-matching</module>
<module>presto-redis</module>
<module>presto-accumulo-iterators</module>
<module>presto-accumulo</module>
<module>presto-cassandra</module>
<module>presto-blackhole</module>
<module>presto-memory</module>
<module>presto-memory-context</module>
<module>presto-memsql</module>
<module>presto-ml</module>
<module>presto-mongodb</module>
<module>presto-mysql</module>
<module>presto-oracle</module>
<module>presto-orc</module>
<module>presto-parquet</module>
<module>presto-parser</module>
<module>presto-password-authenticators</module>
<module>presto-rcfile</module>
<module>presto-hive</module>
<module>presto-hive-hadoop2</module>
<module>presto-teradata-functions</module>
<module>presto-example-http</module>
<module>presto-local-file</module>
<module>presto-tpch</module>
<module>presto-tpcds</module>
<module>presto-raptor-legacy</module>
<module>presto-base-jdbc</module>
<module>presto-mysql</module>
<module>presto-memsql</module>
<module>presto-phoenix</module>
<module>presto-pinot</module>
<module>presto-plugin-toolkit</module>
<module>presto-postgresql</module>
<module>presto-redshift</module>
<module>presto-sqlserver</module>
<module>presto-mongodb</module>
<module>presto-client</module>
<module>presto-parser</module>
<module>presto-main</module>
<module>presto-server-main</module>
<module>presto-ml</module>
<module>presto-geospatial</module>
<module>presto-geospatial-toolkit</module>
<module>presto-benchmark</module>
<module>presto-testing</module>
<module>presto-tests</module>
<module>presto-product-tests</module>
<module>presto-product-tests-launcher</module>
<module>presto-prometheus</module>
<module>presto-proxy</module>
<module>presto-raptor-legacy</module>
<module>presto-rcfile</module>
<module>presto-record-decoder</module>
<module>presto-redis</module>
<module>presto-redshift</module>
<module>presto-resource-group-managers</module>
<module>presto-jdbc</module>
<module>presto-cli</module>
<module>presto-benchmark-driver</module>
<module>presto-salesforce</module>
<module>presto-server</module>
<module>presto-server-main</module>
<module>presto-server-rpm</module>
<module>presto-docs</module>
<module>presto-verifier</module>
<module>presto-testing-server-launcher</module>
<module>presto-plugin-toolkit</module>
<module>presto-resource-group-managers</module>
<module>presto-password-authenticators</module>
<module>presto-session-property-managers</module>
<module>presto-spi</module>
<module>presto-sqlserver</module>
<module>presto-teradata-functions</module>
<module>presto-test-jdbc-compatibility-old-driver</module>
<module>presto-test-jdbc-compatibility-old-server</module>
<module>presto-testing</module>
<module>presto-testing-kafka</module>
<module>presto-testng-services</module>
<module>presto-tests</module>
<module>presto-thrift</module>
<module>presto-benchto-benchmarks</module>
<module>presto-thrift-api</module>
<module>presto-thrift-testing-server</module>
<module>presto-tpcds</module>
<module>presto-tpch</module>
<module>presto-verifier</module>
<module>presto-thrift</module>
<module>presto-matching</module>
<module>presto-memory-context</module>
<module>presto-prometheus</module>
<module>presto-proxy</module>
<module>presto-kudu</module>
<module>presto-elasticsearch</module>
<module>presto-iceberg</module>
<module>presto-google-sheets</module>
<module>presto-bigquery</module>
<module>presto-pinot</module>
<module>presto-oracle</module>
<module>presto-druid</module>
</modules>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,6 @@ private static String escapeNamePattern(String name, String escape)
{
requireNonNull(name, "name is null");
requireNonNull(escape, "escape is null");
checkArgument(!escape.isEmpty(), "Escape string must not be empty");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we implement it as a separate commit

checkArgument(!escape.equals("_"), "Escape string must not be '_'");
checkArgument(!escape.equals("%"), "Escape string must not be '%'");
name = name.replace(escape, escape + escape);
Expand Down
1 change: 1 addition & 0 deletions presto-docs/src/main/sphinx/connector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ from different data sources.
Prometheus <connector/prometheus>
Redis <connector/redis>
Redshift <connector/redshift>
Salesforce <connector/salesforce>
SQL Server <connector/sqlserver>
System <connector/system>
Thrift <connector/thrift>
Expand Down
53 changes: 53 additions & 0 deletions presto-docs/src/main/sphinx/connector/salesforce.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
====================
Salesforce Connector
====================

The Salesforce connector allows querying and creating tables in an
external Salesforce instance. This can be used to join data between
different systems like Salesforce and Hive, or between two different
Salesforce instances.

Configuration
-------------

To configure the Salesforce connector, create a catalog properties file
in ``etc/catalog`` named, for example, ``salesforce.properties``, to
mount the Salesforce connector as the ``salesforce`` catalog.
Create the file with the following contents, replacing the
connection properties as appropriate for your setup:

.. code-block:: none

connector.name=salesforce
connection-url=jdbc:salesforce://
connection-user=admin
connection-password=secret
salesforce.security-token=abc

Querying Salesforce
-------------------

The Salesforce connector provides single a schema named ``salesforce``.

SHOW TABLES FROM salesforce.salesforce;

You can see a list of the columns in the ``account`` table in the ``salesforce`` database
using either of the following::

DESCRIBE salesforce.salesforce.account;
SHOW COLUMNS FROM salesforce.salesforce.account;

Finally, you can access the ``account`` table::

SELECT * FROM salesforce.salesforce.account;

If you used a different name for your catalog properties file, use
that catalog name instead of ``salesforce`` in the above examples.

Salesforce Connector Limitations
--------------------------------

At this time this connector is read-only. Furthermore, it fetches data
using the Salesforce synchronous API, which offers limited performance.

Queries on the information schema can be especially expensive.
Loading