java - test if a column is numeric scriptella -


am trying test if column numeric copied oracle database postgresql database through scriptella , here did scriptella . , please , new

<?xml version="1.0" encoding="utf-8"?><!doctype etl system "http://scriptella.javaforge.com/dtd/etl.dtd"> <etl>     <description>         test script pour table article     </description>     <connection id="in" driver="oracle"         url="jdbc:oracle:thin:@localhost:1521:xe" user="iptech" password="iptech" />      <connection id="out" driver="postgresql"         url="jdbc:postgresql://localhost:5432/testmonoprix2" user="postgres"         password="maher" />      <connection id="log" driver="text" /> <!-- printing debug information on console -->     <connection id="java" driver="janino" />        <query connection-id="in">         select codearticle,structure, des,typemark,typ,imploc,marque,gamme,tar         iptech.tmp_article ;           <script connection-id="java">             import java.io.*;             string nttecode;             boolean result;             object o = get("codearticle");             test =is_numeric(o)         </script>             <script connection-id="out" if="test">                 insert public.articles                 (id,                 is_enabled,type_marketing,type_tarif,description,gamme,import_local,marque,reference,struct,family_id)                 values                 (cast(?codearticle                                 bigint),'true',?typemark,?tar,?des,?gamme,?imploc,?marque,?codearticle,?structure,cast(?{structure.substring(0,                 2)} bigint));             </script>     </query> </etl> 

<?xml version="1.0" encoding="utf-8"?><!doctype etl system "http://scriptella.javaforge.com/dtd/etl.dtd"> <etl>     <description>         test script pour table article     </description>     <connection id="in" driver="oracle"         url="jdbc:oracle:thin:@localhost:1521:xe" user="iptech" password="iptech" />      <connection id="out" driver="postgresql"         url="jdbc:postgresql://localhost:5432/gemodb" user="postgres"         password="maher" />      <connection id="janino" driver="janino" />     <connection id="log" driver="script"></connection>      <query connection-id="in">         select codearticle,structure,         des,typemark,typ,imploc,marque,gamme,tar         iptech.tmp_article ;          <query connection-id="out">         select id public.article_families ;              <query connection-id="janino">                 import java.io.*;                 import java.lang.*;                 import                 org.apache.commons.lang3.stringutils;                 import                 org.apache.commons.lang3.*;                  boolean result= false ;                  object obj =get("codearticle");                 if (stringutils.isnumeric(obj.tostring())) {                  <!-- system.out.println("ok "); -->                 result=true ;}                 else{                 result=false ;}                 set("result", result);                 next();  <!--                <query connection-id="out" if="result , ?id=?codearticle "> -->                 <query connection-id="out" if="result">                      insert public.articles                     (id,                     is_enabled,type_marketing,type_tarif,description,gamme,import_local,marque,reference,struct,family_id)                     values                     (cast(?codearticle bigint)                     ,'true',?typemark,?tar,?des,?gamme,?imploc,?marque,?codearticle,?structure,cast(?{structure.substring(0,                     2)} bigint));              <script connection-id="janino" >             </script>                 </query>             </query>         </query>     </query> </etl> 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -