# Defining Cloudera Data Engineering connection parameters with Spark Universal

## About this task

Talend Studio connects to Cloudera Data Engineering (CDE) service to run the Spark Job from this cluster.

## Procedure

1. Click the Run view beneath the design workspace, then click the Spark configuration view.
2. Select Built-in from the Property type drop-down list.

   If you have already set up the connection parameters in the Repository as explained in [Centralizing a Hadoop connection](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2026-09/Centralizing%20a%20Hadoop%20connection/talend/en-US/studio-user-guide/8.0/centralizing-hadoop-connection), you can easily reuse it. To do this, select Repository from the Property type drop-down list, then click […] button to open the Repository Content dialog box and select the Hadoop connection to be used.

   Information noteTip: Setting up the connection in the Repository allows you to avoid configuring that connection each time you need it in the Spark configuration view of your Jobs. The fields are automatically filled.
3. Select Universal from the Distribution drop-down list, the Spark version from the Version drop-down list, and Cloudera Data Engineering from the Runtime mode/environment drop-down list.
4. If you run your Spark Job on Windows, specify the location of the winutils.exe program:
   * If you want to use your own winutils.exe file, select the Define the Hadoop home directory check box and enter its folder path.
   * Otherwise, leave the Define the Hadoop home directory check box clear. Talend Studio will generate and use a directory automatically for this Job.
5. Enter the basic Configuration information:
   | Parameter | Usage |
   | --- | --- |
   | Use local timezone | Select this check box to let Spark use the local time<br>zone provided by the system.<br><br>Information noteNote:<br><br><ul> <li>If you clear this check box, Spark use UTC time                                                  zone.</li> <li>Some components also have the <span>Use                                                  local timezone for date</span> check box. If                                                  you clear the check box from the component, it                                                  inherits time zone from the Spark                                                  configuration.</li> </ul> |
   | Use dataset API in migrated<br>components | Select this check box to let the components use Dataset<br>(DS) API instead of Resilient Distributed Dataset (RDD) API:<br><br><ul> <li>If you select the check box, the components inside                                                the Job run with DS which improves performance.</li> <li>If you clear the check box, the components inside                                                the Job run with RDD which means the Job remains                                                unchanged. This ensures the backwards                                                compatibility.</li> </ul><br><br>This check box is selected by default, but if you import a Job from 7.3 backwards, the<br>check box will be cleared as those Jobs run with RDD.<br><br>Information noteImportant: If your Job contains tDeltaLakeInput<br>and tDeltaLakeOutput components, you must select this<br>check box. |
   | Use timestamp for dataset components | Select this check box to use<br>java.sql.Timestamp for dates.<br><br>Information noteNote: If<br>you leave this check box clear,<br>java.sql.Timestamp or<br>java.sql.Date can be used depending<br>on the pattern. |
   | Parallelize output files writing | Select this checkbox to enable the Spark Batch Job to run multiple<br>threads in parallel when writing output files. This option improves the<br>performance of the execution time.<br><br>When you leave this checkbox<br>cleared, the output files are written sequentially in one<br>thread.<br><br>On subJobs level, each subJob is treated sequentially.<br>Only the output file inside the subJob is parallelized.<br><br>This<br>option is only available for Spark Batch Jobs containing the<br>following output components:<br><br><ul> <li>tAvroOutput</li> <li>tFileOutputDelimited (only when the <span>Use dataset                                            API in migrated components</span> checkbox is                                        selected)</li> <li>tFileOutputParquet</li> </ul><br><br>Information noteImportant: To avoid memory<br>problems during the execution of the Job, you need to take into<br>account the size of the files being written and the execution<br>environment capacity before using this<br>parameter. |
6. Complete the CDE configuration parameters:
   | Parameter | Usage |
   | --- | --- |
   | API endpoint | Enter the CDE API endpoint. You can find the URL from<br>JOBS API URL link. |
   | API token | Enter the CDE token you use for API authentication. The<br>URL must respect the following format:<br>[BASE\_URL]/gateway/authtkn. For more<br>information, see [CDE API access<br>token](https://docs.cloudera.com/data-engineering/cloud/api-access/topics/cde-api-get-access-token.html) from Cloudera documentation.<br><br>This<br>property is available only when Auto generate<br>token check box is cleared. |
   | Auto generate token | Select this check box to create a new token before a Job<br>is submitted.<br><br><ul> <li> <span>CDE token endpoint</span>: enter the                                                CDE token you want to use.</li> <li> <span>Workload user</span>: enter the CDP workload                                    user you want to use to generate a new token. For more                                    information, see <a href="https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-um-workload-user.html" target="_blank">CDP workload user</a> from Cloudera                                    documentation.</li> <li> <span>Workload password</span>: enter the                                                password associated with the workload user.</li> </ul> |
   | Enable client debugging | Select this check box to enable debug logging for CDE API<br>client. |
   | Override dependencies | Select this check box to override the dependencies needed<br>for Spark. |
   | Job status/logs polling interval (in<br>ms) | Enter the time interval (in milliseconds) at the end of which you<br>want Talend Studio to ask Spark for the status of your Job. |
   | Fetch driver logs | Select this check box to fetch the driver logs at<br>runtime. You can choose to fetch the following information<br>by selecting the check box:<br><br><ul> <li> <span>Standard output</span> </li> <li> <span>Error output</span> </li> </ul> |
   | Advanced parameters | Select this check box to enter the following CDE API<br>advanced parameters:<br><br><ul> <li> <span>Number of executors</span>: enter                                                the number of executors.</li> <li> <span>Driver cores</span>: enter the                                                number of driver cores.</li> <li> <span>Driver memory</span>: enter the                                                allocation size of memory to be used by the                                                driver.</li> <li> <span>Executor cores</span>: enter the                                                number of executor cores.</li> <li> <span>Executor memory</span>: enter the                                                allocation size of memory to be used by each                                                executor.</li> </ul> |
7. In the Spark "scratch" directory field, enter the local path where Talend Studio stores temporary files, like JARs to transfer.

   If you run the Job on Windows, the default disk is C:. Leaving /tmp in this field will use C:/tmp as the directory.
8. To make your Job resilient to failure, select Activate checkpointing to enable Spark’s checkpointing operation.

   In the Checkpoint directory field, enter the cluster file system path where Spark saves context data, such as metadata and generated RDDs.
9. In the Advanced properties table, add any Spark properties you want to override the defaults set by Talend Studio.

## Results

The connection details are complete, you are ready to schedule executions of your Job or to run it immediately.