Skip to content
Snippets Groups Projects
Forked from PortalMEC / portalmec
Source project has a limited visibility.
user avatar
authored
user avatar
The easiest way to insert expenses data is to use 'insert_register_payment.sh'.

Script's input: Year and Month from CSV file, ElasticSearch's user and password.
The script also uses a config file named 'config.sh'. This is a small shell script that need to only declare some variables: index, host, filter and universities:
- Index: The index prefix to be saved on ElasticSearch.
- Host: The hostname of the machine runnning ElasticSearch.
- Filter: An array of n values, that will create n indexes in ElasticSearch, each one filtering data from Portal Transparencia using its corresponding string. Ex: "UNIVERSIDADE FEDERAL DO PARANA"
- University: An array of n values, with n being the same n as Filter's array. This array should contain the initials from Universities declared in Filter array, in the same order.

Example (inserting data from file 20130930_Cadastro.csv): ./insert_register_payment.sh 2013 09 myuser mypassword
If you want to look at more examples, check add_registers.sh.

The other script's will be called by 'insert_register_payment.sh' correctly.