Commits

tbrugz committed 9839948 Draft

transf: add origem_LISTACAND_ue, origem_ue_partidos_invalidos

  • Participants
  • Parent commits 8a7cb51

Comments (0)

Files changed (5)

File kettle/repositorio-de-dados-eleitorais/job_eleicoes.kjb

       <yloc>346</yloc>
       </entry>
     <entry>
-      <name>tse_candidatos &#47; partidos &#47; ue [LISTACAND]</name>
+      <name>tse_candidatos &#47; partidos [LISTACAND]</name>
       <description/>
       <type>TRANS</type>
       <specification_method>filename</specification_method>
       <xloc>268</xloc>
       <yloc>213</yloc>
       </entry>
+    <entry>
+      <name>partidos_invalidos</name>
+      <description/>
+      <type>TRANS</type>
+      <specification_method>filename</specification_method>
+      <trans_object_id/>
+      <filename>${Internal.Job.Filename.Directory}&#47;origem_ue_partidos_invalidos.ktr</filename>
+      <transname/>
+      <arg_from_previous>N</arg_from_previous>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <clear_rows>N</clear_rows>
+      <clear_files>N</clear_files>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Basic</loglevel>
+      <cluster>N</cluster>
+      <slave_server_name/>
+      <set_append_logfile>N</set_append_logfile>
+      <wait_until_finished>Y</wait_until_finished>
+      <follow_abort_remote>N</follow_abort_remote>
+      <create_parent_folder>N</create_parent_folder>
+      <parameters>        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>      <parallel>N</parallel>
+      <draw>Y</draw>
+      <nr>0</nr>
+      <xloc>174</xloc>
+      <yloc>216</yloc>
+      </entry>
+    <entry>
+      <name>ue [LISTACAND]</name>
+      <description/>
+      <type>TRANS</type>
+      <specification_method>filename</specification_method>
+      <trans_object_id/>
+      <filename>${Internal.Job.Filename.Directory}&#47;origem_LISTACAND_ue.ktr</filename>
+      <transname/>
+      <arg_from_previous>N</arg_from_previous>
+      <params_from_previous>N</params_from_previous>
+      <exec_per_row>N</exec_per_row>
+      <clear_rows>N</clear_rows>
+      <clear_files>N</clear_files>
+      <set_logfile>N</set_logfile>
+      <logfile/>
+      <logext/>
+      <add_date>N</add_date>
+      <add_time>N</add_time>
+      <loglevel>Basic</loglevel>
+      <cluster>N</cluster>
+      <slave_server_name/>
+      <set_append_logfile>N</set_append_logfile>
+      <wait_until_finished>Y</wait_until_finished>
+      <follow_abort_remote>N</follow_abort_remote>
+      <create_parent_folder>N</create_parent_folder>
+      <parameters>        <pass_all_parameters>Y</pass_all_parameters>
+      </parameters>      <parallel>N</parallel>
+      <draw>Y</draw>
+      <nr>0</nr>
+      <xloc>142</xloc>
+      <yloc>137</yloc>
+      </entry>
   </entries>
   <hops>
     <hop>
       <unconditional>N</unconditional>
     </hop>
     <hop>
-      <from>START</from>
-      <to>tse_candidatos &#47; partidos &#47; ue [LISTACAND]</to>
-      <from_nr>0</from_nr>
-      <to_nr>0</to_nr>
-      <enabled>Y</enabled>
-      <evaluation>Y</evaluation>
-      <unconditional>Y</unconditional>
-    </hop>
-    <hop>
-      <from>tse_candidatos &#47; partidos &#47; ue [LISTACAND]</from>
-      <to>tse_candidatos [LISTACAND]</to>
-      <from_nr>0</from_nr>
-      <to_nr>0</to_nr>
-      <enabled>Y</enabled>
-      <evaluation>Y</evaluation>
-      <unconditional>N</unconditional>
-    </hop>
-    <hop>
       <from>bens candidato [CANDBEM]</from>
       <to>candidatos_invalidos</to>
       <from_nr>0</from_nr>
       <evaluation>Y</evaluation>
       <unconditional>N</unconditional>
     </hop>
+    <hop>
+      <from>tse_candidatos &#47; partidos [LISTACAND]</from>
+      <to>partidos_invalidos</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>partidos_invalidos</from>
+      <to>tse_candidatos [LISTACAND]</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>START</from>
+      <to>ue [LISTACAND]</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>ue [LISTACAND]</from>
+      <to>tse_candidatos &#47; partidos [LISTACAND]</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
   </hops>
   <notepads>
     <notepad>

File kettle/repositorio-de-dados-eleitorais/origem_CANDBEM.ktr

     </attributes>
   </connection>
   <order>
-  <hop> <from>renames</from><to>tipos bens</to><enabled>Y</enabled> </hop>  <hop> <from>tipos bens</from><to>Unique rows (HashSet)</to><enabled>Y</enabled> </hop>  <hop> <from>renames</from><to>i&#47;u - tse_candidatos_bens</to><enabled>N</enabled> </hop>  <hop> <from>Unique rows (HashSet)</from><to>i&#47;u - tipos bens</to><enabled>N</enabled> </hop>  <hop> <from>renames</from><to>tse_candidatos_bens</to><enabled>Y</enabled> </hop>  <hop> <from>tse_candidatos_bens</from><to>Erros bens_cand</to><enabled>Y</enabled> </hop>  <hop> <from>CSV - lista bens de candidatos</from><to>Modified Java Script Value</to><enabled>Y</enabled> </hop>  <hop> <from>Modified Java Script Value</from><to>renames</to><enabled>Y</enabled> </hop>  </order>
+  <hop> <from>renames</from><to>tipos bens</to><enabled>Y</enabled> </hop>  <hop> <from>tipos bens</from><to>Unique rows (HashSet)</to><enabled>Y</enabled> </hop>  <hop> <from>renames</from><to>i&#47;u - tse_candidatos_bens</to><enabled>N</enabled> </hop>  <hop> <from>Unique rows (HashSet)</from><to>i&#47;u - tipos bens</to><enabled>N</enabled> </hop>  <hop> <from>renames</from><to>tse_candidatos_bens</to><enabled>Y</enabled> </hop>  <hop> <from>tse_candidatos_bens</from><to>Erros bens_cand</to><enabled>Y</enabled> </hop>  <hop> <from>CSV - lista bens de candidatos</from><to>data&#47;hora invalida</to><enabled>Y</enabled> </hop>  <hop> <from>data&#47;hora invalida</from><to>renames</to><enabled>Y</enabled> </hop>  </order>
   <step>
     <name>CSV - lista bens de candidatos</name>
     <type>CsvInput</type>
     </step>
 
   <step>
-    <name>Modified Java Script Value</name>
+    <name>data&#47;hora invalida</name>
     <type>ScriptValueMod</type>
     <description/>
     <distribute>Y</distribute>
 var DATA_ULTIMA_ATUALIZACAO = DATA_ULTIMA_ATUALIZACAO_X;
 var HORA_ULTIMA_ATUALIZACAO = HORA_ULTIMA_ATUALIZACAO_X;
 
-if(DATA_ULTIMA_ATUALIZACAO_X==&apos;#NE#&apos;) { DATA_ULTIMA_ATUALIZACAO = null;}
-if(HORA_ULTIMA_ATUALIZACAO_X==&apos;#NE#&apos;) { HORA_ULTIMA_ATUALIZACAO = -1;}</jsScript_script>
+if(trim(DATA_ULTIMA_ATUALIZACAO_X)==&apos;#NE#&apos;) { DATA_ULTIMA_ATUALIZACAO = null;}
+if(trim(HORA_ULTIMA_ATUALIZACAO_X)==&apos;#NE#&apos;) { HORA_ULTIMA_ATUALIZACAO = -1;}</jsScript_script>
       </jsScript>    </jsScripts>    <fields>      <field>        <name>DATA_ULTIMA_ATUALIZACAO</name>
         <rename>DATA_ULTIMA_ATUALIZACAO</rename>
         <type>Date</type>
       </field>      <field>        <name>HORA_ULTIMA_ATUALIZACAO</name>
         <rename>HORA_ULTIMA_ATUALIZACAO</rename>
         <type>Integer</type>
-        <length>-1</length>
+        <length>2</length>
         <precision>-1</precision>
         <replace>N</replace>
       </field>    </fields>     <cluster_schema/>

File kettle/repositorio-de-dados-eleitorais/origem_LISTACAND_partidos.ktr

       <bordercolorblue>100</bordercolorblue>
       <drawshadow>Y</drawshadow>
     </notepad>
-    <notepad>
-      <note>ver: ue_candidato_legenda</note>
-      <xloc>679</xloc>
-      <yloc>176</yloc>
-      <width>143</width>
-      <heigth>22</heigth>
-      <fontname>Microsoft Sans Serif</fontname>
-      <fontsize>8</fontsize>
-      <fontbold>N</fontbold>
-      <fontitalic>N</fontitalic>
-      <fontcolorred>0</fontcolorred>
-      <fontcolorgreen>0</fontcolorgreen>
-      <fontcolorblue>0</fontcolorblue>
-      <backgroundcolorred>255</backgroundcolorred>
-      <backgroundcolorgreen>165</backgroundcolorgreen>
-      <backgroundcolorblue>0</backgroundcolorblue>
-      <bordercolorred>100</bordercolorred>
-      <bordercolorgreen>100</bordercolorgreen>
-      <bordercolorblue>100</bordercolorblue>
-      <drawshadow>Y</drawshadow>
-    </notepad>
   </notepads>
   <connection>
     <name>dw_pgsql_tse</name>
     </attributes>
   </connection>
   <order>
-  <hop> <from>CSV - lista cand</from><to>renames</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>Dummy (do nothing)</to><enabled>Y</enabled> </hop>  <hop> <from>renames</from><to>Database lookup</to><enabled>Y</enabled> </hop>  <hop> <from>Database lookup</from><to>Filter rows</to><enabled>Y</enabled> </hop>  <hop> <from>Select values</from><to>Select values - partidos</to><enabled>Y</enabled> </hop>  <hop> <from>Select values - partidos</from><to>Unique - partidos</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>id_partido &#47; id_candidato</to><enabled>Y</enabled> </hop>  <hop> <from>id_partido &#47; id_candidato</from><to>Select values</to><enabled>Y</enabled> </hop>  <hop> <from>Select values</from><to>select eleicao&#47;uf</to><enabled>Y</enabled> </hop>  <hop> <from>select eleicao&#47;uf</from><to>unique eleicao&#47;uf</to><enabled>Y</enabled> </hop>  <hop> <from>unique eleicao&#47;uf</from><to>join</to><enabled>Y</enabled> </hop>  <hop> <from>CSV - tipos votos invalidos</from><to>join</to><enabled>Y</enabled> </hop>  <hop> <from>Select values 3</from><to>I&#47;U - tse_partidos - invalidos</to><enabled>Y</enabled> </hop>  <hop> <from>join</from><to>id_partido_invalido</to><enabled>Y</enabled> </hop>  <hop> <from>id_partido_invalido</from><to>Select values 3</to><enabled>Y</enabled> </hop>  <hop> <from>cargos_legenda</from><to>join 2</to><enabled>N</enabled> </hop>  <hop> <from>Unique - partidos</from><to>join 2</to><enabled>N</enabled> </hop>  <hop> <from>join 2</from><to>id_votavel</to><enabled>N</enabled> </hop>  <hop> <from>id_votavel</from><to>I&#47;U - tse_candidatos &#47; legenda</to><enabled>N</enabled> </hop>  <hop> <from>Select values</from><to>select ue</to><enabled>Y</enabled> </hop>  <hop> <from>select ue</from><to>i&#47;u - tse_unidade_eleitoral</to><enabled>Y</enabled> </hop>  <hop> <from>Dummy (do nothing)</from><to>id_partido &#47; id_candidato</to><enabled>Y</enabled> </hop>  <hop> <from>Unique - partidos</from><to>I&#47;U - tse_partidos</to><enabled>Y</enabled> </hop>  </order>
+  <hop> <from>CSV - lista cand</from><to>renames</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>Dummy (do nothing)</to><enabled>Y</enabled> </hop>  <hop> <from>renames</from><to>Database lookup</to><enabled>Y</enabled> </hop>  <hop> <from>Database lookup</from><to>Filter rows</to><enabled>Y</enabled> </hop>  <hop> <from>Select values</from><to>Select values - partidos</to><enabled>Y</enabled> </hop>  <hop> <from>Select values - partidos</from><to>Unique - partidos</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>id_partido &#47; id_candidato</to><enabled>Y</enabled> </hop>  <hop> <from>id_partido &#47; id_candidato</from><to>Select values</to><enabled>Y</enabled> </hop>  <hop> <from>Select values</from><to>select eleicao&#47;uf</to><enabled>Y</enabled> </hop>  <hop> <from>select eleicao&#47;uf</from><to>unique eleicao&#47;uf</to><enabled>N</enabled> </hop>  <hop> <from>unique eleicao&#47;uf</from><to>join</to><enabled>N</enabled> </hop>  <hop> <from>CSV - tipos votos invalidos</from><to>join</to><enabled>N</enabled> </hop>  <hop> <from>Select values 3</from><to>I&#47;U - tse_partidos - invalidos</to><enabled>N</enabled> </hop>  <hop> <from>join</from><to>id_partido_invalido</to><enabled>N</enabled> </hop>  <hop> <from>id_partido_invalido</from><to>Select values 3</to><enabled>N</enabled> </hop>  <hop> <from>Dummy (do nothing)</from><to>id_partido &#47; id_candidato</to><enabled>Y</enabled> </hop>  <hop> <from>Unique - partidos</from><to>I&#47;U - tse_partidos</to><enabled>Y</enabled> </hop>  </order>
   <step>
     <name>CSV - lista cand</name>
     <type>CsvInput</type>
     </step>
 
   <step>
-    <name>I&#47;U - tse_candidatos &#47; legenda</name>
+    <name>I&#47;U - tse_partidos</name>
     <type>InsertUpdate</type>
     <description/>
     <distribute>Y</distribute>
     <commit>100</commit>
     <update_bypassed>N</update_bypassed>
     <lookup>
-      <schema>public</schema>
-      <table>tse_candidatos</table>
+      <schema/>
+      <table>tse_partidos</table>
       <key>
-        <name>ID_VOTAVEL</name>
-        <field>id_candidato</field>
+        <name>ANO_ELEICAO</name>
+        <field>ANO_ELEICAO</field>
+        <condition>=</condition>
+        <name2/>
+      </key>
+      <key>
+        <name>SIGLA_UE</name>
+        <field>SIGLA_UE</field>
+        <condition>=</condition>
+        <name2/>
+      </key>
+      <key>
+        <name>NR_PARTIDO</name>
+        <field>NR_PARTIDO</field>
         <condition>=</condition>
         <name2/>
       </key>
       <value>
         <name>ANO_ELEICAO</name>
         <rename>ANO_ELEICAO</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>SIGLA_UE</name>
         <rename>SIGLA_UE</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>NR_PARTIDO</name>
         <rename>NR_PARTIDO</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>SIGLA_PARTIDO</name>
         <update>Y</update>
       </value>
       <value>
-        <name>id_candidato</name>
-        <rename>ID_VOTAVEL</rename>
-        <update>N</update>
-      </value>
-      <value>
         <name>ID_UE</name>
         <rename>ID_UE</rename>
         <update>Y</update>
     </lookup>
      <cluster_schema/>
  <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>793</xloc>
-      <yloc>120</yloc>
+      <xloc>585</xloc>
+      <yloc>63</yloc>
       <draw>Y</draw>
       </GUI>
     </step>
     </step>
 
   <step>
-    <name>cargos_legenda</name>
-    <type>TableInput</type>
-    <description/>
-    <distribute>N</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-    <connection>dw_pgsql_tse</connection>
-    <sql>SELECT cd_cargo FROM tse_cargos WHERE votacao_legenda = &apos;S&apos;</sql>
-    <limit>0</limit>
-    <lookup/>
-    <execute_each_row>N</execute_each_row>
-    <variables_active>N</variables_active>
-    <lazy_conversion_active>N</lazy_conversion_active>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>631</xloc>
-      <yloc>177</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
-    <name>i&#47;u - tse_unidade_eleitoral</name>
-    <type>InsertUpdate</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-    <connection>dw_pgsql_tse</connection>
-    <commit>100</commit>
-    <update_bypassed>N</update_bypassed>
-    <lookup>
-      <schema/>
-      <table>tse_unidade_eleitoral</table>
-      <key>
-        <name>ID_UE</name>
-        <field>ID_UE</field>
-        <condition>=</condition>
-        <name2/>
-      </key>
-      <value>
-        <name>ANO_ELEICAO</name>
-        <rename>ANO_ELEICAO</rename>
-        <update>N</update>
-      </value>
-      <value>
-        <name>DS_ELEICAO</name>
-        <rename>DS_ELEICAO</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>SIGLA_UF</name>
-        <rename>SIGLA_UF</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>SIGLA_UE</name>
-        <rename>SIGLA_UE</rename>
-        <update>N</update>
-      </value>
-      <value>
-        <name>DESCRICAO_UE</name>
-        <rename>DESCRICAO_UE</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>ID_UE</name>
-        <rename>ID_UE</rename>
-        <update>N</update>
-      </value>
-    </lookup>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>653</xloc>
-      <yloc>276</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
     <name>id_partido &#47; id_candidato</name>
     <type>ScriptValueMod</type>
     <description/>
     </step>
 
   <step>
-    <name>id_votavel</name>
-    <type>ScriptValueMod</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-    <compatible>N</compatible>
-    <jsScripts>      <jsScript>        <jsScript_type>0</jsScript_type>
-        <jsScript_name>Script 1</jsScript_name>
-        <jsScript_script>&#47;&#47;Script here
-
-var ID_VOTAVEL = &apos;&apos;
-	+ANO_ELEICAO
-	+SIGLA_UE
-	+lpad(CD_CARGO,&apos;0&apos;,2)
-	+lpad(NR_PARTIDO,&apos;0&apos;,5)
-	;</jsScript_script>
-      </jsScript>    </jsScripts>    <fields>      <field>        <name>ID_VOTAVEL</name>
-        <rename>ID_VOTAVEL</rename>
-        <type>String</type>
-        <length>20</length>
-        <precision>-1</precision>
-        <replace>N</replace>
-      </field>    </fields>     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>722</xloc>
-      <yloc>50</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
     <name>join</name>
     <type>JoinRows</type>
     <description/>
     </step>
 
   <step>
-    <name>join 2</name>
-    <type>JoinRows</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-      <directory>%%java.io.tmpdir%%</directory>
-      <prefix>out</prefix>
-      <cache_size>500</cache_size>
-      <main/>
-    <compare>
-<condition>
- <negated>N</negated>
- <leftvalue/>
- <function>=</function>
- <rightvalue/>
- </condition>
-    </compare>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>646</xloc>
-      <yloc>108</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
     <name>renames</name>
     <type>SelectValues</type>
     <description/>
     </step>
 
   <step>
-    <name>select ue</name>
-    <type>SelectValues</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-    <fields>      <field>        <name>ANO_ELEICAO</name>
-        <rename/>
-        <length>-2</length>
-        <precision>-2</precision>
-      </field>      <field>        <name>DS_ELEICAO</name>
-        <rename/>
-        <length>-2</length>
-        <precision>-2</precision>
-      </field>      <field>        <name>SIGLA_UF</name>
-        <rename/>
-        <length>-2</length>
-        <precision>-2</precision>
-      </field>      <field>        <name>SIGLA_UE</name>
-        <rename/>
-        <length>-2</length>
-        <precision>-2</precision>
-      </field>      <field>        <name>DESCRICAO_UE</name>
-        <rename/>
-        <length>-2</length>
-        <precision>-2</precision>
-      </field>      <field>        <name>ID_UE</name>
-        <rename/>
-        <length>-2</length>
-        <precision>-2</precision>
-      </field>        <select_unspecified>N</select_unspecified>
-    </fields>     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>539</xloc>
-      <yloc>234</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
     <name>unique eleicao&#47;uf</name>
     <type>UniqueRowsByHashSet</type>
     <description/>
       </GUI>
     </step>
 
-  <step>
-    <name>I&#47;U - tse_partidos</name>
-    <type>InsertUpdate</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-    <connection>dw_pgsql_tse</connection>
-    <commit>100</commit>
-    <update_bypassed>N</update_bypassed>
-    <lookup>
-      <schema/>
-      <table>tse_partidos</table>
-      <key>
-        <name>ANO_ELEICAO</name>
-        <field>ANO_ELEICAO</field>
-        <condition>=</condition>
-        <name2/>
-      </key>
-      <key>
-        <name>SIGLA_UE</name>
-        <field>SIGLA_UE</field>
-        <condition>=</condition>
-        <name2/>
-      </key>
-      <key>
-        <name>NR_PARTIDO</name>
-        <field>NR_PARTIDO</field>
-        <condition>=</condition>
-        <name2/>
-      </key>
-      <value>
-        <name>ANO_ELEICAO</name>
-        <rename>ANO_ELEICAO</rename>
-        <update>N</update>
-      </value>
-      <value>
-        <name>SIGLA_UE</name>
-        <rename>SIGLA_UE</rename>
-        <update>N</update>
-      </value>
-      <value>
-        <name>NR_PARTIDO</name>
-        <rename>NR_PARTIDO</rename>
-        <update>N</update>
-      </value>
-      <value>
-        <name>SIGLA_PARTIDO</name>
-        <rename>SIGLA_PARTIDO</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>NM_PARTIDO</name>
-        <rename>NM_PARTIDO</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>NM_LEGENDA</name>
-        <rename>NM_LEGENDA</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>DS_LEGENDA</name>
-        <rename>DS_LEGENDA</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>ID_PARTIDO</name>
-        <rename>ID_PARTIDO</rename>
-        <update>Y</update>
-      </value>
-      <value>
-        <name>ID_UE</name>
-        <rename>ID_UE</rename>
-        <update>Y</update>
-      </value>
-    </lookup>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>585</xloc>
-      <yloc>63</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
   <step_error_handling>
   </step_error_handling>
    <slave-step-copy-partition-distribution>

File kettle/repositorio-de-dados-eleitorais/origem_LISTACAND_ue.ktr

+<?xml version="1.0" encoding="UTF-8"?>
+<transformation>
+  <info>
+    <name>origem_LISTACAND_ue</name>
+    <description/>
+    <extended_description/>
+    <trans_version/>
+    <trans_type>Normal</trans_type>
+    <trans_status>0</trans_status>
+    <directory>&#47;</directory>
+    <parameters>
+        <parameter>
+            <name>dadostse.carga.anoeleicao</name>
+            <default_value>2008</default_value>
+            <description/>
+        </parameter>
+        <parameter>
+            <name>dadostse.carga.uf</name>
+            <default_value>RS</default_value>
+            <description/>
+        </parameter>
+    </parameters>
+    <log>
+<trans-log-table><connection/>
+<schema/>
+<table/>
+<size_limit_lines/>
+<interval/>
+<timeout_days/>
+<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field></trans-log-table>
+<perf-log-table><connection/>
+<schema/>
+<table/>
+<interval/>
+<timeout_days/>
+<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
+<channel-log-table><connection/>
+<schema/>
+<table/>
+<timeout_days/>
+<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
+<step-log-table><connection/>
+<schema/>
+<table/>
+<timeout_days/>
+<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
+    </log>
+    <maxdate>
+      <connection/>
+      <table/>
+      <field/>
+      <offset>0.0</offset>
+      <maxdiff>0.0</maxdiff>
+    </maxdate>
+    <size_rowset>10000</size_rowset>
+    <sleep_time_empty>50</sleep_time_empty>
+    <sleep_time_full>50</sleep_time_full>
+    <unique_connections>N</unique_connections>
+    <feedback_shown>Y</feedback_shown>
+    <feedback_size>50000</feedback_size>
+    <using_thread_priorities>Y</using_thread_priorities>
+    <shared_objects_file/>
+    <capture_step_performance>N</capture_step_performance>
+    <step_performance_capturing_delay>1000</step_performance_capturing_delay>
+    <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
+    <dependencies>
+    </dependencies>
+    <partitionschemas>
+    </partitionschemas>
+    <slaveservers>
+    </slaveservers>
+    <clusterschemas>
+    </clusterschemas>
+  <created_user>-</created_user>
+  <created_date>2011&#47;09&#47;05 14:14:57.148</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2011&#47;09&#47;05 14:14:57.148</modified_date>
+  </info>
+  <notepads>
+    <notepad>
+      <note>carregar diferentes UFs</note>
+      <xloc>55</xloc>
+      <yloc>100</yloc>
+      <width>138</width>
+      <heigth>23</heigth>
+      <fontname>Microsoft Sans Serif</fontname>
+      <fontsize>8</fontsize>
+      <fontbold>N</fontbold>
+      <fontitalic>N</fontitalic>
+      <fontcolorred>0</fontcolorred>
+      <fontcolorgreen>0</fontcolorgreen>
+      <fontcolorblue>0</fontcolorblue>
+      <backgroundcolorred>255</backgroundcolorred>
+      <backgroundcolorgreen>165</backgroundcolorgreen>
+      <backgroundcolorblue>0</backgroundcolorblue>
+      <bordercolorred>100</bordercolorred>
+      <bordercolorgreen>100</bordercolorgreen>
+      <bordercolorblue>100</bordercolorblue>
+      <drawshadow>Y</drawshadow>
+    </notepad>
+  </notepads>
+  <connection>
+    <name>dw_pgsql_tse</name>
+    <server>${dadostse.conn.dw.server}</server>
+    <type>GENERIC</type>
+    <access>Native</access>
+    <database>${dadostse.conn.dw.database}</database>
+    <port>${dadostse.conn.dw.port}</port>
+    <username>${dadostse.conn.dw.username}</username>
+    <password>${dadostse.conn.dw.password}</password>
+    <servername/>
+    <data_tablespace/>
+    <index_tablespace/>
+    <attributes>
+      <attribute><code>CUSTOM_DRIVER_CLASS</code><attribute>${dadostse.conn.dw.CUSTOM_DRIVER_CLASS}</attribute></attribute>
+      <attribute><code>CUSTOM_URL</code><attribute>${dadostse.conn.dw.CUSTOM_URL}</attribute></attribute>
+      <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
+      <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
+      <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
+      <attribute><code>PORT_NUMBER</code><attribute>${dadostse.conn.dw.port}</attribute></attribute>
+      <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
+      <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
+      <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
+    </attributes>
+  </connection>
+  <order>
+  <hop> <from>CSV - lista cand</from><to>renames</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>Dummy (do nothing)</to><enabled>Y</enabled> </hop>  <hop> <from>renames</from><to>Database lookup</to><enabled>Y</enabled> </hop>  <hop> <from>Database lookup</from><to>Filter rows</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>id_partido &#47; id_candidato</to><enabled>Y</enabled> </hop>  <hop> <from>id_partido &#47; id_candidato</from><to>Select values</to><enabled>Y</enabled> </hop>  <hop> <from>Select values</from><to>select ue</to><enabled>Y</enabled> </hop>  <hop> <from>select ue</from><to>i&#47;u - tse_unidade_eleitoral</to><enabled>Y</enabled> </hop>  <hop> <from>Dummy (do nothing)</from><to>id_partido &#47; id_candidato</to><enabled>Y</enabled> </hop>  </order>
+  <step>
+    <name>CSV - lista cand</name>
+    <type>CsvInput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <filename>${dadostse.datadir}&#47;repositorio-de-dados-eleitorais&#47;${dadostse.carga.anoeleicao}&#47;consulta_cand_${dadostse.carga.anoeleicao}_${dadostse.carga.uf}.txt</filename>
+    <filename_field/>
+    <rownum_field/>
+    <include_filename>N</include_filename>
+    <separator>;</separator>
+    <enclosure>&quot;</enclosure>
+    <header>N</header>
+    <buffer_size>50000</buffer_size>
+    <lazy_conversion>N</lazy_conversion>
+    <add_filename_result>N</add_filename_result>
+    <parallel>N</parallel>
+    <newline_possible>Y</newline_possible>
+    <encoding/>
+    <fields>
+      <field>
+        <name>DATA_GERACAO</name>
+        <type>Date</type>
+        <format>dd&#47;MM&#47;yyyy</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>HORA_GERACAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>ANO_ELEICAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>4</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NUM_TURNO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_ELEICAO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>30</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>SIGLA_UF</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>2</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>SIGLA_UE</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>5</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_UE</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>30</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CODIGO_CARGO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>2</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_CARGO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>30</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NOME_CANDIDATO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>SEQUENCIAL_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NUMERO_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>5</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NOME_URNA_CANDIDATO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>COD_SITUACAO_CANDIDATURA</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>2</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DES_SITUACAO_CANDIDATURA</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NUMERO_PARTIDO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>2</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>SIGLA_PARTIDO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>20</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NOME_PARTIDO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CODIGO_LEGENDA</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>SIGLA_LEGENDA</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>4</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>COMPOSICAO_LEGENDA</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NOME_LEGENDA</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CODIGO_OCUPACAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_OCUPACAO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DATA_NASCIMENTO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>9</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NUM_TITULO_ELEITORAL_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>IDADE_DATA_ELEICAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>3</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CODIGO_SEXO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>2</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_SEXO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>COD_GRAU_INSTRUCAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_GRAU_INSTRUCAO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>40</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CODIGO_ESTADO_CIVIL</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_ESTADO_CIVIL</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>40</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CODIGO_NACIONALIDADE</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESCRICAO_NACIONALIDADE</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>40</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>SIGLA_UF_NASCIMENTO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>2</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CODIGO_MUNICIPIO_NASCIMENTO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>6</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NOME_MUNICIPIO_NASCIMENTO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESPESA_MAX_CAMPANHA</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>15</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>COD_SIT_TOT_TURNO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>4</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>DESC_SIT_TOT_TURNO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>100</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+    </fields>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>78</xloc>
+      <yloc>153</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>Database lookup</name>
+    <type>DBLookup</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <connection>dw_pgsql_tse</connection>
+    <cache>Y</cache>
+    <cache_load_all>Y</cache_load_all>
+    <cache_size>0</cache_size>
+    <lookup>
+      <schema/>
+      <table>tse_cargos</table>
+      <orderby/>
+      <fail_on_multiple>N</fail_on_multiple>
+      <eat_row_on_failure>N</eat_row_on_failure>
+      <key>
+        <name>CD_CARGO</name>
+        <field>cd_cargo</field>
+        <condition>=</condition>
+        <name2/>
+      </key>
+      <value>
+        <name>esfera_cargo</name>
+        <rename>ESFERA_CARGO</rename>
+        <default/>
+        <type>String</type>
+      </value>
+    </lookup>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>284</xloc>
+      <yloc>199</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>Dummy (do nothing)</name>
+    <type>Dummy</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>302</xloc>
+      <yloc>405</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>Filter rows</name>
+    <type>FilterRows</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+<send_true_to>id_partido &#47; id_candidato</send_true_to>
+<send_false_to>Dummy (do nothing)</send_false_to>
+    <compare>
+<condition>
+ <negated>Y</negated>
+ <leftvalue>DS_ELEICAO</leftvalue>
+ <function>CONTAINS</function>
+ <rightvalue/>
+ <value><name>constant</name><type>String</type><text>SUPLEMENTARES</text><length>-1</length><precision>-1</precision><isnull>N</isnull><mask>#;-#</mask></value> </condition>
+    </compare>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>233</xloc>
+      <yloc>311</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>Select values</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>N</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <fields>      <field>        <name>DT_GERACAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>HORA_GERACAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>ANO_ELEICAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NUM_TURNO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_ELEICAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_UF</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_UE</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DESCRICAO_UE</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_CARGO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_CARGO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NM_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SEQ_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NR_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NM_CANDIDATO_URNA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_SITUACAO_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_SITUACAO_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NR_PARTIDO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_PARTIDO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NM_PARTIDO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CODIGO_LEGENDA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_LEGENDA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_LEGENDA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NM_LEGENDA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_OCUPACAO_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_OCUPACAO_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DT_NASCIMENTO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NUM_TITULO_ELEITORAL_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>IDADE_DATA_ELEICAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_SEXO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_SEXO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_GRAU_INSTRUCAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_GRAU_INSTRUCAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_ESTADO_CIVIL</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_ESTADO_CIVIL</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_NACIONALIDADE</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_NACIONALIDADE</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_UF_NASCIMENTO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CODIGO_MUNICIPIO_NASCIMENTO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NOME_MUNICIPIO_NASCIMENTO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DESPESA_MAX_CAMPANHA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>COD_SIT_TOT_TURNO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DESC_SIT_TOT_TURNO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>ESFERA_CARGO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>ID_PARTIDO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>ID_CANDIDATO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>ID_UE</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>        <select_unspecified>N</select_unspecified>
+    </fields>     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>449</xloc>
+      <yloc>311</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>i&#47;u - tse_unidade_eleitoral</name>
+    <type>InsertUpdate</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <connection>dw_pgsql_tse</connection>
+    <commit>100</commit>
+    <update_bypassed>N</update_bypassed>
+    <lookup>
+      <schema/>
+      <table>tse_unidade_eleitoral</table>
+      <key>
+        <name>ID_UE</name>
+        <field>ID_UE</field>
+        <condition>=</condition>
+        <name2/>
+      </key>
+      <value>
+        <name>ANO_ELEICAO</name>
+        <rename>ANO_ELEICAO</rename>
+        <update>N</update>
+      </value>
+      <value>
+        <name>DS_ELEICAO</name>
+        <rename>DS_ELEICAO</rename>
+        <update>Y</update>
+      </value>
+      <value>
+        <name>SIGLA_UF</name>
+        <rename>SIGLA_UF</rename>
+        <update>Y</update>
+      </value>
+      <value>
+        <name>SIGLA_UE</name>
+        <rename>SIGLA_UE</rename>
+        <update>N</update>
+      </value>
+      <value>
+        <name>DESCRICAO_UE</name>
+        <rename>DESCRICAO_UE</rename>
+        <update>Y</update>
+      </value>
+      <value>
+        <name>ID_UE</name>
+        <rename>ID_UE</rename>
+        <update>N</update>
+      </value>
+    </lookup>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>653</xloc>
+      <yloc>276</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>id_partido &#47; id_candidato</name>
+    <type>ScriptValueMod</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <compatible>N</compatible>
+    <jsScripts>      <jsScript>        <jsScript_type>0</jsScript_type>
+        <jsScript_name>Script 1</jsScript_name>
+        <jsScript_script>&#47;&#47;Script here
+
+var ID_PARTIDO = &apos;&apos;
+	+ANO_ELEICAO
+	+SIGLA_UE
+	+lpad(NR_PARTIDO,&apos;0&apos;,2)
+	;
+
+var ID_CANDIDATO = &apos;&apos;
+	+ANO_ELEICAO
+	+SIGLA_UE
+	+lpad(CD_CARGO,&apos;0&apos;,2)
+	+lpad(NR_CANDIDATO,&apos;0&apos;,5)
+	;
+
+var ID_UE = &apos;&apos;
+	+ANO_ELEICAO
+	+SIGLA_UE</jsScript_script>
+      </jsScript>    </jsScripts>    <fields>      <field>        <name>ID_PARTIDO</name>
+        <rename>ID_PARTIDO</rename>
+        <type>String</type>
+        <length>12</length>
+        <precision>0</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>ID_CANDIDATO</name>
+        <rename>ID_CANDIDATO</rename>
+        <type>String</type>
+        <length>20</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>ID_UE</name>
+        <rename>ID_UE</rename>
+        <type>String</type>
+        <length>10</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>    </fields>     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>340</xloc>
+      <yloc>292</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>renames</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <fields>      <field>        <name>DATA_GERACAO</name>
+        <rename>DT_GERACAO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>HORA_GERACAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>ANO_ELEICAO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NUM_TURNO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DESCRICAO_ELEICAO</name>
+        <rename>DS_ELEICAO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_UF</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_UE</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DESCRICAO_UE</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CODIGO_CARGO</name>
+        <rename>CD_CARGO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DESCRICAO_CARGO</name>
+        <rename>DS_CARGO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NOME_CANDIDATO</name>
+        <rename>NM_CANDIDATO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SEQUENCIAL_CANDIDATO</name>
+        <rename>SEQ_CANDIDATO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NUMERO_CANDIDATO</name>
+        <rename>NR_CANDIDATO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NOME_URNA_CANDIDATO</name>
+        <rename>NM_CANDIDATO_URNA</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>COD_SITUACAO_CANDIDATURA</name>
+        <rename>CD_SITUACAO_CANDIDATO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DES_SITUACAO_CANDIDATURA</name>
+        <rename>DS_SITUACAO_CANDIDATO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NUMERO_PARTIDO</name>
+        <rename>NR_PARTIDO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_PARTIDO</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NOME_PARTIDO</name>
+        <rename>NM_PARTIDO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CODIGO_LEGENDA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SIGLA_LEGENDA</name>
+        <rename/>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>COMPOSICAO_LEGENDA</name>
+        <rename>DS_LEGENDA</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NOME_LEGENDA</name>
+        <rename>NM_LEGENDA</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CODIGO_OCUPACAO</name>
+        <rename>CD_OCUPACAO_CANDIDATO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DESCRICAO_OCUPACAO</name>
+        <rename>DS_OCUPACAO_CANDIDATO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DATA_NASCIMENTO</name>
+        <rename>DT_NASCIMENTO</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NUM_TITULO_ELEITORAL_CANDIDATO</name>
+        <rename/>