tbrugz avatar tbrugz committed 08fe389 Draft

trans: tse_candidatos_bens: adicionado 'sigla_uf', troca de CsvInput para TextFileInput

Comments (0)

Files changed (11)

 para rodar as transformações, ver *jobs kettle* em `/kettle/repositorio-de-dados-eleitorais/<*>.kjb`.
 
 ordem normal de execução dos jobs:
+
 - `job_eleicoes_basico`
 - `job_eleicoes_uf` (parametros: *uf* e *ano*) (inclui: `job_eleicoes_candidatos` e `job_eleicoes_votacao`)
 
 para parar/desligar banco:
 
 - `ant stop-db`
+
+
+créditos e licença
+------------------
+
+autor: *Telmo Brugnara* <[tbrugz@gmail.com](mailto:tbrugz@gmail.com)>
+
+licença: [AGPLv3](http://www.gnu.org/licenses/agpl.html)
 match=\\.elt\\.
 replace=.carga.
 
-kettle.home=d:/java/kettle_4.2.0/data-integration
+jvm.params=-Xmx500m
+#jvm.params=-Xmx500m
+
+#kettle.home=d:/java/kettle_4.2.0/data-integration
+kettle.home=d:/java/pdi-ce-4.3.0-stable/data-integration
 
 #dadostse.projectdir=D:/proj/dados-tse
 #dadostse.datadir=D:/proj/dados-tse/dados
 #dadostse.logdir=D:/proj/dados-tse/log
 
 dadostse.carga.uf=RS
-dadostse.carga.anoeleicao=2010
+dadostse.carga.anoeleicao=2012
 
 dadostse.h2.basedir=d:/database/h2
 
 	<target name="run-job-java-uf-cand">
 		<echo message="carga dados candidatos UF [ano=${dadostse.carga.anoeleicao}; uf=${dadostse.carga.uf}]" />
 		<java dir="${kettle.home}" jar="${kettle.home}/launcher/launcher.jar" fork="true">
+			<jvmarg line="${jvm.params}"/>
 			<arg value="-main"/>
 			<arg value="org.pentaho.di.kitchen.Kitchen"/>
 			<arg value="/file:${project.dir}/${job.uf.cand.file}"/>

kettle/repositorio-de-dados-eleitorais/delete_tse_candidatos_bens.ktr

+<?xml version="1.0" encoding="UTF-8"?>
+<transformation>
+  <info>
+    <name>delete_tse_candidatos_bens</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>2012</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>2012&#47;07&#47;12 18:02:04.185</created_date>
+  <modified_user>-</modified_user>
+  <modified_date>2012&#47;07&#47;12 18:02:04.185</modified_date>
+  </info>
+  <notepads>
+  </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>
+  </order>
+  <step>
+    <name>delete tse_candidatos_bens</name>
+    <type>ExecSQL</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <connection>dw_pgsql_tse</connection>
+    <execute_each_row>N</execute_each_row>
+    <single_statement>N</single_statement>
+    <replace_variables>Y</replace_variables>
+    <sql>delete tse_candidatos_bens
+where ano_eleicao = ${dadostse.carga.anoeleicao}
+and sigla_uf = &apos;${dadostse.carga.uf}&apos;</sql>
+    <insert_field/>
+    <update_field/>
+    <delete_field/>
+    <read_field/>
+    <arguments>
+    </arguments>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>192</xloc>
+      <yloc>167</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step_error_handling>
+  </step_error_handling>
+   <slave-step-copy-partition-distribution>
+</slave-step-copy-partition-distribution>
+   <slave_transformation>N</slave_transformation>
+</transformation>

kettle/repositorio-de-dados-eleitorais/job_eleicoes_candidatos.kjb

       <xloc>142</xloc>
       <yloc>137</yloc>
       </entry>
+    <entry>
+      <name>delete_tse_candidatos_bens</name>
+      <description/>
+      <type>TRANS</type>
+      <specification_method>filename</specification_method>
+      <trans_object_id/>
+      <filename>${Internal.Job.Filename.Directory}&#47;delete_tse_candidatos_bens.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>261</xloc>
+      <yloc>375</yloc>
+      </entry>
   </entries>
   <hops>
     <hop>
-      <from>tse_candidatos [LISTACAND]</from>
-      <to>bens candidato [CANDBEM]</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 [LISTACAND]</from>
+      <to>delete_tse_candidatos_bens</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>delete_tse_candidatos_bens</from>
+      <to>bens candidato [CANDBEM]</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
   </hops>
   <notepads>
-    <notepad>
-      <note>add unidade_eleitoral antes de candidatos</note>
-      <xloc>32</xloc>
-      <yloc>371</yloc>
-      <width>216</width>
-      <heigth>22</heigth>
-      <fontname/>
-      <fontsize>-1</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>
 </job>

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

     <parameters>
         <parameter>
             <name>dadostse.carga.anoeleicao</name>
-            <default_value>2010</default_value>
+            <default_value>2012</default_value>
             <description/>
         </parameter>
         <parameter>
   </info>
   <notepads>
     <notepad>
-      <note>usar dimension lookup&#47;update?
-
+      <note>usar dimension lookup&#47;update?
+
 FK tipo bem: ano_eleicao + cd_tipo_bem?</note>
       <xloc>299</xloc>
       <yloc>393</yloc>
     </attributes>
   </connection>
   <order>
-  <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>  <hop> <from>renames</from><to>i&#47;u - tipos bens</to><enabled>Y</enabled> </hop>  <hop> <from>i&#47;u - tipos bens</from><to>tse_candidatos_bens</to><enabled>Y</enabled> </hop>  </order>
-  <step>
-    <name>CSV - lista bens de candidatos</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;bem_candidato_${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>Y</lazy_conversion>
-    <add_filename_result>N</add_filename_result>
-    <parallel>N</parallel>
-    <newline_possible>N</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>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>SQ_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>CD_TIPO_BEM_CANDIDATO</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>DS_TIPO_BEM_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>DS_BEM_CANDIDATO</name>
-        <type>String</type>
-        <format/>
-        <currency>R$</currency>
-        <decimal>,</decimal>
-        <group>.</group>
-        <length>200</length>
-        <precision>-1</precision>
-        <trim_type>none</trim_type>
-      </field>
-      <field>
-        <name>VALOR_BEM</name>
-        <type>Number</type>
-        <format>#.#</format>
-        <currency>R$</currency>
-        <decimal>.</decimal>
-        <group>,</group>
-        <length>15</length>
-        <precision>-1</precision>
-        <trim_type>none</trim_type>
-      </field>
-      <field>
-        <name>DATA_ULTIMA_ATUALIZACAO_X</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>HORA_ULTIMA_ATUALIZACAO_X</name>
-        <type>String</type>
-        <format>#</format>
-        <currency>R$</currency>
-        <decimal>,</decimal>
-        <group>.</group>
-        <length>15</length>
-        <precision>-1</precision>
-        <trim_type>none</trim_type>
-      </field>
-    </fields>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>105</xloc>
-      <yloc>155</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
+  <hop> <from>tse_candidatos_bens</from><to>Erros bens_cand</to><enabled>Y</enabled> </hop>  <hop> <from>data&#47;hora invalida</from><to>renames</to><enabled>Y</enabled> </hop>  <hop> <from>renames</from><to>i&#47;u - tipos bens</to><enabled>Y</enabled> </hop>  <hop> <from>i&#47;u - tipos bens</from><to>tse_candidatos_bens</to><enabled>Y</enabled> </hop>  <hop> <from>lista bens</from><to>data&#47;hora invalida</to><enabled>Y</enabled> </hop>  </order>
   <step>
     <name>Erros bens_cand</name>
     <type>TextFileOutput</type>
            <schema_name/>
            </partitioning>
     <compatible>N</compatible>
+    <optimizationLevel>9</optimizationLevel>
     <jsScripts>      <jsScript>        <jsScript_type>0</jsScript_type>
         <jsScript_name>Script 1</jsScript_name>
         <jsScript_script>&#47;&#47;Script here
 		str2date(DATA_ULTIMA_ATUALIZACAO+&apos; &apos;+HORA_ULTIMA_ATUALIZACAO,
 		&quot;dd&#47;MM&#47;yyyy HH:mm:ss&quot;,&quot;BR&quot;, &quot;BRST&quot;);
 }
-</jsScript_script>
+
+&#47;&#47;var UF = getVariable(&quot;dadostse.carga.uf&quot;,&quot;XX&quot;);</jsScript_script>
       </jsScript>    </jsScripts>    <fields>      <field>        <name>DATA_ULTIMA_ATUALIZACAO</name>
         <rename>DATA_ULTIMA_ATUALIZACAO</rename>
         <type>String</type>
     </step>
 
   <step>
+    <name>lista bens</name>
+    <type>TextFileInput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <accept_filenames>N</accept_filenames>
+    <passing_through_fields>N</passing_through_fields>
+    <accept_field/>
+    <accept_stepname/>
+    <separator>;</separator>
+    <enclosure>&quot;</enclosure>
+    <enclosure_breaks>N</enclosure_breaks>
+    <escapechar/>
+    <header>N</header>
+    <nr_headerlines>1</nr_headerlines>
+    <footer>N</footer>
+    <nr_footerlines>1</nr_footerlines>
+    <line_wrapped>N</line_wrapped>
+    <nr_wraps>1</nr_wraps>
+    <layout_paged>N</layout_paged>
+    <nr_lines_per_page>80</nr_lines_per_page>
+    <nr_lines_doc_header>0</nr_lines_doc_header>
+    <noempty>Y</noempty>
+    <include>N</include>
+    <include_field/>
+    <rownum>N</rownum>
+    <rownumByFile>N</rownumByFile>
+    <rownum_field/>
+    <format>Unix</format>
+    <encoding>ISO-8859-1</encoding>
+    <add_to_result_filenames>Y</add_to_result_filenames>
+    <file>
+      <name>${dadostse.datadir}&#47;repositorio-de-dados-eleitorais&#47;${dadostse.carga.anoeleicao}&#47;bem_candidato_${dadostse.carga.anoeleicao}_${dadostse.carga.uf}.txt</name>
+      <filemask/>
+      <exclude_filemask/>
+      <file_required>N</file_required>
+      <include_subfolders>N</include_subfolders>
+      <type>CSV</type>
+      <compression>None</compression>
+    </file>
+    <filters>
+    </filters>
+    <fields>
+      <field>
+        <name>DATA_GERACAO</name>
+        <type>Date</type>
+        <format>dd&#47;MM&#47;yyyy</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>-1</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>HORA_GERACAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>ANO_ELEICAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>4</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_ELEICAO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>30</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SIGLA_UF</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SQ_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CD_TIPO_BEM_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>4</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DS_TIPO_BEM_CANDIDATO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DS_BEM_CANDIDATO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>200</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>VALOR_BEM</name>
+        <type>Number</type>
+        <format>#.#</format>
+        <currency>.</currency>
+        <decimal>,</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DATA_ULTIMA_ATUALIZACAO_X</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>HORA_ULTIMA_ATUALIZACAO_X</name>
+        <type>String</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+    </fields>
+    <limit>0</limit>
+    <error_ignored>Y</error_ignored>
+    <skip_bad_files>N</skip_bad_files>
+    <file_error_field/>
+    <file_error_message_field/>
+    <error_line_skipped>Y</error_line_skipped>
+    <error_count_field/>
+    <error_fields_field/>
+    <error_text_field/>
+    <bad_line_files_destination_directory/>
+    <bad_line_files_extension>warning</bad_line_files_extension>
+    <error_line_files_destination_directory/>
+    <error_line_files_extension>error</error_line_files_extension>
+    <line_number_files_destination_directory/>
+    <line_number_files_extension>line</line_number_files_extension>
+    <date_format_lenient>Y</date_format_lenient>
+    <date_format_locale>pt_BR</date_format_locale>
+    <shortFileFieldName/>
+    <pathFieldName/>
+    <hiddenFieldName/>
+    <lastModificationTimeFieldName/>
+    <uriNameFieldName/>
+    <rootUriNameFieldName/>
+    <extensionFieldName/>
+    <sizeFieldName/>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>57</xloc>
+      <yloc>106</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
     <name>renames</name>
     <type>SelectValues</type>
     <description/>
     <schema/>
     <table>tse_candidatos_bens</table>
     <commit>1000</commit>
-    <truncate>Y</truncate>
+    <truncate>N</truncate>
     <ignore_errors>N</ignore_errors>
     <use_batch>N</use_batch>
     <specify_fields>Y</specify_fields>
           <column_name>DATAHORA_ULTIMA_ATUALIZACAO</column_name>
           <stream_name>DATAHORA_ULTIMA_ATUALIZACAO</stream_name>
         </field>
+        <field>
+          <column_name>SIGLA_UF</column_name>
+          <stream_name>SIGLA_UF</stream_name>
+        </field>
     </fields>
      <cluster_schema/>
  <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>

kettle/repositorio-de-dados-eleitorais/origem_LISTACAND.ktr

     <parameters>
         <parameter>
             <name>dadostse.carga.anoeleicao</name>
-            <default_value>2008</default_value>
+            <default_value>2012</default_value>
             <description/>
         </parameter>
         <parameter>
     </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>I&#47;U - tse_candidatos</to><enabled>Y</enabled> </hop>  <hop> <from>I&#47;U - tse_candidatos</from><to>Erros - I&#47;U</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>  </order>
+  <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>I&#47;U - tse_candidatos</to><enabled>Y</enabled> </hop>  <hop> <from>I&#47;U - tse_candidatos</from><to>Erros - I&#47;U</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>csv</from><to>renames</to><enabled>Y</enabled> </hop>  </order>
   <step>
     <name>CSV - lista cand</name>
     <type>CsvInput</type>
     <separator>;</separator>
     <enclosure>&quot;</enclosure>
     <header>N</header>
-    <buffer_size>50000</buffer_size>
+    <buffer_size>1000</buffer_size>
     <lazy_conversion>N</lazy_conversion>
     <add_filename_result>N</add_filename_result>
     <parallel>N</parallel>
-    <newline_possible>Y</newline_possible>
+    <newline_possible>N</newline_possible>
     <encoding/>
     <fields>
       <field>
       </field>
       <field>
         <name>HORA_GERACAO</name>
-        <type>Integer</type>
-        <format>#</format>
+        <type>String</type>
+        <format/>
         <currency>R$</currency>
         <decimal>,</decimal>
         <group>.</group>
-        <length>15</length>
+        <length>10</length>
         <precision>-1</precision>
         <trim_type>none</trim_type>
       </field>
            </partitioning>
     <connection>dw_pgsql_tse</connection>
     <cache>Y</cache>
-    <cache_load_all>Y</cache_load_all>
-    <cache_size>0</cache_size>
+    <cache_load_all>N</cache_load_all>
+    <cache_size>100</cache_size>
     <lookup>
       <schema/>
       <table>tse_cargos</table>
       <eat_row_on_failure>N</eat_row_on_failure>
       <key>
         <name>CD_CARGO</name>
-        <field>cd_cargo</field>
+        <field>CD_CARGO</field>
         <condition>=</condition>
         <name2/>
       </key>
       <value>
-        <name>esfera_cargo</name>
+        <name>ESFERA_CARGO</name>
         <rename>ESFERA_CARGO</rename>
         <default/>
         <type>String</type>
            <schema_name/>
            </partitioning>
     <separator>;</separator>
-    <enclosure>&quot;</enclosure>
+    <enclosure/>
     <enclosure_forced>N</enclosure_forced>
     <enclosure_fix_disabled>N</enclosure_fix_disabled>
     <header>Y</header>
       </field>
       <field>
         <name>HORA_GERACAO</name>
-        <type>Integer</type>
+        <type>String</type>
         <format/>
         <currency/>
         <decimal/>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
-        <precision>0</precision>
+        <length>10</length>
+        <precision>-1</precision>
       </field>
       <field>
         <name>ANO_ELEICAO</name>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>4</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>1</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>13</length>
+        <length>30</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>17</length>
+        <length>30</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>2</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>16</length>
+        <length>30</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>41</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>5</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>27</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>2</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>10</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>2</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>7</length>
+        <length>20</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>46</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>4</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>31</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>59</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>3</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>2</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>9</length>
+        <length>15</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>29</length>
+        <length>40</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>25</length>
+        <length>40</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>40</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>6</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>21</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>15</length>
+        <length>4</length>
         <precision>0</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>46</length>
+        <length>100</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>8</length>
+        <length>12</length>
         <precision>-1</precision>
       </field>
       <field>
         <group/>
         <nullif/>
         <trim_type>none</trim_type>
-        <length>14</length>
+        <length>20</length>
+        <precision>-1</precision>
+      </field>
+      <field>
+        <name>ID_UE</name>
+        <type>String</type>
+        <format/>
+        <currency/>
+        <decimal/>
+        <group/>
+        <nullif/>
+        <trim_type>none</trim_type>
+        <length>10</length>
+        <precision>-1</precision>
+      </field>
+      <field>
+        <name>VALIDO</name>
+        <type>String</type>
+        <format/>
+        <currency/>
+        <decimal/>
+        <group/>
+        <nullif/>
+        <trim_type>none</trim_type>
+        <length>1</length>
         <precision>-1</precision>
       </field>
       <field>
            <schema_name/>
            </partitioning>
     <connection>dw_pgsql_tse</connection>
-    <commit>100</commit>
+    <commit>1000</commit>
     <update_bypassed>N</update_bypassed>
     <lookup>
       <schema>public</schema>
       <value>
         <name>ANO_ELEICAO</name>
         <rename>ANO_ELEICAO</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>DS_ELEICAO</name>
       <value>
         <name>CD_CARGO</name>
         <rename>CD_CARGO</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>DS_CARGO</name>
       <value>
         <name>NR_CANDIDATO</name>
         <rename>NR_CANDIDATO</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>SEQ_CANDIDATO</name>
       <value>
         <name>ID_PARTIDO</name>
         <rename>ID_PARTIDO</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>NUM_TITULO_ELEITORAL_CANDIDATO</name>
       <value>
         <name>SIGLA_UE</name>
         <rename>SIGLA_UE</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>ID_UE</name>
         <rename>ID_UE</rename>
-        <update>Y</update>
+        <update>N</update>
       </value>
       <value>
         <name>VALIDO</name>
            <schema_name/>
            </partitioning>
     <compatible>N</compatible>
+    <optimizationLevel/>
     <jsScripts>      <jsScript>        <jsScript_type>0</jsScript_type>
         <jsScript_name>Script 1</jsScript_name>
         <jsScript_script>&#47;&#47;Script here
 	+lpad(CD_CARGO,&apos;0&apos;,2)
 	+lpad(NR_CANDIDATO,&apos;0&apos;,5)
 	;
-
-var ID_UE = &apos;&apos;
-	+ANO_ELEICAO
-	+SIGLA_UE
-
+
+var ID_UE = &apos;&apos;
+	+ANO_ELEICAO
+	+SIGLA_UE
+
 var VALIDO = &apos;S&apos;;</jsScript_script>
       </jsScript>    </jsScripts>    <fields>      <field>        <name>ID_PARTIDO</name>
         <rename>ID_PARTIDO</rename>
       </GUI>
     </step>
 
+  <step>
+    <name>csv</name>
+    <type>TextFileInput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <accept_filenames>N</accept_filenames>
+    <passing_through_fields>N</passing_through_fields>
+    <accept_field/>
+    <accept_stepname/>
+    <separator>;</separator>
+    <enclosure>&quot;</enclosure>
+    <enclosure_breaks>N</enclosure_breaks>
+    <escapechar/>
+    <header>N</header>
+    <nr_headerlines>1</nr_headerlines>
+    <footer>N</footer>
+    <nr_footerlines>1</nr_footerlines>
+    <line_wrapped>N</line_wrapped>
+    <nr_wraps>1</nr_wraps>
+    <layout_paged>N</layout_paged>
+    <nr_lines_per_page>80</nr_lines_per_page>
+    <nr_lines_doc_header>0</nr_lines_doc_header>
+    <noempty>Y</noempty>
+    <include>N</include>
+    <include_field/>
+    <rownum>N</rownum>
+    <rownumByFile>N</rownumByFile>
+    <rownum_field/>
+    <format>mixed</format>
+    <encoding/>
+    <add_to_result_filenames>Y</add_to_result_filenames>
+    <file>
+      <name>${dadostse.datadir}&#47;repositorio-de-dados-eleitorais&#47;${dadostse.carga.anoeleicao}&#47;consulta_cand_${dadostse.carga.anoeleicao}_${dadostse.carga.uf}.txt</name>
+      <filemask/>
+      <exclude_filemask/>
+      <file_required>N</file_required>
+      <include_subfolders>N</include_subfolders>
+      <type>CSV</type>
+      <compression>None</compression>
+    </file>
+    <filters>
+    </filters>
+    <fields>
+      <field>
+        <name>DATA_GERACAO</name>
+        <type>Date</type>
+        <format>dd&#47;MM&#47;yyyy</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>-1</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>HORA_GERACAO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>10</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>ANO_ELEICAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>4</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NUM_TURNO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>1</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_ELEICAO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>30</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SIGLA_UF</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SIGLA_UE</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_UE</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>30</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CODIGO_CARGO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_CARGO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>30</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NOME_CANDIDATO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SEQUENCIAL_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NUMERO_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>5</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NOME_URNA_CANDIDATO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>COD_SITUACAO_CANDIDATURA</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DES_SITUACAO_CANDIDATURA</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NUMERO_PARTIDO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SIGLA_PARTIDO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>20</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NOME_PARTIDO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CODIGO_LEGENDA</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SIGLA_LEGENDA</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>4</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>COMPOSICAO_LEGENDA</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NOME_LEGENDA</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CODIGO_OCUPACAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_OCUPACAO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DATA_NASCIMENTO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>9</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NUM_TITULO_ELEITORAL_CANDIDATO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>IDADE_DATA_ELEICAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>3</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CODIGO_SEXO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_SEXO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>COD_GRAU_INSTRUCAO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_GRAU_INSTRUCAO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>40</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CODIGO_ESTADO_CIVIL</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_ESTADO_CIVIL</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>40</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CODIGO_NACIONALIDADE</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>15</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>DESCRICAO_NACIONALIDADE</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>40</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>SIGLA_UF_NASCIMENTO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>2</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>CODIGO_MUNICIPIO_NASCIMENTO</name>
+        <type>Integer</type>
+        <format>#</format>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>6</position>
+        <length>-1</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+        <repeat>N</repeat>
+      </field>
+      <field>
+        <name>NOME_MUNICIPIO_NASCIMENTO</name>
+        <type>String</type>
+        <format/>
+        <currency>,</currency>
+        <decimal>.</decimal>
+        <group>none</group>
+        <nullif/>
+        <ifnull/>
+        <position>100</posi