public class CdapServiceNowToTxt
extends java.lang.Object
CdapServiceNowToTxt pipeline is a batch pipeline which ingests data in JSON format
from CDAP ServiceNow, and outputs the resulting records to .txt file. ServiceNow parameters and
output txt file path are specified by the user as template parameters. Example Usage
# Gradle preparation To run this example yourbuild.gradlefile should contain the following task to execute the pipeline:task executeCdap (type:JavaExec) { mainClass = System.getProperty("mainClass") classpath = sourceSets.main.runtimeClasspath systemProperties System.getProperties() args System.getProperty("exec.args", "").split() }This task allows to run the pipeline via the following command:gradle clean executeCdap -DmainClass=org.apache.beam.examples.complete.cdap.servicenow.CdapServiceNowToTxt \ -Dexec.args="--<argument>=<value> --<argument>=<value>"# Running the pipeline To execute this pipeline, specify the parameters in the following format:--clientId=your-client-id \ --clientSecret=your-client-secret \ --user=your-user \ --password=your-password \ --restApiEndpoint=your-endpoint \ --queryMode=Table \ --tableName=your-table \ --valueType=Actual \ --referenceName=your-reference-name \ --outputTxtFilePathPrefix=your-path-to-output-folder-with-filename-prefixBy default this will run the pipeline locally with the DirectRunner. To change the runner, specify:--runner=YOUR_SELECTED_RUNNER
| Constructor and Description |
|---|
CdapServiceNowToTxt() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Main entry point for pipeline execution.
|
static org.apache.beam.sdk.PipelineResult |
run(org.apache.beam.sdk.Pipeline pipeline,
CdapServiceNowOptions options)
Runs a pipeline which reads records from CDAP ServiceNow and writes it to .txt file.
|
public static void main(java.lang.String[] args)
args - Command line arguments to the pipeline.public static org.apache.beam.sdk.PipelineResult run(org.apache.beam.sdk.Pipeline pipeline,
CdapServiceNowOptions options)
options - arguments to the pipeline