JBoss.orgCommunity Documentation

Chapter 1. Importing Metadata

1.1. Overview
1.2. Running the Importer

Salesforce metadata is structured relationally. Salesforce Objects and the fields on those objects are analogous to relational tables and columns. Because of this similarity, the modeling of Salesforce metadata and interaction with the data through standard SQL is easily accomplished within Teiid. However, the properties of the objects in a Salesforce application are not an exact match to the properties that are available on the standard Teiid Relational Table and Column. In order to bridge the gap between these metadata properties, integration with Salesforce requires extensions to the standard Teiid Relational Base Table and Column. The extensions required are created within the Model Project by the Salesforce Importer and appropriate values are set into these properties by the importer.

The Salesforce Importer will model the unique metadata that is exposed to it by the Salesforce API as determined by the credentials used in the importer. Users with different profiles within the same Salesforce instance may be authorized to see different subsets of the applications metadata and data. Keep this in mind when binding a connector to the model. You must ensure that the credentials used in the binding have access to all of the data that is exposed in the model, or exceptions will occur. The importer also understands customizations that have been made to applications and will model them as well.

Select File->Import to display the Wizard Selection Dialog.

Select Salesforce as Relational Source Model from in the list displayed and click Next. The Salesforce Importer is displayed.

Enter a valid Username and Password into the text fields and click Validate Credentials. If you are connecting to a sandbox instance of a Salesforce application, enable the Override Connection URL textbox and enter the URL to the sandbox instance. The default value will probably be correct in most instances. After the Username and Password are supplied, the Validate Credentials button will be come active and you click this button to validate the connection parameters and enable the Next Button. After clicking Next the Salesforce Objects page is displayed.

In the left column the Salesforce objects in the system are listed and can be selected for modeling. Each object selected will be modeled as a Table. In the Column Details table metadata from the fields on the currently selected object are displayed, and these will be modeled as columns on the tables.

When you have selected all of the Salesforce objects that you wish to model, click Next. The Target Model Selection page will be displayed.

Select the model name, location, and options.

Click Finish.

After the Salesforce Importer has finished, you will find two new models created in your model project. One will have the name you supplied in the last page of the importer, and the other will be named SalesforceExtensions.xmi.

The SalesforceExtensions.xmi model contains the extensions to the standard relational model. These extensions enable the model to provided enhanced data to the Salesforce Connector at query time. For example, some objects in Salesforce do not support the query operation. In order to enforce this limitation the extension model defined a Supports Query property, and the Salesforce Importer enters the correct value into this property for each Table. The Salesforce Connector validates that each table included in a query operation has the value true for this property before executing a query and will throw and exception in the event that the table is not querable.

The other model created by the importer contains the model of the data in the Salesforce instance that you selected in the importer. This is the model you will execute your SQL statements against.