# tKinesisInput 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)

Use these properties to configure tKinesisInput running in the Spark Structured Streaming Job framework.

The Spark Structured Streaming tKinesisInput 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 number of fields<br>(columns) to be processed and passed on to the next component. When you create a Spark<br>Job, avoid the reserved word line when naming the<br>fields.<br><br><ul> <li> <p> <span>Built-In</span>: You create and store the schema locally for this component                only.</p> </li> <li> <p> <span>Repository</span>: You have already created the schema and stored it in the                Repository. You can reuse it in various projects and Job designs.</p> </li> </ul><br><br>Click Edit schema to make changes to<br>the schema. If you make changes, the schema automatically becomes built-in.<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul> |
| Configuration component | Select the tKinesisConfiguration component to use for<br>the Kinesis connection settings and default options. |
| Record format | Select how to read the Kinesis payload:<br><br><ul> <li><span>String</span>: reads the payload as plain text.</li> <li><span>Avro</span>: reads and deserializes the payload as Avro data.</li> </ul> |
| Include metadata | Select this check box to include Kinesis metadata columns in the output<br>schema, such as stream name, partition key, sequence number, and arrival<br>timestamp. |
| Stream name | Enter the name of the Kinesis stream you want tKinesisInput to pull data from. |
| Starting Position | Select where to start reading when no previous checkpoint is available:<br><br><ul> <li><span>Latest</span>: starts after the most recent records and                        reads only new incoming data.</li> <li><span>Earliest</span>: starts from the oldest available records                        in the stream.</li> <li><span>At Timestamp</span>: starts from records at or after the                        specified timestamp. Enter the timestamp value in the field that appears.</li> </ul> |
| Enable watermarking | Select this check box to activate watermarking and select the time mode to<br>be used:<br><br><ul> <li><span>Event time</span>: Select to use a timestamp column                     representing when each event occurred, then select the column in the                        <span>Watermark column (timestamp)</span> drop-down list.</li> <li><span>Processing time</span>: Select to use the time when Spark                     reads each record.</li> </ul><br><br>In the Watermark delay field, specify how long Spark<br>waits for late data before finalizing each window. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Advanced options | Add Kinesis reader options as key-value pairs in the<br>Option and Value table.<br>Use these options to override the default options inherited from the selected<br>tKinesisConfiguration component for this<br>tKinesisInput component only.<br><br>For example, set kinesis.maxFetchRecordsPerShard to control<br>how many records are fetched from each shard per trigger. |

## Usage

| Usage guidance | Description |
| --- | --- |
| Usage rule | This component is used as a start component and requires an output link.<br><br>At runtime, this component keeps listening to the stream and reads new messages once they<br>are buffered in this stream.<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. |