Source

dados-tse / sqldump-dadostse.properties

Full commit

@includes = ${user.home}/.kettle/kettle.properties

# just a variable for using ahead - name has no special meaning 
#outputdir=modelo/sqldump-dados-tse
outputdir=output/modelo-sqldump-dados-tse

sqldump.mainoutputfilepattern=${outputdir}/${objecttype}s.sql
##sqldump.mainoutputfilepattern=${outputdir}/${schemaname}_${objecttype}_${objectname}.sql
#sqldump.outputobjectwithreferencingtable=index
sqldump.outputfilepattern.maptype.PROCEDURE=EXECUTABLE
sqldump.outputfilepattern.maptype.TRIGGER=EXECUTABLE
sqldump.outputfilepattern.maptype.FUNCTION=EXECUTABLE
sqldump.outputfilepattern.maptype.PACKAGE_BODY=PACKAGE
#sqldump.outputfilepattern.bytype.EXECUTABLE=${outputdir}/EXECUTABLEs.sql
#sqldump.outputfilepattern.bytype.FK=${outputdir}/FKs.sql
#sqldump.outputfilepattern.bytype.INDEX=${outputdir}/INDEXes.sql
#sqldump.outputfilepattern.bytype.GRANT=${outputdir}/GRANTs.sql
#sqldump.outputfilepattern.bytype.SEQUENCE=${outputdir}/SEQUENCEs.sql
#sqldump.outputfilepattern.bytype.SYNONYM=${outputdir}/SYNONYMs.sql
#sqldump.outputfilepattern.bytype.PACKAGE=${outputdir}/PACKAGEs.sql

sqldump.deleteregularfilesfromdir=${outputdir}

#sqldump.doqueriesdump=true
sqldump.schemagrab.grabclass=JDBCSchemaGrabber

#sqldump.dumpschemapattern=public

sqldump.processingclasses=xtraproc.ModelSQLIdTransformer
#, xtraproc.StatsProc

sqldump.proc.sqlidtransformer.decorator=tolower

sqldump.doschemadump=true
sqldump.schemadump.dumpclasses=SchemaModelScriptDumper, JAXBSchemaXMLSerializer, \
	graph.Schema2GraphML, mondrianschema.MondrianSchemaDumper, xtradumpers.DropScriptDumper
sqldump.doschemadump.grants=true
sqldump.doschemadump.fks=true
sqldump.doschemadump.fks.atend=true
sqldump.doschemadump.pks=true
sqldump.doschemadump.ignoretableswithzerocolumns=true
#sqldump.schemadump.dumpdropstatements=false
#sqldump.schemadump.quoteallsqlidentifiers=true

sqldump.doschemadump.recursivedumpbasedonfks=true
sqldump.doschemadump.recursivedumpbasedonfks.deep=true

# sqldump.dbspecificfeatures.grabindexes may be used instead of sqldump.doschemadump.indexes (really better performance on oracle)
sqldump.doschemadump.indexes=true
sqldump.dumpwithschemaname=false
sqldump.fromdbid.autodetect=true
#sqldump.todbid=oracle

sqldump.sqltypes.ignoreprecision=SMALLINT,INTEGER
#sqldump.sqltypes.ignoreprecision=SMALLINT,BIGINT,INTEGER

sqldump.usedbspecificfeatures=true
sqldump.dbspecificfeatures.grabindexes=true
sqldump.dbspecificfeatures.grabexecutables=false
sqldump.dbspecificfeatures.grabviews=false
sqldump.dbspecificfeatures.grabtriggers=false
sqldump.dbspecificfeatures.grabsynonyms=false
sqldump.dbspecificfeatures.grabsequences=false
#sqldump.dbspecificfeatures.grabextraconstraints=false

sqldump.dbspecificfeatures.sequencestartwithdump=false
sqldump.dbspecificfeatures.grabfkfromuk=true

# TODO: nao pega colunas dos synonyms? 
sqldump.dumpsynonymastable=true
sqldump.dumpviewastable=true

sqldump.graphmldump.outputfile=${outputdir}/tse-model.graphml
sqldump.graphmldump.showschemaname=false
#sqldump.graphmldump.showconstraints=true
#sqldump.graphmldump.nodeheightbycolsnumber=false
sqldump.graphmldump.addschemastereotype=false
sqldump.graphmldump.addvertextypestereotype=true

sqldump.graphmldump.edgelabel=COLUMNS
#sqldump.graphmldump.edgelabel=FK|FKANDCOLUMNS|COLUMNS|NONE
#sqldump.graphmldump.edgelabel=FkName|FkAndColumnNames|ColumnNames

sqldump.xmlserialization.jaxb.outfile=${outputdir}/tse-model.jaxb.xml

sqldump.mondrianschema.outfile=${outputdir}/tse-mondrianschema.xml

sqldump.mondrianschema.xtrafacttables=tse_candidatos_bens, tse_candidatos
sqldump.mondrianschema.schemaname=Eleicoes BR
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.table@tse_candidatos_bens.xtrafk=seq_candidato:public.tse_candidatos:seq_candidato:candidatos_bens_fk
sqldump.mondrianschema.table@tse_candidatos.xtrafk=id_partido:public.tse_partidos:id_partido:cand_partido_fk

# jdbc connection.getcolumns and case sensitivity
# https://groups.google.com/group/h2-database/browse_thread/thread/ce333e62d88b585c
# jdbc:h2:~/temp/test3;database_to_upper=false 

sqldump.mondrianschema.level@tse_candidatos.levelnamecol=nm_candidato
sqldump.mondrianschema.level@tse_cargos.levelnamecol=ds_cargo
sqldump.mondrianschema.level@tse_detalhe_secao.levelnamecol=ds_secao_comparecimento
sqldump.mondrianschema.level@tse_municipios.levelnamecol=nome_municipio
sqldump.mondrianschema.level@tse_partidos.levelnamecol=nm_partido
sqldump.mondrianschema.level@tse_partidos_cons.levelnamecol=nm_partido
sqldump.mondrianschema.level@tse_politicos.levelnamecol=nm_candidato
sqldump.mondrianschema.level@tse_secoes.levelnamecol=ds_secao
sqldump.mondrianschema.level@tse_situacao_candidato.levelnamecol=ds_situacao_candidato
sqldump.mondrianschema.level@tse_tipos_bens.levelnamecol=ds_tipo_bem
sqldump.mondrianschema.level@tse_ue_cons.levelnamecol=descricao_ue
sqldump.mondrianschema.level@tse_unidade_eleitoral.levelnamecol=descricao_ue

#sqldump.mondrianschema.cube@tse_secao_comparecimento.measurecols=qtd_aptos, qtd_faltosos, qtd_comparecimento
#sqldump.mondrianschema.cube@tse_secao_comparecimento.degeneratedims=cd_tipo_origem_voto, tp_eleicao, ds_tipo_urna

#sqldump.mondrianschema.cube@fato_tse_votos_bweb.measurecols=qtd_votos
#sqldump.mondrianschema.cube@fato_tse_votos_bweb.degeneratedims=cd_tipo_origem_voto, tp_eleicao

sqldump.mondrianschema.cube@tse_candidatos_bens.degeneratedims=ano_eleicao, sigla_uf
#, 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.addmeasures=seq_candidato:distinct-count:cand_count

sqldump.mondrianschema.cube@tse_candidatos.degeneratedims=ano_eleicao, valido, cd_ocupacao_candidato:ds_ocupacao_candidato, cd_sexo:ds_sexo, cd_grau_instrucao:ds_grau_instrucao, cd_estado_civil:ds_estado_civil, cod_sit_tot_turno:desc_sit_tot_turno, cd_nacionalidade:ds_nacionalidade   
sqldump.mondrianschema.cube@tse_candidatos.measurecols=despesa_max_campanha
#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
sqldump.mondrianschema.cube@fato_tse_votacao.measurecols=qtd_votos

sqldump.mondrianschema.cube@tse_detalhe_secao.degeneratedims=ano_eleicao, num_turno
sqldump.mondrianschema.cube@tse_detalhe_secao.measurecolsregex=qtd_.* | qt_.*
#sqldump.mondrianschema.cube@tse_detalhe_secao.measurecols=qtd_aptos, qtd_comparecimento, qtd_abstencoes, qt_votos_nominais, qt_votos_brancos, qt_votos_nulos, qt_votos_legenda, qt_votos_anulados_apu_sep

sqldump.mondrianschema.cube@tse_pc_receitas_cand.degeneratedims=uf, sigla_partido, cargo, cpf_candidato, cpf_cnpj_doador, tipo_receita, fonte_recurso, especie_recurso
sqldump.mondrianschema.cube@tse_pc_receitas_cand.measurecols=vl_receita

sqldump.mondrianschema.cube@tse_perfil_eleitorado.degeneratedims=uf, pais, cd_municipio:nm_municipio, nr_zona, sexo, faixa_etaria, grau_instrucao
sqldump.mondrianschema.cube@tse_perfil_eleitorado.measurecols=qtd_eleitores

#sqldump.mondrianschema.level@xxx.levelpropcols=abc,def
#sqldump.mondrianschema.cube@xxx.ignoremeasurecols=xxx,yyy

#sqldump.dropscriptdumper.outfilepattern=${outputdir}/drop-script.sql
sqldump.dropscriptdumper.outfilepattern=${outputdir}/drop-${objecttype}-script.sql

############

#sqldump.driverclass=org.postgresql.Driver
#sqldump.dburl=jdbc:postgresql://localhost/tse
#sqldump.user=postgres
#sqldump.password=postgres

#sqldump.driverclass=org.postgresql.Driver
#sqldump.dburl=jdbc:postgresql://localhost/tse
#sqldump.dburl=jdbc:postgresql://${dadostse.conn.dw.server}:${dadostse.conn.dw.port}/${dadostse.conn.dw.database}
#sqldump.driverclass=org.h2.Driver
#sqldump.dburl=jdbc:h2:tcp://localhost/tse

sqldump.driverclass=${dadostse.conn.dw.CUSTOM_DRIVER_CLASS}
sqldump.dburl=${dadostse.conn.dw.CUSTOM_URL}

sqldump.user=${dadostse.conn.dw.username}
sqldump.password=${dadostse.conn.dw.password}