ODM2 / ODMToolsPython

ODMTools is a python application for managing observational data using the Observations Data Model. ODMTools allows you to query, visualize, and edit data stored in an Observations Data Model (ODM) database.ODMTools was originally developed as part of the CUAHSI Hydrologic Information System.
BSD 3-Clause "New" or "Revised" License
31 stars 15 forks source link

Get error when I connect to PostgreSQL database #317

Open miguelcleon opened 7 years ago

miguelcleon commented 7 years ago

When I try to connect to an ODM2 database in PostgreSQL I get an error:

(ERROR) frmDBConfig:validateInput(104) - (psycopg2.ProgrammingError) relation "Variables" does not exist
LINE 1: Select "VariableCode" From "Variables" Limit 1

[SQL: Select "VariableCode" From "Variables" Limit 1']

This looks like a check that the ODM2 database is valid.

If the SQL was select variablecode from variables limit 1 it would work.

miguelcleon commented 7 years ago

This also works Select "variablecode" From "variables" Limit 1

I think this is a problem in that there is a mismatch between the table and column names this produces https://github.com/ODM2/ODM2/blob/master/src/blank_schema_scripts/postgresql/ODM2_for_PostgreSQL.sql and what is expected here.

miguelcleon commented 7 years ago

looks like the identifiers should just not be quoted so that PostgreSQL can ignore the case.

http://stackoverflow.com/questions/27434633/psycopg2-cannot-find-any-tables-after-connection

miguelcleon commented 6 years ago

@horsburgh This is the problem I'm still having that I mentioned at the meeting last month.