Publish Snap

In this article

Overview

This Snap publishes messages from the input into the Google pubsub for the given topic name. This snap is supported for both publishing a single message or bulk messages based on the batch size. The topic name can be suggested by using suggestions or can be given directly in order to create the topic by the snap if not exists. Once published the snap will return the server assigned messageld's.

Snap Type

Publish Snap is a READ type Snap.

Prerequisites

  • None.

Limitations and Known Issues

None.

Account

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Google Pub Sub Service Account for information on setting up this type of account

Snap Views

Type

Description

Type

Description

Input 

This Snap has at most one document input view. Each document contains data in the form of json.

Output

This Snap has at most one document output view. Each document contains corresponding response in the form of json.

Error

This Snap has at most one document error view and produces zero or more documents in the view. Each document contains the corresponding error record if snap is not able to process data to google pubsub.

Snap Settings

Field Name

Description

Field Name

Description

Label

required

The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Topic name

required

The topic to publish to. The property is suggestable and will retrieve available topic names basing on the project id. The snap will create the topic if the topic name not found in the pubsub.
Default value: None

Message

Conditionally

required

The text to publish to the google pub sub system for the selected topic name. 

Default value: None

Message Attributes

Conditionally

required

This is a table of keys and values for the messages to be published.

Default value: None

Batch size

Conditionally required

The number of documents the Snap will batch before publishing. The default is 1.

Default value: 1

Snap Execution

optional

Specifies the execution type:

  • Validate & Execute: Performs limited execution of the Snap (up to 2000 records based on Preview doc count, default is  50 records) during Pipeline validation; performs full execution of the Snap (unlimited records) during Pipeline execution.

  • Execute only: Performs full execution of the Snap during Pipeline execution; does not execute the Snap during Pipeline validation.

  • Disabled: Disables the Snap and, by extension, its downstream Snaps.

Default value: Execute only

Snap Pack History