Source

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

Diff from to

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

       <description/>
       <type>SQL</type>
       <sql>alter table tse_candidatos
-	drop constraint cand_politico_fk</sql>
+	drop constraint cand_politico_fk;
+
+alter table tse_unidade_eleitoral
+	drop constraint ue_uecons_fk;</sql>
       <useVariableSubstitution>F</useVariableSubstitution>
       <sqlfromfile>F</sqlfromfile>
       <sqlfilename/>
       <parallel>N</parallel>
       <draw>Y</draw>
       <nr>0</nr>
-      <xloc>179</xloc>
-      <yloc>390</yloc>
+      <xloc>22</xloc>
+      <yloc>150</yloc>
       </entry>
     <entry>
       <name>add FKs</name>
       <type>SQL</type>
       <sql>alter table tse_candidatos
 	add constraint cand_politico_fk foreign key (num_titulo_eleitoral_candidato)
-	references tse_politicos (num_titulo_eleitoral_candidato);</sql>
+	references tse_politicos (num_titulo_eleitoral_candidato);
+
+alter table tse_unidade_eleitoral
+	add constraint ue_uecons_fk foreign key (sigla_ue)
+	references tse_ue_cons (sigla_ue);</sql>
       <useVariableSubstitution>F</useVariableSubstitution>
       <sqlfromfile>F</sqlfromfile>
       <sqlfilename/>
       <parallel>N</parallel>
       <draw>Y</draw>
       <nr>0</nr>
-      <xloc>261</xloc>
-      <yloc>361</yloc>
+      <xloc>79</xloc>
+      <yloc>68</yloc>
       </entry>
   </entries>
   <hops>
       <unconditional>N</unconditional>
     </hop>
     <hop>
-      <from>START</from>
-      <to>ue [LISTACAND]</to>
-      <from_nr>0</from_nr>
-      <to_nr>0</to_nr>
-      <enabled>Y</enabled>
-      <evaluation>Y</evaluation>
-      <unconditional>Y</unconditional>
-    </hop>
-    <hop>
       <from>ue [LISTACAND]</from>
       <to>tse_candidatos &#47; partidos [LISTACAND]</to>
       <from_nr>0</from_nr>
       <unconditional>N</unconditional>
     </hop>
     <hop>
-      <from>partidos_invalidos</from>
-      <to>drop FKs</to>
-      <from_nr>0</from_nr>
-      <to_nr>0</to_nr>
-      <enabled>Y</enabled>
-      <evaluation>Y</evaluation>
-      <unconditional>N</unconditional>
-    </hop>
-    <hop>
-      <from>drop FKs</from>
-      <to>tse_candidatos [LISTACAND]</to>
-      <from_nr>0</from_nr>
-      <to_nr>0</to_nr>
-      <enabled>Y</enabled>
-      <evaluation>Y</evaluation>
-      <unconditional>N</unconditional>
-    </hop>
-    <hop>
       <from>tse_candidatos [LISTACAND]</from>
       <to>add FKs</to>
       <from_nr>0</from_nr>
       <unconditional>N</unconditional>
     </hop>
     <hop>
+      <from>partidos_invalidos</from>
+      <to>tse_candidatos [LISTACAND]</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
+      <from>START</from>
+      <to>drop FKs</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>drop FKs</from>
+      <to>ue [LISTACAND]</to>
+      <from_nr>0</from_nr>
+      <to_nr>0</to_nr>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>N</unconditional>
+    </hop>
+    <hop>
       <from>DUMMY</from>
-      <to>tse_candidatos [LISTACAND]</to>
+      <to>ue [LISTACAND]</to>
       <from_nr>0</from_nr>
       <to_nr>0</to_nr>
       <enabled>Y</enabled>