To run this example your build.gradle file should contain the following task to execute the pipeline:
task executeCdapHubspot (type:JavaExec) {
mainClass = System.getProperty("mainClass")
classpath = sourceSets.main.runtimeClasspath
systemProperties System.getProperties()
args System.getProperty("exec.args", "").split()
}
Gradle ‘executeCdapHubspot’ task allows to run the pipeline via the following command:
gradle clean executeCdapHubspot -DmainClass=org.apache.beam.examples.complete.cdap.hubspot.CdapHubspotToTxt \ -Dexec.args="--<argument>=<value> --<argument>=<value>"
CdapHubspotToTxt pipeline parameters:
authToken - Hubspot Private Application Access tokenobjectType - Hubspot objects to pull supported by CDAP Hubspot Batch SourceoutputTxtFilePathPrefix - path to output folder with filename prefix. It will write a set of .txt files with names like {prefix}-###.Please see CDAP Hubspot Batch Source for more information.
To execute this pipeline, specify the parameters in the following format:
--authToken=your-private-app-access-token \ --referenceName=your-reference-name \ --objectType=Contacts \ --outputTxtFilePathPrefix=your-path-to-output-folder-with-filename-prefix
Gradle ‘executeCdapHubspot’ task allows to run the pipeline via the following command:
gradle clean executeCdapHubspot -DmainClass=org.apache.beam.examples.complete.cdap.hubspot.CdapHubspotStreamingToTxt \ -Dexec.args="--<argument>=<value> --<argument>=<value>"
CdapHubspotStreamingToTxt pipeline parameters:
authToken - Hubspot Private Application Access tokenobjectType - Hubspot objects to pull supported by CDAP Hubspot Streaming SourceoutputTxtFilePathPrefix - path to output folder with filename prefix. It will write a set of .txt files with names like {prefix}-###.pullFrequencySec - delay in seconds between polling for new records updates. (Optional)startOffset - inclusive start offset from which the reading should be started. (Optional)Please see CDAP Hubspot Streaming Source for more information.
To execute this pipeline, specify the parameters in the following format:
--authToken=your-private-app-access-token \ --referenceName=your-reference-name \ --objectType=Contacts \ --outputTxtFilePathPrefix=your-path-to-output-folder-with-filename-prefix \ --pullFrequencySec=100 \ --startOffset=1000
Gradle ‘executeCdapHubspot’ task allows to run the pipeline via the following command:
gradle clean executeCdapHubspot -DmainClass=org.apache.beam.examples.complete.cdap.hubspot.TxtToCdapHubspot \ -Dexec.args="--<argument>=<value> --<argument>=<value>"
TxtToCdapHubspot pipeline parameters:
authToken - Hubspot Private Application Access tokenobjectType - Hubspot objects to pull supported by Hubspot Batch SinkinputTxtFilePath - input .txt file pathlocksDirPath - locks directory path where locks will be stored. This parameter is needed for Hadoop External Synchronization (mechanism for acquiring locks related to the write job).Please see CDAP Hubspot Batch Sink for more information.
To execute this pipeline, specify the parameters in the following format:
--authToken=your-private-app-access-token \ --referenceName=your-reference-name \ --objectType=your-object-type \ --inputTxtFilePath=your-path-to-input-txt-file \ --locksDirPath=your-path-to-locks-dir