<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pentaho on Laïla Atrmouh</title>
    <link>/en/tags/pentaho/</link>
    <description>Recent content in Pentaho on Laïla Atrmouh</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>&lt;a href=&#34;https://creativecommons.org/licenses/by-nc/4.0/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;CC BY-NC 4.0&lt;/a&gt;</copyright>
    <lastBuildDate>Thu, 01 Sep 2016 13:11:20 +0000</lastBuildDate>
    <atom:link href="/en/tags/pentaho/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Pentaho - FieldHelper cannot be cast to java.lang.String</title>
      <link>/en/posts/2016/09/pentaho-fieldhelper-cannot-be-cast-to-java.lang.string/</link>
      <pubDate>Thu, 01 Sep 2016 13:11:20 +0000</pubDate>
      <guid>/en/posts/2016/09/pentaho-fieldhelper-cannot-be-cast-to-java.lang.string/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;👴 &lt;em&gt;Careful&lt;/em&gt; You&amp;rsquo;re reading an old article ! Some links might be broken and content may be outdated&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I had the following error in a « User Defined Java Class » step on Pentaho Data Integration.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;FieldHelper cannot be cast to java.lang.String&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Indeed, you have to use the getRow() method to convert the field you’re getting into a String or any other variable type.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;boolean&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;processRow&lt;/span&gt;(StepMetaInterface smi, StepDataInterface sdi) &lt;span style=&#34;color:#66d9ef&#34;&gt;throws&lt;/span&gt; KettleException, Exception&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Object&lt;span style=&#34;color:#f92672&#34;&gt;[]&lt;/span&gt; r &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; getRow();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; (r &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;null&lt;/span&gt;) { &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;; }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        String myString &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; get(Fields.&lt;span style=&#34;color:#a6e22e&#34;&gt;In&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;FeedSubmissionId&amp;#34;&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;getString&lt;/span&gt;(r);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Get XML Data won&#39;t parse XML object Pentaho</title>
      <link>/en/posts/2016/08/get-xml-data-wont-parse-xml-object-pentaho/</link>
      <pubDate>Mon, 01 Aug 2016 17:20:40 +0000</pubDate>
      <guid>/en/posts/2016/08/get-xml-data-wont-parse-xml-object-pentaho/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;👴 &lt;em&gt;Careful&lt;/em&gt; You&amp;rsquo;re reading an old article ! Some links might be broken and content may be outdated&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I had an issue with Pentaho today. It wasn’t able to simply parse this XML that I was fetching from Amazon Marketplace Webservice.&lt;/p&gt;&#xA;&lt;p&gt;Here’s the data I got :&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;SubmitFeedResponse xmlns=&amp;#34;http://mws.amazonaws.com/doc/2009-01-01/&amp;#34;&amp;gt;&#xA;&amp;lt;SubmitFeedResult&amp;gt;&#xA;&amp;lt;FeedSubmissionInfo&amp;gt;&#xA;&amp;lt;FeedSubmissionId&amp;gt;MY_FEED_ID&amp;lt;/FeedSubmissionId&amp;gt;&#xA;&amp;lt;FeedType&amp;gt;_POST_INVENTORY_AVAILABILITY_DATA_&amp;lt;/FeedType&amp;gt;&#xA;&amp;lt;SubmittedDate&amp;gt;2016-08-01T19:28:30+00:00&amp;lt;/SubmittedDate&amp;gt;&#xA;&amp;lt;FeedProcessingStatus&amp;gt;_SUBMITTED_&amp;lt;/FeedProcessingStatus&amp;gt;&#xA;&amp;lt;/FeedSubmissionInfo&amp;gt;&#xA;&amp;lt;/SubmitFeedResult&amp;gt;&#xA;&amp;lt;ResponseMetadata&amp;gt;&#xA;&amp;lt;RequestId&amp;gt;MY_REQUEST_ID&amp;lt;/RequestId&amp;gt;&#xA;&amp;lt;/ResponseMetadata&amp;gt;&#xA;&amp;lt;/SubmitFeedResponse&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The step « Get XML Data » couldn’t parse it because of the xmlns attribute tag. So I had to add a step « Replace in string » that would delete this attribute.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
