DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Data
  4. Importing Salesforce Data Into Amazon s3 via Jdbc Driver

Importing Salesforce Data Into Amazon s3 via Jdbc Driver

This article provides a tutorial on importing data from Salesforce into AWS S3 using AWS Data Pipeline and Progress JDBC driver.

Saikrishna Teja Bobba user avatar by
Saikrishna Teja Bobba
·
Oct. 08, 16 · Tutorial
Like (2)
Save
Tweet
Share
6.11K Views

Join the DZone community and get the full member experience.

Join For Free

The following tutorial shows how you can leverage Progress DataDirect Salesforce JDBC drivers to import the data from Salesforce into S3 storage engine.

AWS Data Pipeline is a web service that lets you process, transform, and move the data securely between AWS Storage and compute services in regular intervals. In addition to this, there is also one neat feature which enables you connect to any database with JDBC driver and import the data into S3 which you can use later to move it across either compute or storage services in AWS.

This tutorial explains how to leverage the Progress DataDirect Salesforce JDBC Driver to import the data from Salesforce into S3 storage engine with minimal effort and by creating a pipeline which you can essentially re-use multiple times.

Setting Up

  1. Download Progress DataDirect Salesforce JDBC drivers from here and install it on your machine. If you need help installing the drivers on your machine, visit this link for detailed documentation.
  2. Sign up for Amazon Web Services by visiting this link.
  3. Create an Amazon S3 Bucket from the AWS console by opening the Amazon S3 console at this link.
  4. Next, upload the Salesforce JDBC driver (sforce.jar) which can be found at \install_directory\ Progress\DataDirect\Connect_for_JDBC_51\lib to your newly created S3 bucket.

Creating the Data Pipeline

  1. From your AWS Console, go to Data Pipeline console and click on the button “Create New Pipeline.”
  2. Fill in the Name of your choice, select Source as "Build using Architect," choose your schedule that you would want to run this pipeline, choose the location for saving the logs on your S3 bucket and leave other options to default. At the end of the form, click on the button "Edit in Architect" to create the data flow. By default, you should see the following Pipeline.  Data Pipeline
  3. Add a New SQL Data Node, by clicking on Add button. Go to its configuration and click on the drop down "Add an optional field" and select"Database." You should see a new database component in your pipeline.
  4. Click on the Database component and you should see its configuration. Configure it as below:
    • Type:  ‘JDBC Database’.
    • Username: <Your Salesforce username>
    • Password: <Your Salesforce password>
    • Connection String: jdbc:datadirect:sforce://login.salesforce.com;;securitytoken=<Your Security Token>
    • JDBC Driver class: com.ddtek.jdbc.sforce.SForceDriver
    • JDBC Driver Jar Uri: s3://<your S3 bucket>/path/sforce.jar
  5. Revisit the SQL Data Node that you have created above and configure it as follows. For the sake of the tutorial, I am fetching the data from Account table in to S3.
    • Table: SFORCE.ACCOUNT
    • Select Query: SELECT * FROM SFORCE.ACCOUNT
  6. Next, add an S3DataNode. Configure it as follows. The file path is the location of the file on your S# bucket where the data read through Salesforce JDBC gets saved.
    • Type: S3DataNode
    • File Path: s3://<Your S3 Bucket>/path/<filename>.csv
  7. Now add a CopyActivity and configure it as follows:
    • Type: CopyActivity
    • Input: <SQL Data Node> that you have configured above
    • Output: <S3 Data Node> that you have configured above
    • Runs On: <Create a new Resource>. This will create a new resource component in the workflow.
  8. Go to the newly created resource component and configure it as follows:
    • Type: EC2 resource
      • When you change it to EC2 resource, you should see Resource role and Role populated to default values
  9. Save the Pipeline and you should see no errors. If there are any they will be displayed on the bottom of the screen. Resolve them before proceeding ahead. Your final pipeline should look similar to the below screenshot.

Final PipelineActivate the Data Pipeline

Once the pipeline is saved without any errors, you can activate the pipeline. Depending on the schedule that you have configured, the pipeline should run and create a CSV file which contains Accounts Table data read from DataDirect Salesforce JDBC drivers. It should be present in the path that you have configured in the S3DataNode.

We hope this tutorial helped you to import Salesforce data into Amazon S3 using Amazon Data Pipeline, which you can use to import it into various Amazon Compute services.  This demonstration is not limited to Salesforce. In fact, you can create Amazon Data Pipeline with any of the DataDirect JDBC drivers to connect and import data from over 50+ data sources which include your favorite SaaS, Relational, and Big data sources.

AWS Big data Java Database Connectivity Driver (software)

Published at DZone with permission of Saikrishna Teja Bobba, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Handling Automatic ID Generation in PostgreSQL With Node.js and Sequelize
  • Handling Virtual Threads
  • Artificial Intelligence in Drug Discovery
  • Efficiently Computing Permissions at Scale: Our Engineering Approach

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: