Class StitchRequestBody.Builder
- java.lang.Object
-
- org.apache.camel.component.stitch.client.models.StitchRequestBody.Builder
-
- Enclosing class:
- StitchRequestBody
public static final class StitchRequestBody.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StitchRequestBody.Builder
addMessage(StitchMessage messages)
StitchRequestBody.Builder
addMessages(Collection<StitchMessage> messages)
An array of Message objects, each representing a record to be upserted into the table.StitchRequestBody
build()
StitchRequestBody.Builder
withKeyNames(String... keyNames)
An array of strings representing the Primary Key fields in the source table.StitchRequestBody.Builder
withKeyNames(Collection<String> keyNames)
StitchRequestBody.Builder
withSchema(StitchSchema schema)
A Schema object containing the JSON schema describing the record(s) in the Message object’s data property.StitchRequestBody.Builder
withTableName(String tableName)
The name of the destination table the data is being pushed to.
-
-
-
Method Detail
-
withTableName
public StitchRequestBody.Builder withTableName(String tableName)
The name of the destination table the data is being pushed to. Table names must be unique in each destination schema, or loading issues will occur. REQUIRED- Parameters:
tableName
-
-
withSchema
public StitchRequestBody.Builder withSchema(StitchSchema schema)
A Schema object containing the JSON schema describing the record(s) in the Message object’s data property. Records must conform to this schema or an error will be returned when the request is sent. REQUIRED- Parameters:
schema
-
-
addMessages
public StitchRequestBody.Builder addMessages(Collection<StitchMessage> messages)
An array of Message objects, each representing a record to be upserted into the table. REQUIRED- Parameters:
messages
-
-
addMessage
public StitchRequestBody.Builder addMessage(StitchMessage messages)
-
withKeyNames
public StitchRequestBody.Builder withKeyNames(String... keyNames)
An array of strings representing the Primary Key fields in the source table. Stitch use these Primary Keys to de-dupe data during loading. If not provided, the table will be loaded in an append-only manner. Note: If included, a value must be provided. However, it may be an empty list to indicate that the source table doesn’t have a Primary Key. If fields are provided, they must adhere to the following: 1. Each field in the list must be the name of a top-level property defined in the Schema object. Primary Key fields cannot be contained in an object or an array. 2. Fields in the list may not be null in the source. 3. If a field is a string, its value must be less than 256 characters. OPTIONAL- Parameters:
keyNames
-
-
withKeyNames
public StitchRequestBody.Builder withKeyNames(Collection<String> keyNames)
-
build
public StitchRequestBody build()
-
-