# tPubSubOutput properties for Apache Spark Structured Streaming

[Preview](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Introduction/feature-preview-program-overview.htm)

These properties are used to configure tPubSubOutput running in the Spark Structured Streaming Job framework.

The Spark Structured Streaming tPubSubOutput component belongs to the Messaging family.

The streaming version of this component is available in Talend Real-Time Big Data Platform and in Talend Data Fabric.

## Basic settings

| Properties | Description |
| --- | --- |
| Schema and Edit schema | A schema is a row description. It defines the fields (columns) processed by the<br>component. When you create a Spark Job, avoid the reserved word<br>line when naming fields.<br><br><ul> <li><p><span>Built-In</span>: create and store the schema locally for                        this component only.</p></li> <li><p><span>Repository</span>: reuse a schema created and stored in                        the Repository across projects and Job designs.</p></li> </ul><br><br>Click Edit schema to modify the schema. If you modify a<br>Repository schema, the available options include:<br><br><ul> <li><p><span>View schema</span>: view the schema without modifying it.</p></li> <li><p><span>Change to built-in property</span>: change the schema to                        <span>Built-in</span> for local changes.</p></li> <li><p><span>Update repository connection</span>: modify the Repository                        schema and choose whether to propagate the changes to other Jobs.</p></li> </ul> |
| Google Cloud configuration | Enter the name of the subscription to use or create when the selected<br>Topic operation manages a subscription. Pub/Sub publishes<br>messages to the topic; the subscription receives messages from that topic. |
| Pub/Sub topic | Enter the name of the Pub/Sub topic to which you want to publish<br>messages. |
| Pub/Sub subscription | Enter the name of the Pub/Sub subscription associated with the topic to<br>which you want to publish messages. |
| Topic operation | Select how to handle the topic and its subscription:<br><br><ul> <li><span>Use existing topic and subscription</span>: publishes                        messages to an existing topic and uses the existing subscription for that                        topic.</li> <li><span>Create topic and subscription if they don't exist</span>:                        creates the topic and subscription if they do not already exist.</li> </ul> |
| Set trigger | Select this check box to configure how often the streaming query<br>processes data. When selected, choose one of the following trigger types:<br><br><ul> <li><span>Available now</span>: processes all available data in a                        single batch, then stops the query.</li> <li><span>Fixed interval</span>: runs the query at a fixed time                        interval. Enter the interval duration in the field that appears, for example                        <kbd>10 seconds</kbd>.</li> </ul> |
| Output mode | Select the output mode from the drop-down list:<br><br><ul> <li><span>Append</span>: adds new rows without modifying existing                        rows.</li> <li><span>Update</span>: writes only the rows that were updated                        since the last trigger.</li> </ul> |
| Use ordering key | Select this check box to enable Pub/Sub message ordering. When enabled, the<br>partitionKey column from the input data is used as the message<br>ordering key. |
| Checkpoint location | Enter the path to the directory where Spark stores checkpoint data for the<br>streaming query. |

## Usage

| Usage guidance | Description |
| --- | --- |
| Usage rule | This component is used as an end component and requires an input link.<br><br>This component publishes serialized messages to a Google Cloud Pub/Sub<br>topic.<br><br>This component, along with the Spark Structured Streaming component Palette it belongs to,<br>appears only when you are creating a Spark Structured Streaming Job. |
| Spark Connection | You need to use the Structured Streaming Configuration<br>tab in the Run view to define the connection to a Spark cluster for<br>the whole Job.<br><br>This connection is effective on a per-Job basis. |