2022

Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


  1. Setup your Database for Integration. For this Tutorial I will be using MySQL Database Named "salesforce".
  2. Create tables "dbAccount" and "dbAccountNew" in Database with following script.  
Database Scripts
create table `salesforce`.`dbAccount`
 ( `AccountID` varchar(100) NOT NULL ,
 `AccountName` text NOT NULL ,
 `BillingStreet` text ,
 `BillingPostalCode` numeric(20) ,
 `AnnualRevenue` decimal(30,2) ,
 `CreatedDate` date ,
 `LastModifiedDate` datetime ,
 `NumberOfOfficeLocations` int ,
 PRIMARY KEY (`AccountID`)
 );

 create table `salesforce`.`dbaccountnew`
 (`AccountID` varchar (100) NOT NULL,
 `AccountName` varchar (300) NOT NULL,
 `BillingAddress` varchar (500),
 `AnnualRevenue` Decimal (50,2),
 `CreatedDate` datetime ,
 `LastModifiedDate` datetime ,
 `NumberOfOfficeLocations` int,
 PRIMARY KEY (`AccountID`)
 );
  1. Enter some test data in "dbAccount" table. Go To www.mydbsync.com.
  2. Select Customer Login. Enter your User Name and Password and click Sign in. Click on Launch to access DBSync Project page.
  3. Click on Projects in the left panel, click on Create New Project, enter Project Name DatabasetoDatabase & Save.
  4. Click on the project DatabasetoDatabase, click on Create New Process, enter Process Name Database2Database & Save.
  5. Click on Connectors in the left panel, click on Create New Connector, enter Connector Name Database1, select connector type* Database Connector* & Save.
  6. Click on the new Connector Database, enter your database details in Connector settings.
  7. Username, Password, Type, Host, Port fields should be updated with your database details, Database URL will get updated automatically.
  8. Click on Save and then Validate Connection to confirm connection. 
  9. Click on the process Database2Database, click on Create New Workflow, enter Workflow Name Execute & Save. 
  10. Click on the workflow Execute, you will see two sections Trigger & Rules.
  11. In Trigger section, you will see Query Builder, Advanced Query Builder & Properties.In Rules section, you will see a button to add new rule.
  12. In this example Advanced Query Builder is used to query. Click on Avanced Query Builder, select the datasource as Database.
  13. Click on Switch to Advanced View, in Query Builder section type the below query & click on Save and Close.
  •  select AccountID, AccountName, BillingStreet, BillingPostalCode, AnnualRevenue, CreatedDate from dbaccount
    
  1. Now go to Rules section, click on Add New Rule, select target connector, operation, target object & map as per the requirement.
  2. In this example, Target Connector is database, Operation is Insert, target object is dbaccountnew.
  3. Operation can be insert, update or upsert. Insert: If this option is selected then only new records from the source table will be pushed to target data source.
  4. Update: If this option is selected, it will update the target data source records with updated values in the source.
  5. Upsert: Upsert is combination of insert and update. If this option is selected then new data will be inserted in target data and old data will be updated with changed data.
  6. Click on Map, you will see list of column names of target object dbaccountnew. You can map these columns to the required columns of source object dbaccount. You just have to drag the required column name from Schema & drop it infront of the required column name of source. In Schema you will see the list of columns of source object.
  7. Validate Row remains "true". AccountID, AccountName and AnnualRevenue from target is mapped with the value of source columns AccountID, AccountName and AnnualRevenue respectively.
  8. Click on Save and close.
  9. Now, go to process Database2Database, ensure that status of workflow Execute is on, click on Run Now to run the integration.
  10. You will see the logs in the bottom in console section.
  11. If you go to target object dbaccountnew, you will see list of records inserted from source object dbaccount.
  • No labels