GithubHelp home page GithubHelp logo

brennoflavio / salesforce_plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from airflow-plugins/salesforce_plugin

0.0 1.0 0.0 20 KB

Move Data From Salesforce -> S3 -> Redshift

License: Apache License 2.0

Python 100.00%

salesforce_plugin's Introduction

Airflow Plugin - Salesforce

This plugin moves data from the Salesforce API to S3 based on the specified object

Hooks

Salesforce Hook

This hook handles the authentication and request to Salesforce. This extends the HttpHook and allows you to create a new connection to Salesforce, pull out data, and save it to a file.

S3Hook

Core Airflow S3Hook with the standard boto dependency.

Operators

SalesforceToS3Operator

This operator composes the logic for this plugin. It queries the Salesforce Bulk API using a SOQL string and then drops results in an s3 bucket. It accepts the following parameters:

:param sf_conn_id:      Salesforce Connection Id
:param soql:            Salesforce SOQL Query String used to query Bulk API
:param: object_type:    Salesforce Object Type (lead, contact, etc)
:param s3_conn_id:      S3 Connection Id
:param s3_bucket:       S3 Bucket where query results will be put
:param s3_key:          S3 Key that will be assigned to uploaded Salesforce
                        query results

SalesforceSchematoRedshiftOperator

Reconciles schema between salesforce API objects and Redshift while leveraging the Salesforce API function to describe source objects and push the object attributes and datatypes to Redshift tables. Ignores Compound Fields as they are already broken out into their components elsewhere. It accepts the following parameters:

   :param sf_conn_id:      The conn_id for your Salesforce Instance
   :param s3_conn_id:      The conn_id for your S3
   :param rs_conn_id:      The conn_id for your Redshift Instance
   :param sf_object:       The Salesforce object you wish you reconcile
                                the schema for.
                                Examples includes Lead, Contacts etc.
   :param rs_schema:       The schema where you want to put the renconciled
                                schema
   :param rs_table:        The table inside of the schema where you want to
                                put the renconciled schema
   :param s3_bucket:       The s3 bucket name that will be used to store the
                                JSONPath file to map source schema to redshift columns
   :param s3_key:          The s3 key that will be given to the JSONPath file

salesforce_plugin's People

Contributors

andscoop avatar benjamingregory avatar codeinvain avatar petedejoy avatar

Watchers

 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.