# tMap properties for Apache Spark Streaming

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

The Spark Streaming tMap component belongs to the Processing family.

This component is available in Talend Real Time Big Data Platform and Talend Data Fabric.

## Basic settings

| Map editor | It allows you to define the tMap<br>routing and transformation properties.<br><br>When you click the Property Settings<br>button at the top of the input area, a Property<br>Settings dialog box is displayed in which you can set the<br>following parameters:<br><br><ul> <li> <p>If you do not want to handle execution errors, select the                <span>Die on error </span>check box                (selected by default). It will kill the Job if there is an                error.</p> </li> <li> <p>To maximize the data transformation performance in a Job that                handles multiple lookup input flows with large amounts of data,                you can select the <span>Lookup in                    parallel</span> check box.</p> </li> <li> <p> <span>Temp data directory path</span>:                enter the path where you want to store the temporary data                generated for lookup loading. For more information on this                folder, see <em> <span>Talend Studio</span> User                    Guide</em>.</p> </li> <li> <p>Max buffer size (nb of rows): enter the size of physical                memory, in number of rows, you want to allocate to processed                data.</p> </li> </ul> |
| --- | --- |
| Mapping links display as | Auto: the default setting is curves<br>links<br><br><br>Curves: the mapping display as curves<br><br><br>Lines: the mapping displays as straight<br>lines. This last option allows to slightly enhance performance. |
| Preview | The preview is an instant shot of the Mapper data. It becomes<br>available when Mapper properties have been filled in with data. The<br>preview synchronization takes effect only after saving changes. |
| Use replicated join | Select this check box to perform a replicated join between the input<br>flows. By replicating each lookup table into memory, this type of join<br>doesn't require an additional shuffle-and-sort step, thus speeding up<br>the whole process.<br><br>You need to ensure that the entire lookup tables fit in memory. |

## Usage

| **Usage rule** | It usually works with a Lookup Input component such as tMongoDBLookupInput to construct and consume a lookup flow. In this situation,<br>you must use Reload at each row or Reload at each row (cache) to read data from the lookup flow. This approach ensures that no redundant records are stored in memory before being sent to tMap. For a use case in which tMap<br>is used with a Lookup Input component, see [Reading and writing data in MongoDB using a Spark Streaming Job](https://help.qlik.com/talend/en-US/components/7.3/mongodb/tmongodblookupinput-tmongodbconfiguration-ts3configuration-reading-and-writing-data-in-mongodb-using-spark-streaming-job-spark-stream-component-in-this). Note that Reload at each row or Reload at each row (cache) in a streaming Job is supported by the Lookup Input components<br>only. |
| --- | --- |
| Spark Connection | In the Spark<br>Configuration tab in the Run<br>view, define the connection to a given Spark cluster for the whole Job. In<br>addition, since the Job expects its dependent jar files for execution, you must<br>specify the directory in the file system to which these jar files are<br>transferred so that Spark can access these files:<br><br><ul> <li> <div> <span>Yarn mode</span> (Yarn client or Yarn cluster):<ul> <li> <p>When using Google Dataproc, specify a bucket in the                                            <span>Google Storage staging bucket</span>                                        field in the <span>Spark configuration</span>                                        tab.</p> </li> <li> <p>When using HDInsight, specify the blob to be used for Job                                        deployment in the <span>Windows Azure Storage                                            configuration</span> area in the <span>Spark                                            configuration</span> tab.</p> </li> <li>When using Altus, specify the S3 bucket or the Azure                                    Data Lake Storage for Job deployment in the <span>Spark                                        configuration</span> tab.</li> <li>When using Qubole, add a                                        <span>tS3Configuration</span> to your Job to write                                    your actual business data in the S3 system with Qubole. Without                                        <span>tS3Configuration</span>, this business data is                                    written in the Qubole HDFS system and destroyed once you shut                                    down your cluster.</li> <li> <p>When using on-premises distributions, use the configuration component                                        corresponding to the file system your cluster is using.                                        Typically, this system is HDFS and so use <a href="https://help.qlik.com/talend/r/en-US/7.3/components/hdfs/thdfsconfiguration">tHDFSConfiguration</a>.</p> </li> </ul> </div> </li> <li> <p> <span>Standalone mode</span>: use the                            configuration component corresponding to the file system your cluster is                            using, such as <a href="https://help.qlik.com/talend/r/en-US/7.3/components/hdfs/thdfsconfiguration-properties-for-apache-spark-batch">tHDFSConfiguration Apache Spark Batch</a> or <a href="https://help.qlik.com/talend/r/en-US/7.3/components/amazon-s3/ts3configuration-properties-for-apache-spark-batch">tS3Configuration Apache Spark Batch</a>.</p> <p>If you are using Databricks without any configuration component present                            in your Job, your business data is written directly in DBFS (Databricks                            Filesystem).</p> </li> </ul><br><br>This connection is effective on a per-Job basis. |