- This line was added.
- This line was removed.
- Formatting was changed.
Creating a Salesforce Query Operation
This page described how to create a Salesforce Query operation using the Jitterbit Connect Salesforce Query Wizard.
The wizard follows these steps:
|Table of Contents|
Start the Wizard
- To start the wizard, click the Salesforce Query button in the Jitterbit Connect Wizard menu, which opens the wizard.
Select the Salesforce Object
Build Your Salesforce Query
- On this screen, you begin building the query. You can create either a Simple or Relationship Query:
- For a simple query (all references in a single table), use the Simple Query pane on the left and check the Items to be included in your query. As you do so, they will be added to the Query string in the right pane. Using the Filter text entry box, the Select All, and Remove All buttons can help you quickly specify each field.
- For a relationship query (which includes references to other tables, either parents or children of the current object), click the Relationship Query tab on the left. Lists for Parent and Child relationships appear at the bottom of the left pane:
- Select an object from the Child relationships list and double-click it to view its Fields in the object. You can add them, as shown in this example, where fields from Contacts have been added (LastName, Department, Email, etc.):
- Check a field in the child table to add them to your query string. Again, you can use the Filter text entry box to quickly find desired items.
- To move back to an earlier table (such as Account, as shown in the above example), click on the table name in the breadcrumbs of the wizard.
- You can add conditions to the query using the Field, Operator, and Value controls under Conditions; for example, AccountSource = 'SF'. When you have completed the entries in these controls, click Add Condition and the condition will be added to the query string:
- You can click the Test Query button on the lower right to validate the query.
- After completing the query, click Next to move to the Target screen.
Define the Target
Select Where You Want To Put Your Data
The target is the destination of the data retrieved from the Salesforce Query. Select one of:
- An existing target type from the dropdown menu, such as Local File, FTP Site, File Share, Temporary Storage, Database, HTTP, or LDAP
- Click the Select or Create New button to either select an existing target or to create a new Target of the currently selected type.
For details on the different targets, see the documentation on Targets.
Local File Targets
|NOTE: If you are creating a local file target for the first time, you must first enable local file locations in each Jitterbit Private Agent configuration. (A Local File can be used only with Private Agents.)|
In the case of a Location File Target, you can directly give a filename of where you want the data stored.
- Specifying a Local File as a target and giving its location:
- Clicking Next will take you to the Select A File Format screen, where you specify either to create a file format based on the fields in the query (optionally with the field names as the first line of the file), to select an existing file format, or to create a new file format:
- Specifying a Local File as a target, and selecting the using of an existing Local File target:
- When you have completed your entries for the target, click Next to move to the next screen.
Select A File Format
- Once you have specified the target, you will need to specify the Target File Format. If you have selected a database target instead of a file target, see Using a Database as a Target.
- Select a Radio button to either create a file format from the fields in your query, select an existing File Format, or create a new file format.
- If you use either an existing File Format or create a new one, you will be prompted at the end of the wizard to Select or Create New in the dropdown.
- Click Next.
Schedule and Options
- When finished, click Next to move to the Summary screen.
On the Summary, you can edit the Name given to the wizard and specify whether to use the wizard's Automapper to map the data:
- Click Finish to complete the wizard.
- If you need to create or approve a transformation mapping, you will be taken to that screen.
- Otherwise, the design items for your operation will be created and become visible in the Project Items panel on the left side of the screen and you will be taken to the operation's Salesforce Query page.
If you chose Select an existing File Format (or created a new one) in the Target screen of the wizard, the transformation mapping appears in your work area:
Complete the mapping as required and click Finish to complete the wizard and the creation of the design items.
Completed Salesforce Query
- Once completed, you will be taken to the summary screen for the new Salesforce Query.
- You can return to this summary page by finding its operation name under Jitterbit Connect in the Project Items panel.
- You can modify any of the design items in your project such as Salesforce Login, Salesforce Query, Mappings, Write data to, Operation, and Run on Schedule by clicking their adjacent Edit button.
- The Run Query, Test Query, and Delete button functions are described below in Deploy the Project and Run the Operation.
- Advanced Options include operation options such as chunking and field truncation. They are covered below in Advanced Options.
These advanced options are available for a Salesforce Query:
- Write as UTF-8: Select to write the target file as UTF-8 character encoding.
- Target header: Select from one of No Header, Salesforce Field Names, or File Format Field Names.
- Include deleted rows: Select to included deleted rows in the output of the query.
- Batch size: By default, this is set to 2000 records.
- Retry Policy: Displays a dialog to set the retry policies. See the Salesforce Advanced page.
- Chunking: By default, chunking is not enabled for Salesforce Queries. It can be enabled in the operations options, as described on the Salesforce Advanced page.
Additional operation options for chunking and writing success and failure records are described on the Salesforce Advanced page.
Deploy the Project
Deploying a project before running is not required as it will automatically be deployed if needed.
To deploy the project, either:
The project deploy process begins sending the project to Jitterbit Harmony, and a progress message appears.
The operation is now complete and deployed.
This image shows the buttons available on the Salesforce Wizard summary pages. The labels (such as Run Query or Run Insert) will vary depending on the wizard that you are using. The Result History button is not available on the Salesforce Queries summary page and the Test… button is not available on the Salesforce Bulk Processes summary page.
See Operations for additional information on creating, deploying, and running operations.
Viewing success and failure files is available if you are running operations on a Private Agent. The buttons View Success file and View failure file are available after you press the Run... button or the Result History button as described above and then select one of the results. This is an example of the Result History popup window, showing the buttons and a selected result: