Skip to content
Snippets Groups Projects
Commit 80095fb3 authored by gabriellisboaconegero's avatar gabriellisboaconegero
Browse files

fix: Using non local monetdb database

Mapear o arquivo que está na maquina local para a que esta na maquina/container do monetdb
parent 1f836501
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,8 @@ def temporary_data(connection, file_name, table, year, offset=2,
ttable = table.get_temporary(header, year)
ttable.create(bind=connection)
file_name = settings.db_env_file_path(file_name)
print("TESTE: ", file_name)
table.populate_temporary(ttable, file_name, header, year, delimiters, null, offset, bind=connection)
table.apply_derivatives(ttable, ttable.columns.keys(), year, bind=connection)
......
......@@ -21,19 +21,22 @@ along with HOTMapper. If not, see <https://www.gnu.org/licenses/>.
'''Settings used by the database module'''
import logging
def db_env_file_path(file_name):
return file_name.replace('glc22', 'monetdb')
# SQL dialect used by sqlalchemy.
DATABASE_DIALECT = 'monetdb'
# Login credentials in database
DATABASE_USER = 'monetdb'
DATABASE_USER_PASSWORD = 'monetdb'
DATABASE_USER_PASSWORD = '12345'
# Host to connect to. Bulk inserts won't work remotely unless you can specify an
# absolute path in the server
DATABASE_HOST = 'localhost'
# Database to connect to
DATABASE = 'hotmapper_demo'
DATABASE = 'treinamento'
# Column used to run aggregations and denormalizations
YEAR_COLUMN = 'ano_censo'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment