Commits

tbrugz committed e5f1c9f Draft

transf: prestação de contas: correção para dados de 2008

Comments (0)

Files changed (1)

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

     </attributes>
   </connection>
   <order>
-  <hop> <from>tse_candidatos</from><to>tse_pc_receitas_cand</to><enabled>Y</enabled> </hop>  <hop> <from>ReceitasCandidatos</from><to>Select values</to><enabled>Y</enabled> </hop>  <hop> <from>Select values</from><to>Modified Java Script Value</to><enabled>Y</enabled> </hop>  <hop> <from>Modified Java Script Value</from><to>Filter rows</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>tse_candidatos</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>Dummy (do nothing)</to><enabled>Y</enabled> </hop>  <hop> <from>tse_pc_receitas_cand</from><to>erros tse_pc_receitas_cand</to><enabled>Y</enabled> </hop>  </order>
+  <hop> <from>tse_candidatos</from><to>tse_pc_receitas_cand</to><enabled>Y</enabled> </hop>  <hop> <from>ReceitasCandidatos</from><to>Select values</to><enabled>N</enabled> </hop>  <hop> <from>Select values</from><to>vars-filtro</to><enabled>N</enabled> </hop>  <hop> <from>vars-filtro</from><to>Filter rows</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>tse_candidatos</to><enabled>Y</enabled> </hop>  <hop> <from>Filter rows</from><to>Dummy (do nothing)</to><enabled>Y</enabled> </hop>  <hop> <from>tse_pc_receitas_cand</from><to>erros tse_pc_receitas_cand</to><enabled>Y</enabled> </hop>  <hop> <from>ReceitasCandidatos-2008</from><to>select-2008</to><enabled>Y</enabled> </hop>  <hop> <from>select-2008</from><to>constantes</to><enabled>Y</enabled> </hop>  <hop> <from>constantes</from><to>vars-filtro</to><enabled>Y</enabled> </hop>  </order>
+  <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>390</xloc>
+      <yloc>297</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>tse_candidatos</send_true_to>
+<send_false_to>Dummy (do nothing)</send_false_to>
+    <compare>
+<condition>
+ <negated>N</negated>
+ <leftvalue>OK</leftvalue>
+ <function>=</function>
+ <rightvalue/>
+ <value><name>constant</name><type>Boolean</type><text>Y</text><length>-1</length><precision>-1</precision><isnull>N</isnull><mask/></value> </condition>
+    </compare>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>277</xloc>
+      <yloc>324</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>vars-filtro</name>
+    <type>ScriptValueMod</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <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
+
+var uffiltro = getVariable(&quot;dadostse.carga.uf&quot;,&quot;&quot;);
+var ano_eleicao = getVariable(&quot;dadostse.carga.anoeleicao&quot;,&quot;&quot;);
+
+var OK = false;
+
+if(UF == uffiltro) {
+	OK = true;
+}
+</jsScript_script>
+      </jsScript>    </jsScripts>    <fields>      <field>        <name>uffiltro</name>
+        <rename>uffiltro</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>OK</name>
+        <rename>OK</rename>
+        <type>Boolean</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>ano_eleicao</name>
+        <rename>ano_eleicao</rename>
+        <type>Integer</type>
+        <length>4</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>    </fields>     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>177</xloc>
+      <yloc>346</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
   <step>
     <name>ReceitasCandidatos</name>
     <type>CsvInput</type>
       </field>
       <field>
         <name>Numero UE</name>
-        <type>Integer</type>
+        <type>String</type>
         <format>#</format>
         <currency>R$</currency>
         <decimal>,</decimal>
     </step>
 
   <step>
-    <name>tse_candidatos</name>
-    <type>DBLookup</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-    <connection>dw_tse</connection>
-    <cache>N</cache>
-    <cache_load_all>N</cache_load_all>
-    <cache_size>0</cache_size>
-    <lookup>
-      <schema/>
-      <table>tse_candidatos</table>
-      <orderby/>
-      <fail_on_multiple>N</fail_on_multiple>
-      <eat_row_on_failure>N</eat_row_on_failure>
-      <key>
-        <name>UF</name>
-        <field>UF</field>
-        <condition>=</condition>
-        <name2/>
-      </key>
-      <key>
-        <name>NR_CANDIDATO</name>
-        <field>NR_CANDIDATO</field>
-        <condition>=</condition>
-        <name2/>
-      </key>
-      <value>
-        <name>SEQ_CANDIDATO</name>
-        <rename>SEQ_CANDIDATO</rename>
-        <default/>
-        <type>Integer</type>
-      </value>
-      <value>
-        <name>NM_CANDIDATO_URNA</name>
-        <rename>NM_CANDIDATO_URNA</rename>
-        <default/>
-        <type>String</type>
-      </value>
-      <value>
-        <name>CD_SITUACAO_CANDIDATO</name>
-        <rename>CD_SITUACAO_CANDIDATO</rename>
-        <default/>
-        <type>Integer</type>
-      </value>
-      <value>
-        <name>ID_CANDIDATO</name>
-        <rename>ID_CANDIDATO</rename>
-        <default/>
-        <type>String</type>
-      </value>
-      <value>
-        <name>ID_PARTIDO</name>
-        <rename>ID_PARTIDO</rename>
-        <default/>
-        <type>String</type>
-      </value>
-      <value>
-        <name>DS_SITUACAO_CANDIDATO</name>
-        <rename>DS_SITUACAO_CANDIDATO</rename>
-        <default/>
-        <type>String</type>
-      </value>
-      <value>
-        <name>ESFERA_CARGO</name>
-        <rename>ESFERA_CARGO</rename>
-        <default/>
-        <type>String</type>
-      </value>
-      <value>
-        <name>NUM_TITULO_ELEITORAL_CANDIDATO</name>
-        <rename>NUM_TITULO_ELEITORAL_CANDIDATO</rename>
-        <default/>
-        <type>Integer</type>
-      </value>
-      <value>
-        <name>DESPESA_MAX_CAMPANHA</name>
-        <rename>DESPESA_MAX_CAMPANHA</rename>
-        <default/>
-        <type>Integer</type>
-      </value>
-      <value>
-        <name>COD_SIT_TOT_TURNO</name>
-        <rename>COD_SIT_TOT_TURNO</rename>
-        <default/>
-        <type>Integer</type>
-      </value>
-      <value>
-        <name>DESC_SIT_TOT_TURNO</name>
-        <rename>DESC_SIT_TOT_TURNO</rename>
-        <default/>
-        <type>String</type>
-      </value>
-    </lookup>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>200</xloc>
-      <yloc>235</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
-    <name>tse_pc_receitas_cand</name>
-    <type>TableOutput</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <schema_name/>
-           </partitioning>
-    <connection>dw_tse</connection>
-    <schema/>
-    <table>tse_pc_receitas_cand</table>
-    <commit>1000</commit>
-    <truncate>N</truncate>
-    <ignore_errors>N</ignore_errors>
-    <use_batch>Y</use_batch>
-    <specify_fields>Y</specify_fields>
-    <partitioning_enabled>N</partitioning_enabled>
-    <partitioning_field/>
-    <partitioning_daily>N</partitioning_daily>
-    <partitioning_monthly>Y</partitioning_monthly>
-    <tablename_in_field>N</tablename_in_field>
-    <tablename_field/>
-    <tablename_in_table>Y</tablename_in_table>
-    <return_keys>N</return_keys>
-    <return_field/>
-    <fields>
-        <field>
-          <column_name>data_hora</column_name>
-          <stream_name>data_hora</stream_name>
-        </field>
-        <field>
-          <column_name>seq_candidato</column_name>
-          <stream_name>seq_candidato</stream_name>
-        </field>
-        <field>
-          <column_name>UF</column_name>
-          <stream_name>UF</stream_name>
-        </field>
-        <field>
-          <column_name>numero_ue</column_name>
-          <stream_name>numero_ue</stream_name>
-        </field>
-        <field>
-          <column_name>Municipio</column_name>
-          <stream_name>Municipio</stream_name>
-        </field>
-        <field>
-          <column_name>sigla_partido</column_name>
-          <stream_name>sigla_partido</stream_name>
-        </field>
-        <field>
-          <column_name>nr_candidato</column_name>
-          <stream_name>nr_candidato</stream_name>
-        </field>
-        <field>
-          <column_name>Cargo</column_name>
-          <stream_name>Cargo</stream_name>
-        </field>
-        <field>
-          <column_name>nm_candidato</column_name>
-          <stream_name>nm_candidato</stream_name>
-        </field>
-        <field>
-          <column_name>cpf_candidato</column_name>
-          <stream_name>cpf_candidato</stream_name>
-        </field>
-        <field>
-          <column_name>nr_recibo_eleitoral</column_name>
-          <stream_name>nr_recibo_eleitoral</stream_name>
-        </field>
-        <field>
-          <column_name>nr_documento</column_name>
-          <stream_name>nr_documento</stream_name>
-        </field>
-        <field>
-          <column_name>cpf_cnpj_doador</column_name>
-          <stream_name>cpf_cnpj_doador</stream_name>
-        </field>
-        <field>
-          <column_name>nome_doador</column_name>
-          <stream_name>nome_doador</stream_name>
-        </field>
-        <field>
-          <column_name>data_receita</column_name>
-          <stream_name>data_receita</stream_name>
-        </field>
-        <field>
-          <column_name>vl_receita</column_name>
-          <stream_name>vl_receita</stream_name>
-        </field>
-        <field>
-          <column_name>tipo_receita</column_name>
-          <stream_name>tipo_receita</stream_name>
-        </field>
-        <field>
-          <column_name>fonte_recurso</column_name>
-          <stream_name>fonte_recurso</stream_name>
-        </field>
-        <field>
-          <column_name>especie_recurso</column_name>
-          <stream_name>especie_recurso</stream_name>
-        </field>
-        <field>
-          <column_name>ds_receita</column_name>
-          <stream_name>ds_receita</stream_name>
-        </field>
-        <field>
-          <column_name>NM_CANDIDATO_URNA</column_name>
-          <stream_name>NM_CANDIDATO_URNA</stream_name>
-        </field>
-        <field>
-          <column_name>CD_SITUACAO_CANDIDATO</column_name>
-          <stream_name>CD_SITUACAO_CANDIDATO</stream_name>
-        </field>
-        <field>
-          <column_name>ID_CANDIDATO</column_name>
-          <stream_name>ID_CANDIDATO</stream_name>
-        </field>
-        <field>
-          <column_name>ID_PARTIDO</column_name>
-          <stream_name>ID_PARTIDO</stream_name>
-        </field>
-        <field>
-          <column_name>DS_SITUACAO_CANDIDATO</column_name>
-          <stream_name>DS_SITUACAO_CANDIDATO</stream_name>
-        </field>
-        <field>
-          <column_name>ESFERA_CARGO</column_name>
-          <stream_name>ESFERA_CARGO</stream_name>
-        </field>
-        <field>
-          <column_name>NUM_TITULO_ELEITORAL_CANDIDATO</column_name>
-          <stream_name>NUM_TITULO_ELEITORAL_CANDIDATO</stream_name>
-        </field>
-        <field>
-          <column_name>DESPESA_MAX_CAMPANHA</column_name>
-          <stream_name>DESPESA_MAX_CAMPANHA</stream_name>
-        </field>
-        <field>
-          <column_name>COD_SIT_TOT_TURNO</column_name>
-          <stream_name>COD_SIT_TOT_TURNO</stream_name>
-        </field>
-        <field>
-          <column_name>DESC_SIT_TOT_TURNO</column_name>
-          <stream_name>DESC_SIT_TOT_TURNO</stream_name>
-        </field>
-        <field>
-          <column_name>ano_eleicao</column_name>
-          <stream_name>ano_eleicao</stream_name>
-        </field>
-    </fields>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>314</xloc>
-      <yloc>168</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
-    <name>Modified Java Script Value</name>
-    <type>ScriptValueMod</type>
-    <description/>
-    <distribute>Y</distribute>
-    <copies>1</copies>
-         <partitioning>
-           <method>none</method>
-           <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
-
-var uffiltro = getVariable(&quot;dadostse.carga.uf&quot;,&quot;&quot;);
-var ano_eleicao = getVariable(&quot;dadostse.carga.anoeleicao&quot;,&quot;&quot;);
-
-var OK = false;
-
-if(UF == uffiltro) {
-	OK = true;
-}</jsScript_script>
-      </jsScript>    </jsScripts>    <fields>      <field>        <name>uffiltro</name>
-        <rename>uffiltro</rename>
-        <type>String</type>
-        <length>-1</length>
-        <precision>-1</precision>
-        <replace>N</replace>
-      </field>      <field>        <name>OK</name>
-        <rename>OK</rename>
-        <type>Boolean</type>
-        <length>-1</length>
-        <precision>-1</precision>
-        <replace>N</replace>
-      </field>      <field>        <name>ano_eleicao</name>
-        <rename>ano_eleicao</rename>
-        <type>Integer</type>
-        <length>4</length>
-        <precision>-1</precision>
-        <replace>N</replace>
-      </field>    </fields>     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>177</xloc>
-      <yloc>346</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
     <name>Select values</name>
     <type>SelectValues</type>
     <description/>
     </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>tse_candidatos</send_true_to>
-<send_false_to>Dummy (do nothing)</send_false_to>
-    <compare>
-<condition>
- <negated>N</negated>
- <leftvalue>OK</leftvalue>
- <function>=</function>
- <rightvalue/>
- <value><name>constant</name><type>Boolean</type><text>Y</text><length>-1</length><precision>-1</precision><isnull>N</isnull><mask/></value> </condition>
-    </compare>
-     <cluster_schema/>
- <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-      <xloc>277</xloc>
-      <yloc>324</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>390</xloc>
-      <yloc>297</yloc>
-      <draw>Y</draw>
-      </GUI>
-    </step>
-
-  <step>
     <name>erros tse_pc_receitas_cand</name>
     <type>TextFileOutput</type>
     <description/>
       </GUI>
     </step>
 
+  <step>
+    <name>tse_candidatos</name>
+    <type>DBLookup</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <connection>dw_tse</connection>
+    <cache>N</cache>
+    <cache_load_all>N</cache_load_all>
+    <cache_size>0</cache_size>
+    <lookup>
+      <schema/>
+      <table>tse_candidatos</table>
+      <orderby/>
+      <fail_on_multiple>N</fail_on_multiple>
+      <eat_row_on_failure>N</eat_row_on_failure>
+      <key>
+        <name>ano_eleicao</name>
+        <field>ANO_ELEICAO</field>
+        <condition>=</condition>
+        <name2/>
+      </key>
+      <key>
+        <name>numero_ue</name>
+        <field>SIGLA_UE</field>
+        <condition>=</condition>
+        <name2/>
+      </key>
+      <key>
+        <name>NR_CANDIDATO</name>
+        <field>NR_CANDIDATO</field>
+        <condition>=</condition>
+        <name2/>
+      </key>
+      <value>
+        <name>SEQ_CANDIDATO</name>
+        <rename>SEQ_CANDIDATO</rename>
+        <default/>
+        <type>Integer</type>
+      </value>
+      <value>
+        <name>NM_CANDIDATO_URNA</name>
+        <rename>NM_CANDIDATO_URNA</rename>
+        <default/>
+        <type>String</type>
+      </value>
+      <value>
+        <name>CD_SITUACAO_CANDIDATO</name>
+        <rename>CD_SITUACAO_CANDIDATO</rename>
+        <default/>
+        <type>Integer</type>
+      </value>
+      <value>
+        <name>ID_CANDIDATO</name>
+        <rename>ID_CANDIDATO</rename>
+        <default/>
+        <type>String</type>
+      </value>
+      <value>
+        <name>ID_PARTIDO</name>
+        <rename>ID_PARTIDO</rename>
+        <default/>
+        <type>String</type>
+      </value>
+      <value>
+        <name>DS_SITUACAO_CANDIDATO</name>
+        <rename>DS_SITUACAO_CANDIDATO</rename>
+        <default/>
+        <type>String</type>
+      </value>
+      <value>
+        <name>ESFERA_CARGO</name>
+        <rename>ESFERA_CARGO</rename>
+        <default/>
+        <type>String</type>
+      </value>
+      <value>
+        <name>NUM_TITULO_ELEITORAL_CANDIDATO</name>
+        <rename>NUM_TITULO_ELEITORAL_CANDIDATO</rename>
+        <default/>
+        <type>Integer</type>
+      </value>
+      <value>
+        <name>DESPESA_MAX_CAMPANHA</name>
+        <rename>DESPESA_MAX_CAMPANHA</rename>
+        <default/>
+        <type>Integer</type>
+      </value>
+      <value>
+        <name>COD_SIT_TOT_TURNO</name>
+        <rename>COD_SIT_TOT_TURNO</rename>
+        <default/>
+        <type>Integer</type>
+      </value>
+      <value>
+        <name>DESC_SIT_TOT_TURNO</name>
+        <rename>DESC_SIT_TOT_TURNO</rename>
+        <default/>
+        <type>String</type>
+      </value>
+    </lookup>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>200</xloc>
+      <yloc>235</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>tse_pc_receitas_cand</name>
+    <type>TableOutput</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <connection>dw_tse</connection>
+    <schema/>
+    <table>tse_pc_receitas_cand</table>
+    <commit>1000</commit>
+    <truncate>N</truncate>
+    <ignore_errors>N</ignore_errors>
+    <use_batch>Y</use_batch>
+    <specify_fields>Y</specify_fields>
+    <partitioning_enabled>N</partitioning_enabled>
+    <partitioning_field/>
+    <partitioning_daily>N</partitioning_daily>
+    <partitioning_monthly>Y</partitioning_monthly>
+    <tablename_in_field>N</tablename_in_field>
+    <tablename_field/>
+    <tablename_in_table>Y</tablename_in_table>
+    <return_keys>N</return_keys>
+    <return_field/>
+    <fields>
+        <field>
+          <column_name>data_hora</column_name>
+          <stream_name>data_hora</stream_name>
+        </field>
+        <field>
+          <column_name>seq_candidato</column_name>
+          <stream_name>seq_candidato</stream_name>
+        </field>
+        <field>
+          <column_name>UF</column_name>
+          <stream_name>UF</stream_name>
+        </field>
+        <field>
+          <column_name>numero_ue</column_name>
+          <stream_name>numero_ue</stream_name>
+        </field>
+        <field>
+          <column_name>Municipio</column_name>
+          <stream_name>Municipio</stream_name>
+        </field>
+        <field>
+          <column_name>sigla_partido</column_name>
+          <stream_name>sigla_partido</stream_name>
+        </field>
+        <field>
+          <column_name>nr_candidato</column_name>
+          <stream_name>nr_candidato</stream_name>
+        </field>
+        <field>
+          <column_name>Cargo</column_name>
+          <stream_name>Cargo</stream_name>
+        </field>
+        <field>
+          <column_name>nm_candidato</column_name>
+          <stream_name>nm_candidato</stream_name>
+        </field>
+        <field>
+          <column_name>cpf_candidato</column_name>
+          <stream_name>cpf_candidato</stream_name>
+        </field>
+        <field>
+          <column_name>nr_recibo_eleitoral</column_name>
+          <stream_name>nr_recibo_eleitoral</stream_name>
+        </field>
+        <field>
+          <column_name>nr_documento</column_name>
+          <stream_name>nr_documento</stream_name>
+        </field>
+        <field>
+          <column_name>cpf_cnpj_doador</column_name>
+          <stream_name>cpf_cnpj_doador</stream_name>
+        </field>
+        <field>
+          <column_name>nome_doador</column_name>
+          <stream_name>nome_doador</stream_name>
+        </field>
+        <field>
+          <column_name>data_receita</column_name>
+          <stream_name>data_receita</stream_name>
+        </field>
+        <field>
+          <column_name>vl_receita</column_name>
+          <stream_name>vl_receita</stream_name>
+        </field>
+        <field>
+          <column_name>tipo_receita</column_name>
+          <stream_name>tipo_receita</stream_name>
+        </field>
+        <field>
+          <column_name>fonte_recurso</column_name>
+          <stream_name>fonte_recurso</stream_name>
+        </field>
+        <field>
+          <column_name>especie_recurso</column_name>
+          <stream_name>especie_recurso</stream_name>
+        </field>
+        <field>
+          <column_name>ds_receita</column_name>
+          <stream_name>ds_receita</stream_name>
+        </field>
+        <field>
+          <column_name>NM_CANDIDATO_URNA</column_name>
+          <stream_name>NM_CANDIDATO_URNA</stream_name>
+        </field>
+        <field>
+          <column_name>CD_SITUACAO_CANDIDATO</column_name>
+          <stream_name>CD_SITUACAO_CANDIDATO</stream_name>
+        </field>
+        <field>
+          <column_name>ID_CANDIDATO</column_name>
+          <stream_name>ID_CANDIDATO</stream_name>
+        </field>
+        <field>
+          <column_name>ID_PARTIDO</column_name>
+          <stream_name>ID_PARTIDO</stream_name>
+        </field>
+        <field>
+          <column_name>DS_SITUACAO_CANDIDATO</column_name>
+          <stream_name>DS_SITUACAO_CANDIDATO</stream_name>
+        </field>
+        <field>
+          <column_name>ESFERA_CARGO</column_name>
+          <stream_name>ESFERA_CARGO</stream_name>
+        </field>
+        <field>
+          <column_name>NUM_TITULO_ELEITORAL_CANDIDATO</column_name>
+          <stream_name>NUM_TITULO_ELEITORAL_CANDIDATO</stream_name>
+        </field>
+        <field>
+          <column_name>DESPESA_MAX_CAMPANHA</column_name>
+          <stream_name>DESPESA_MAX_CAMPANHA</stream_name>
+        </field>
+        <field>
+          <column_name>COD_SIT_TOT_TURNO</column_name>
+          <stream_name>COD_SIT_TOT_TURNO</stream_name>
+        </field>
+        <field>
+          <column_name>DESC_SIT_TOT_TURNO</column_name>
+          <stream_name>DESC_SIT_TOT_TURNO</stream_name>
+        </field>
+        <field>
+          <column_name>ano_eleicao</column_name>
+          <stream_name>ano_eleicao</stream_name>
+        </field>
+    </fields>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>314</xloc>
+      <yloc>168</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>ReceitasCandidatos-2008</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;ReceitasCandidatos.csv</filename>
+    <filename_field/>
+    <rownum_field/>
+    <include_filename>N</include_filename>
+    <separator>;</separator>
+    <enclosure>&quot;</enclosure>
+    <header>Y</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>NM_CANDIDATO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>37</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>SEXO</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>DS_CARGO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>8</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CD_CARGO</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>NR_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>SG_UE_SUPERIOR</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>NM_UE</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>SG_UE</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>
+      <field>
+        <name>DS_NR_TITULO_ELEITOR</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_NUM_CPF</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_NUM_CNPJ</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>NR_PARTIDO</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>SG_PARTIDO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>7</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>VR_RECEITA</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>DT_RECEITA</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>DS_TITULO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>37</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CD_TITULO</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>DS_ESP_RECURSO</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>10</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CD_ESP_RECURSO</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>NM_DOADOR</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>51</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CD_CPF_CNPJ_DOADOR</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>SG_UE_SUPERIOR_1</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>NM_UE_1</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>SG_UE_1</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>SITUACAOCADASTRAL</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>7</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>NM_ADM</name>
+        <type>String</type>
+        <format/>
+        <currency>R$</currency>
+        <decimal>,</decimal>
+        <group>.</group>
+        <length>34</length>
+        <precision>-1</precision>
+        <trim_type>none</trim_type>
+      </field>
+      <field>
+        <name>CD_CPF_ADM</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>
+    </fields>
+     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>70</xloc>
+      <yloc>409</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>select-2008</name>
+    <type>SelectValues</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <schema_name/>
+           </partitioning>
+    <fields>      <field>        <name>NM_CANDIDATO</name>
+        <rename>nm_candidato</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_CARGO</name>
+        <rename>Cargo</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SG_UE_SUPERIOR</name>
+        <rename>UF</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NM_UE</name>
+        <rename>Municipio</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>SG_UE</name>
+        <rename>numero_ue</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_NUM_CPF</name>
+        <rename>cpf_candidato</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>VR_RECEITA</name>
+        <rename>vl_receita</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DT_RECEITA</name>
+        <rename>data_receita</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>DS_ESP_RECURSO</name>
+        <rename>especie_recurso</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NM_DOADOR</name>
+        <rename>nome_doador</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>CD_CPF_CNPJ_DOADOR</name>
+        <rename>cpf_cnpj_doador</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>      <field>        <name>NR_CANDIDATO</name>
+        <rename>nr_candidato</rename>
+        <length>-2</length>
+        <precision>-2</precision>
+      </field>        <select_unspecified>N</select_unspecified>
+    </fields>     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>205</xloc>
+      <yloc>425</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
+  <step>
+    <name>constantes</name>
+    <type>ScriptValueMod</type>
+    <description/>
+    <distribute>Y</distribute>
+    <copies>1</copies>
+         <partitioning>
+           <method>none</method>
+           <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
+
+var data_hora = str2date(&quot;01&#47;01&#47;2008&quot;,&quot;dd&#47;MM&#47;yyyy&quot;);
+var seq_candidato = 0;
+var sigla_partido = &quot;&quot;;
+var nr_recibo_eleitoral	= 0;
+var nr_documento = 0;
+var tipo_receita = &quot;&quot;;
+var fonte_recurso = &quot;&quot;;
+var ds_receita = &quot;&quot;;</jsScript_script>
+      </jsScript>      <jsScript>        <jsScript_type>-1</jsScript_type>
+        <jsScript_name>str2date_Sample</jsScript_name>
+        <jsScript_script>&#47;&#47; Converts the given String to a date Value.
+&#47;&#47;
+&#47;&#47; Usage:
+&#47;&#47; str2date(var);
+&#47;&#47; 1: String - The Variable with the String to convert.
+&#47;&#47; This call uses your localized format.
+&#47;&#47;
+&#47;&#47; str2date(var, var);
+&#47;&#47; 1: String - The Variable with the String to convert.
+&#47;&#47; 2: String - The Format:
+&#47;&#47;        yy &#47; yyyy - 06 &#47; 2006
+&#47;&#47;        MM &#47; MMM &#47; MMMMM - 11 &#47; Nov &#47; November
+&#47;&#47;        d &#47; dd  - 1 &#47; 01
+&#47;&#47;        E &#47; EEEE - Tue &#47; Tuesday
+&#47;&#47;        hh &#47; HH - 11 &#47; 23
+&#47;&#47;        m &#47; mm - 5 &#47; 05
+&#47;&#47;        s &#47; ss - 8 &#47; 08
+&#47;&#47;
+&#47;&#47; str2date(var, var, var);
+&#47;&#47; 1: String - The Variable with the String to convert.
+&#47;&#47; 2: String - The Format:
+&#47;&#47; 3: String - The Locale Parameter
+&#47;&#47;    An valid ISO Language Code. (DE = German, EN = English, FR = France, ...)
+&#47;&#47;
+&#47;&#47; str2date(var, var, var, var);
+&#47;&#47; 1: String - The Variable with the String to convert.
+&#47;&#47; 2: String - The Format:
+&#47;&#47; 3: String - The Locale Parameter
+&#47;&#47;    An valid ISO Language Code. (DE = German, EN = English, FR = France, ...)
+&#47;&#47; 4: String - The Timezone Parameter.
+&#47;&#47;    A valid timezone: EST, GMT, ... (if invalid GMT will be selected as default)
+&#47;&#47; 
+&#47;&#47; 2006-11-15
+&#47;&#47;
+Alert(str2date(&quot;01.12.2006&quot;,&quot;dd.MM.yyyy&quot;));
+Alert(str2date(&quot;01.12.2006 23:23:01&quot;,&quot;dd.MM.yyyy HH:mm:ss&quot;));
+Alert(str2date(&quot;Tue.May.2006&quot;,&quot;E.MMM.yyyy&quot;,&quot;EN&quot;));
+Alert(str2date(&quot;22.02.2008 23:23:01&quot;,&quot;dd.MM.yyyy HH:mm:ss&quot;,&quot;DE&quot;));
+Alert(str2date(&quot;22.02.2008 23:23:01&quot;,&quot;dd.MM.yyyy HH:mm:ss&quot;,&quot;DE&quot;, &quot;EST&quot;));</jsScript_script>
+      </jsScript>    </jsScripts>    <fields>      <field>        <name>data_hora</name>
+        <rename>data_hora</rename>
+        <type>Date</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>seq_candidato</name>
+        <rename>seq_candidato</rename>
+        <type>Number</type>
+        <length>16</length>
+        <precision>0</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>sigla_partido</name>
+        <rename>sigla_partido</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>nr_recibo_eleitoral</name>
+        <rename>nr_recibo_eleitoral</rename>
+        <type>Number</type>
+        <length>16</length>
+        <precision>0</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>nr_documento</name>
+        <rename>nr_documento</rename>
+        <type>Number</type>
+        <length>16</length>
+        <precision>0</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>tipo_receita</name>
+        <rename>tipo_receita</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>fonte_recurso</name>
+        <rename>fonte_recurso</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>      <field>        <name>ds_receita</name>
+        <rename>ds_receita</rename>
+        <type>String</type>
+        <length>-1</length>
+        <precision>-1</precision>
+        <replace>N</replace>
+      </field>    </fields>     <cluster_schema/>
+ <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
+      <xloc>275</xloc>
+      <yloc>405</yloc>
+      <draw>Y</draw>
+      </GUI>
+    </step>
+
   <step_error_handling>
       <error>
         <source_step>tse_pc_receitas_cand</source_step>