Commits

tbrugz  committed 2901077 Draft

mondrian: tse_candidatos_bens: add cand_count - distinct-count(seq_candidato); + factcount para todos cubos

  • Participants
  • Parent commits 2e8e9e3

Comments (0)

Files changed (2)

File modelo/tse-mondrianschema.xml

             </Hierarchy>
         </Dimension>
         <Measure visible="true" aggregator="sum" column="DESPESA_MAX_CAMPANHA" name="despesa_max_campanha"/>
-        <Measure visible="true" aggregator="count" column="ID_CANDIDATO" name="cand_count"/>
+        <Measure visible="true" aggregator="count" column="ID_CANDIDATO" name="factcount"/>
     </Cube>
     <Cube name="tse_candidatos_bens">
         <Table schema="PUBLIC" name="TSE_CANDIDATOS_BENS"/>
             </Hierarchy>
         </Dimension>
         <Measure visible="true" aggregator="sum" column="VL_BEM" name="vl_bem"/>
-        <Measure visible="true" aggregator="count" column="SEQ_CANDIDATO" name="cand_bens_count"/>
+        <Measure visible="true" aggregator="count" column="SEQ_CANDIDATO" name="factcount"/>
+        <Measure visible="true" aggregator="distinct-count" column="SEQ_CANDIDATO" name="cand_count"/>
     </Cube>
     <Cube name="tse_detalhe_secao">
         <Table schema="PUBLIC" name="TSE_DETALHE_SECAO"/>
         <Measure visible="true" aggregator="sum" column="QT_VOTOS_NULOS" name="qt_votos_nulos"/>
         <Measure visible="true" aggregator="sum" column="QT_VOTOS_LEGENDA" name="qt_votos_legenda"/>
         <Measure visible="true" aggregator="sum" column="QT_VOTOS_ANULADOS_APU_SEP" name="qt_votos_anulados_apu_sep"/>
+        <Measure visible="true" aggregator="count" column="NR_ZONA" name="factcount"/>
     </Cube>
     <Cube name="tse_pc_receitas_cand">
         <Table schema="PUBLIC" name="TSE_PC_RECEITAS_CAND"/>

File sqldump-dadostse.properties

 sqldump.mondrianschema.hierarchyhasall=true
 sqldump.mondrianschema.sqliddecorator=toupper
 #sqldump.mondrianschema.defaultaggregators=sum, count
+sqldump.mondrianschema.factcountmeasure=factcount
 
 #sqldump.mondrianschema.table@tse_perfil_eleitorado.xtrafk=cd_municipio:public.tse_municipios:codigo_municipio
 
 sqldump.mondrianschema.cube@tse_candidatos_bens.degeneratedims=ano_eleicao
 #, ds_tipo_bem
 sqldump.mondrianschema.cube@tse_candidatos_bens.measurecols=vl_bem
-sqldump.mondrianschema.cube@tse_candidatos_bens.factcountmeasure=cand_bens_count
+#sqldump.mondrianschema.cube@tse_candidatos_bens.factcountmeasure=cand_bens_count
+sqldump.mondrianschema.cube@tse_candidatos_bens.addmeasures=seq_candidato:distinct-count:cand_count
 
 sqldump.mondrianschema.cube@tse_candidatos.degeneratedims=ano_eleicao, valido
 sqldump.mondrianschema.cube@tse_candidatos.measurecols=despesa_max_campanha
-sqldump.mondrianschema.cube@tse_candidatos.factcountmeasure=cand_count
+#sqldump.mondrianschema.cube@tse_candidatos.factcountmeasure=cand_count
 #sqldump.mondrianschema.cube@tse_candidatos.aggregators=sum, count
 
 sqldump.mondrianschema.cube@fato_tse_votacao.degeneratedims=ano_eleicao, num_turno