Check Number of fields in csv file in Pentaho

Today, I will discuss about the “How to check Number of fields in csv file or any other file in Pentaho without using shell Scripting. Below is the code snippet for the same. Here, we have used components like Text file input, Sample rows, Split fields to rows,Write to log. In Text File input, we have intentionally kept wrong delimiter, so that we will get only one field in the fields section. Please see how data looks like. Now, comes the Sample rows,Using this component, we will fetch only one…

Wildcard In pentaho

Today, I will discuss about the “Wildcards in Pentaho”. I have tried to cover all possible Scenarios. Use the below wildcard for below mentioned Scenarios. 1. Get all files present inside a particular Directory. .+ 2. Get all CSV files. .+\.csv 3. Get all CSV files having special character like UnderScore (_) .+._.+\.csv 4. Get all CSV files starting with Particular Pattern . For Example abc*****.csv abc.+\.csv 5. Get all CSV files having pattern in between.For example ***abc***.csv .+.abc.+\.csv 6. Get all CSV files which are ending with Numbers. .+[0-9]\.csv…

Java Version for All Pentaho Versions

Today i will share the data for Java Version against Pentaho version. See the list below.It will help you in order to install correct Java version for Pentaho. PDI Version Java Version Pentaho 8.2| JDK 1.8 Pentaho 8.1| JDK 1.8 Pentaho 8.0| JDK 1.8 Pentaho 7.1| JDK 1.8 Pentaho 7.0| JDK 1.8 Pentaho 6.1| JDK 1.7 Pentaho 6.0| JDK 1.7 Pentaho 5.4| JDK 1.7 Pentaho 5.3| JDK 1.7 Pentaho 5.2| JDK 1.7 Pentaho 5.1| JDK 1.7                             …

Remove the extra delimiters in the file using shell script

Today, i will discuss about the “How to remove extra delimiters in a file” using shell script. Below is the content of the file. a|b||c d||e|||f Post execution of shell script, the output will be a|b|c d|e|f Below is the script which is created to remove extra delimiter in a file. #file is assigned to variable INPUT . Here we used two files text1.txt and text2.txt to manipulate the source file data. INPUT=”Path of the file”/file.txt #Truncating text1.txt. Make sure this file exists. >text1.txt #Reading character by character using while…

CASE Statement in Pentaho

Today, I will discuss about how to create ETL(Pentaho) Equivalent of case statement in Database. In Pentaho, we have component “Number Range”. See the ETL Design for the same. In this, I have considered csv file input ,Number Range,Write to log components. In CSV file input, FEB-SAL.csv file which we have considered. See the below SS for the same. See the below SS for the Number Range Component. Number Range works on x1 less than equal to(<=) x greater than(<) x2 logic. Here, if you see, 1000 to 5000 ,…

Shell script to run for x hours using while Loop

Today i will discuss about the shell script code snippet which will run for x hours. Below is the code snippet which will help you to run code for x hours. ## Here I am using 10 seconds , in order to run for 1 hours, mention the same in seconds which is 3600. $vartime value will be set to 3600 initially. vartime=$((SECONDS+10)) echo $vartime ## $SECONDS tells you the time period for which script is running.Initially it will be 0 seconds when script starts. So, 0 will be compared…

AWS configuration files in Pentaho 8.2

Today, I will discuss about the configurations files which are newly introduced in Pentaho version >8. First of all, if you see in Pentaho version greater than 8, S3 file input and S3 file output components, Access Key and Secret Key variables are removed. See the below SS. Below are the steps to be performed in windows Machine. 1. create folder inside C:/Users/user/.aws 2. In order to create .aws folder , give folder name as .aws. then .aws folder gets created. 3. Inside .aws folder, create files config and credentials…

INTERVIEW QUESTIONS IN PENTAHO SET-3

Today, I will share few more set of questions that can be asked in Pentaho DI Interview. 1. How you will merge the rows in one row based with delimiter as separator in Pentaho 2. How to split the row into multiple rows having delimiter in it using Pentaho DI. 3. Scenario Based Question We have three csv files with Data as below File1.txt A B C 1 2 3 1 3 1 1 1 3 File2.txt A B C 1 2 1 2 1 1 1 3 1 File3.txt…

Pentaho Data Integration Enterprise Edition Installation

Today, I will discuss about the installation process of Pentaho Data Integration Enterprise Edition(30 Days Trial Version) available on Pentaho Site. As the community version of Pentaho gives a lot of opportunity to work in a lot of domains, Pentaho Enterprise version also have a lot of beneficiary apart from the usual support stuff. We will evaluate Pentaho versions in another article. In this article we will try and install the Enterprise versions in Windows and *Nix environment. First of all, we need to go to the main site of…

Check SQL History and Monitor Sessions in PL/SQL Developer Tool

Today, i will discuss about how to monitor Sessions and check what all queries executed in pl/sql Sessions. First, In order to Monitor Sessions which are active /inactive in particular Schema in pl/sql developer tool, Go to Tools->Monitor Sessions. See the below Screen Shot for the same. Second, In order to see what all queries executed in particular Session , go to View -> SQL History. See the below image for the same.