
Indicate if the source file contains a header row containing column names.Īdds the CSV source filename(s) to the result of this transformation. The typical example is reading from a text file and writing back to a text file. It can result in significant performance improvements. The lazy conversion algorithm tries to avoid unnecessary data type conversions if possible. Indicate if the lazy conversion algorithm may be used to improve performance. Specify the size of the read buffer, the number of bytes that is read at one time from the source. CHAR HEX01) can be set with the format $, e.g. Specify the enclosure character used in the source file. The default delimiter for the CSV File Input step is a semicolon ( ). Specify the file delimiter character used in the source file.

If the CSV File Input receives data from another step, indicate the if the name of the input source file should be included in the output of the CSV File Input step. If the CSV File Input step receives data, the Include the filename in output? option also appears. The name ( The filename field) of the field that contains the name(s) of multiple source files if the CSV File Input step receives data from another step.The name ( Filename) of the CSV source file.You can customize the name or leave it as the default. Specify the unique name of the CSV File Input step on the canvas. The CSV File Input step has the following options: Option Lazy Conversion – If you are reading many fields from a file and many of those fields will not be manipulated but merely passed through the transformation to land in some other text file or a database, lazy conversion can prevent PDI from performing unnecessary work on those fields (such as converting them into objects like strings, dates, or numbers).Īn example of a simple CSV input transformation ( CSV Input - Reading customer data.ktr) can be found in the data-integration/samples/transformations directory.You can distribute the reading of a file to several threads or even several slave nodes in a clustered transformation. Parallel Running – If you configure this step to run in multiple copies (or in a clustered mode) and you enable parallel running, each copy will read a separate block of a single file.NIO – Non-blocking I/O is used for native system calls to read the file faster, but is limited to local files.This step differs from the Text File Input step in the following ways: The options for this step are a subset of the Text File Input step. The semicolon ( ) is set as the default separator type for this step. While this step is called ‘CSV File Input’, you can also use CSV File Input with many other separator types, such as pipes, tabs, and semicolons.

The month, day and year functions return integer values, and the str function returned 2-char values for the month and day, but with a leading space for the single-digit values, so we replaced with "0" where necessary to get 2-digit months and days.The CSV File Input step reads data from delimited text files into a PDI transformation. For example, to achieve mm/dd/yyyy date formatting in the csv, we did something like this in the Expression Definition: The solution was the same basic idea, i.e., setting column Data Format to Text, with additional string formatting. We also had similar issues formatting date columns, which Cognos wanted to format as date/timestamps in the csv file. Of course, this does not address aggregation issues, etc., mentioned in another post. So, setting the Data Format property to Text and basically doing string formatting in Report Studio before sending to csv seemed to work for us. We used ltrim to eliminate the leading spaces padded by the str function, which looked odd in the final csv.


In the Expression Definition for the column enter something like: Set the report column Data Format property to Text, with no additional formatting properties.Ģ. The following technique seems to work for us to force outputting of zero decimal values:ġ. "Data formats are not applied in delimited text (CSV) and XML report outputs." of the IBM Cognos Report Studio Version 10.2.2, page 404 states:
