You can set up the ORC Input step to run on the Spark engine. The following factors affect performance and results when using this step with the Spark engine:
- Spark processes null values differently than the Pentaho engine. You will need to adjust your transformation to successfully process null values according to Spark's processing rules.
- Because of Cloudera Distribution Spark (CDS) limitations, the step does not support AEL for reading Hive tables containing data files in the ORC format from Spark applications in YARN mode. As an alternative, you can use the Parquet data format for columnar data using Impala.
Enter the following information in the ORC Input step fields:
|Step name||Specify the unique name of the ORC Input step on the canvas. You can customize the name or use the provided default.|
|Location||Indicates the file system or specific cluster where the source file you want to input is located. For the supported file system types, see Connecting to Virtual File Systems.|
|Folder/File Name||Specify the fully qualified URL of the source file or folder name for the input fields. The Spark engine reads all the ORC files in a specifed folder as input.|
The Fields section contains the following items:
- A Pass through fields from the previous step option that allows you to read the fields from the input file without redefining any of the fields.
- A table defining data about the columns to read from the ORC file.
The table in the Fields section defines the fields to read as input from the ORC file, the associated PDI field name, and the data type of the field. Enter the information for the ORC Input step fields as shown in the following table:
|ORC path (ORC type)||Specify the name of the field as it will appear in the ORC data file or files, and the ORC data type.|
|Name||Specify the name of the input field.|
|Type||Specify the data type of the input field.|
You can define the fields manually, or you can provide a path to an ORC data file and click Get Fields to populate all the fields. When the fields are retrieved, the ORC type is converted into an appropriate PDI type. You can preview the data in the ORC file by clicking Preview. You can change the PDI type by using the Type drop-down or by entering the type manually.
In AEL, the ORC step automatically converts ORC rows to Spark SQL rows. The following table lists the conversion types.
|ORC Type||Spark SQL Type|