Skip to main content

Striim Platform 5.0 documentation

Create a Salesforce Reader application

To start using the Salesforce Reader in Striim apps, you can create an application in the following ways:

  • Striim Wizard in the Flow Designer

  • Striim Flow Designer

  • Striim TQL

Creating a Salesforce Reader application using the wizard
  1. Log in to a Striim instance.

  2. Click Create an App from the Apps menu.

  3. Select Salesforce as the source.

    salesforce-reader-wiz1.png
  4. Specify your target and click Get Started.

    The Salesforce Reader wizard starts.

  5. In Name, enter a name for the app, then select a namespace from the Namespace drop-down.

    The default namespace is the application name.

  6. Click Save.

    The wizard advances to the next step. You can specify connecting using a connection profile, or manually enter the connection properties in the wizard (described in steps 7-10).

  7. For the API Endpoint, specify the URL used to access Salesforce services. For example, https://ap2.salesforce.com

  8. Select Authenticate using Auth Token or Authenticate using User Credentials, as suited to your use case.

    salesforce-reader-wiz2.png
  9. (To authenticate with OAuth authentication token) Specify an auth token that you obtain after creating a connected app in Salesforce.

  10. (To authenticate with OAuth username and password) Specify the credentials for a Salesforce user account, with permissions to access objects:

    • Username

    • Password

    • Consumer Key,

    • Consumer Secret

    • Security Token.

  11. Select Create schemas on the target before moving the data if you want the app to create the source schema for all selected tables at the target.

  12. Click Next.

    The wizard validates the authentication information and displays the results.

  13. Click Next.

    The wizard displays a list of objects available on the Salesforce instance.

  14. Select the objects to ingest and click Next. Select only objects for which the previously specified token has permissions or the application will fail with an "Insufficient permission to access the metadata" error.

  15. Configure your target.

  16. Click Next.

    The wizard displays summary information.

  17. Click Save & Run.

    The application is saved and begins running.

Creating a Salesforce Reader application using the Flow Designer

See Creating and modifying apps using the Flow Designer.

Creating a Salesforce Reader application using TQL

The following TQL will read from the Business__c sObject and create an appropriate typed stream:

CREATE SOURCE SFPoller USING SalesforceReader (
  sObjects: 'Business__c',
  authToken: '********',
  apiEndPoint: '<your organization's endpoint UEL>',
  mode: 'InitialLoad',
  autoAuthTokenRenewal: 'false'
)
OUTPUT TO DataStream;

CREATE TYPE OpStream_Type (
  Id String KEY,
  Name String,
  POSDataCode__c String,
  Currency__c String
);
CREATE STREAM OpStream OF OpStream_Type;

CREATE CQ CQ1
  INSERT INTO OpStream
  SELECT data[0],data[1],data[2],data[3]
  FROM DataStream;