Klevr Product Documentation logo

Outbound Blob Stage

The Outbound Blob stage allows text-based messages to be exported to an Azure Storage blob service.

Stage Overview

The Outbound Blob stage allows text-based messages (e.g. JSON, XML, or plain text [including CSV files]) to be exported from the Integration Hub service to an Azure Storage blob service.

Stage Definition File Location

All Outbound Blob stages are defined by creating an appropriately formatted JSON definition file in the following location:

interfaces
{businessUnitCode}
{domainCode}
{integrationName}
out
blob
{STAGE_NAME}.json

Stage JSON Definition File Format

The JSON definition file for an Outbound Blob stage is as follows:

{
  "name": "stage-name",
  "displayName": "Brief Stage Title",
  "description": "Brief description of the stage.",
  "enabled": "$env:STATUS_<INTEGRATION_NAME>",
  "source": "source-event",
  "concurrency": 10,
  "schemaFilename": "schemas/path/to/schema/schema-name.liquid",
  "expectedFiletype": "txt|json|xml|csv",
  "hasHeader": false,
  "delimiter": "|",
  "lineEnding": "windows|unix",
  "externalStorageAccount": {
    "accountName": "$env:STORAGE_ACCOUNT_NAME",
    "accessKey": "$env:STORAGE_ACCOUNT_ACCESS_KEY",
    "blobPath": "/path/to/blob/"
  },
  "emitEvent": "previous-stage-name-1",
  "leaseLockName": "lock-name",
  "preLogTransformSchemaFileName": "schemas/path/to/schema/schema-name.liquid",
  "preLogTransformSchemaType": "liquid|javascript",
  "preLogTransformFormat": "json|xml|csv"
}
PropertySub-PropertyDescription
nameThe name of the stage.
displayNameOptional (but highly recommended). A short (3 or 4 word) "display name" for the stage, used as a "title" of the stage in the Integration Hub Portal service's self-documentation capability.
descriptionOptional (but highly recommended). A brief (10 to 15 word) description of the stage, used as a brief description of the stage's purpose in the Integration Hub Portal service's self-documentation capability. For a more detailed explanation (when needed), use the stage markdown feature.
enabledOptional boolean flag (true or false). Default is true.

Generally set via a DevOps variable. Controls if the stage is deployed enabled or not.
sourceThe source event that the stage subscribes to. See Pub/Sub Model.

Alternatively, sources may be supplied, and an array of one or more source events can be subscribed to.
concurrencyOptional number of concurrent runs permitted for the stage. Default is 10.
schemaFilenameA filename that defines a Liquid transformation schema. See the Transform Liquid Stage for more details on Liquid transformation schema file location and format requirements.

The Liquid transformation schema is used to generate the filename that will be created on the remote Azure Storage blob service. This approach allows the filename to contain both static content (hard-coded in the Liquid schema) and/or dynamic content based on the date/time of filename generation and/or content in the file being uploaded to Azure Storage blob.
expectedFiletypeSpecifies the expected outbound file type being uploaded to the remote Azure Storage blob service. One of txt, json, xml, or csv.

When the Liquid transform specified in the schemaFilename field needs to access the file contents to generate the filename, this field is required, to ensure that the file contents can be parsed successfully and made available to the Liquid transform.

If the Liquid transform does not need to access the file contents to generate the filename, then this field does not need to be set.
hasHeaderRequired only when the expectedFiletype value is txt or csv.

Either true or false. In the event that the file content being uploaded is either a CSV file, or delimited text content, and has a header row, this must be true to allow the Liquid transformation schema defined in schemaFilename to be able to parse the file contents when generating the filename to be used for uploading the file.
delimiterRequired only when the expectedFiletype value is txt or csv.

In the event that the file content being uploaded is either a CSV file, or delimited text content, this must be supplied to define the file's delimiter character, to allow the Liquid transformation schema defined in schemaFilename to be able to parse the file contents when generating the filename to be used for uploading the file.
lineEndingRequired only when the expectedFiletype value is txt or csv.

Set to either windows or unix. Defines if the Liquid transformation set by the schemaFilename field (to create the filename of the file to be created on the remote service) should expect the text or CSV file being transformed to have Windows (\r\n) or Unix (\n) line endings.
externalStorageAccount
accountNameThe hostname of the Azure Storage service to send the payload too.
accessKeyAn access key for accessing the Azure Storage service.
blobPathPath to the blob container within the storage account that the payload will be uploaded into.
emitEventWhen the upload to the Azure Storage service is successful, the stage will normally terminate. However, under certain circumstances, it may be desirable to continue workflow processing.

The optional emitEvent flag allows the payload of a previously run stage to be output as a message from this stage. The stage must have previously been executed in the run history of the overall Integration Hub integration, with the stage's exported payload details being present in the Cloud Event Attributes section.
leaseLockNameOptional. See Lease Locking.

Pre-Logging Transformation

This stage supports the optional pre-logging transformation feature using the following fields:

  • preLogTransformSchemaFileName
  • preLogTransformSchemaType
  • preLogTransformFormat

See the Pre-Logging Transformation for details.

Last updated on