Skip to main content

Striim Platform 5.0 documentation

Create a HubSpot Reader application

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

Create a HubSpot Reader application using the wizard

This procedure uses the results of the earlier procedures to configure the HubSpot Reader in an instance of Striim.

  1. Log in to a Striim instance.

  2. Click Create an App from the Apps menu.

  3. Select HubSpot as the source.

  4. Specify your target and click Get Started.

    The Hubspot 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.

  7. Select Authenticate using OAuth Token or Authenticate using Private App Token, as suited to your use case.

    hubspot-wiz-configure-source-new.png
  8. (To authenticate with OAuth) Enter your Client ID, Client Secret and Refresh Token.

  9. (To authenticate with OAuth) Click Next.

    The wizard validates the authentication information and displays the results.

  10. To authenticate with a private app token, type the value of the private app token in the Private App Token field and click Next.

    The wizard validates the authentication information and displays the results.

  11. Click Next.

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

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

  13. Configure your target.

  14. Click Next.

    The wizard displays summary information.

  15. Click Save & Run.

    The application is saved and begins running.

Create a HubSpot Reader application using TQL

Sample TQL for a HubSpot Reader application:

CREATE FLOW hubspot_SourceFlow;

CREATE OR REPLACE SOURCE hubspot_Source USING Global.HubSpotReader ( 
  StartPosition: '%=0', 
  ThreadPoolCount: '0', 
  Tables: 'Companies', 
  FetchSize: '100', 
  PollingInterval: '120s', 
  AuthMode: 'PrivateAppToken', 
  PrivateAppToken: 'example', 
  ClientId: '', 
  PrivateAppToken_encrypted: 'true', 
  IncrementalLoadMarker: 'UpdatedAt', 
  adapterName: 'HubSpotReader', 
  MigrateSchema: true, 
  Mode: 'Automated' ) 
OUTPUT TO hubspot_OutputStream;

END FLOW hubspot_SourceFlow;

CREATE OR REPLACE TARGET Snowflake_hubspot_Target USING Global.SnowflakeWriter ( 
  streamingUpload: 'false', 
  password_encrypted: 'true', 
  tables: '%,TEST.%', 
  appendOnly: 'true', 
  CDDLAction: 'Process', 
  azureContainerName: 'striim-snowflake-container', 
  StreamingConfiguration: 'MaxParallelRequests=5, MaxRequestSizeInMB=5, MaxRecordsPerRequest=10000', 
  authenticationType: 'Password', 
  optimizedMerge: 'false', 
  connectionUrl: 'jdbc:snowflake://striim_partner.east-us-2.azure.snowflakecomputing.com/?db=DEMO_DB', 
  columnDelimiter: '|', 
  s3Region: 'us-west-1', 
  username: 'user', 
  password: 'example', 
  uploadPolicy: 'eventcount:1000,interval:60s', 
  externalStageType: 'Local', 
  adapterName: 'SnowflakeWriter', 
  fileFormatOptions: 'null_if = \"\"', 
  s3BucketName: 'striim-snowflake-bucket' ) 
INPUT FROM hubspot_OutputStream;

END APPLICATION hubspot;