GithubHelp home page GithubHelp logo

Comments (4)

JessyBarrette avatar JessyBarrette commented on July 21, 2024

@fostermh any idea how to handle that. I'm not 100% sure but it seems like we may have to define a method to cast those ctd.qartod_flag_type to integers?

from hakai-datasets.

fostermh avatar fostermh commented on July 21, 2024

ctd.qartod_flag_type is a domain of integers so try casting the 'smallint' part to 'int' If you have an example sql query I can confirm how it should be writen.

from hakai-datasets.

JessyBarrette avatar JessyBarrette commented on July 21, 2024

Based on some exchanges with @fostermh, _flag_level_1 columns in the hakai databases are saved as ENUM of strings:
Running the following queries gives us the assoicated errors:

SELECT x.* FROM ctd.ctd_data x
where salinity_flag_level_1 ==1


SQL Error [42883]: ERROR: operator does not exist: qartod_flag_type == integer
  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
  Position: 60
SELECT x.* FROM ctd.ctd_data x
where salinity_flag_level_1 =1

QL Error [42883]: ERROR: operator does not exist: qartod_flag_type = integer
  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
  Position: 60

Error position: line: 2 pos: 59

This query runs successfully

SELECT x.* FROM ctd.ctd_data x
where salinity_flag_level_1 = '1'

from hakai-datasets.

JessyBarrette avatar JessyBarrette commented on July 21, 2024

Changes were applied to the hakaidev database. A local test of a ERDDAP dataset was tested sucessfully as well as a test to the "ctd/process/flags/json" endpoint. All worked sucessfully.

Those changes will be made available in the next release to the hakai database. We can close the issue and reopen if needed.

from hakai-datasets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.