Giter Club home page Giter Club logo

Comments (6)

gastil avatar gastil commented on July 20, 2024

from lter-core-metabase.

twhiteaker avatar twhiteaker commented on July 20, 2024

SiteName is required, so there should always be at least the site name in geographicdescription. Therefore, I think the view should have something like an if-else statement that says,

If SiteDesc isn't null, then use SiteName: SiteDesc; otherwise, use SiteName.

from lter-core-metabase.

gastil avatar gastil commented on July 20, 2024

Not if/else. Use coalesce. There are complex situations that do warrant if/else but this is not one of them. The coalesce() function is built for this purpose.

from lter-core-metabase.

twhiteaker avatar twhiteaker commented on July 20, 2024

So then, how about this:

COALESCE(s."SiteName" || ': ' || s."SiteDesc", s."SiteName") AS geographicdescription;

from lter-core-metabase.

gastil avatar gastil commented on July 20, 2024

--or
s."SiteName" || coalesce(': '||s."SiteDesc",'');
-- if that is the output you want, SBC style. For MCR, I'll go with the following
coalesce(s."SiteDesc",s."SiteName");
-- since in my instance my SiteNames are redundant to the first bit of the description. That is, all my descriptions begin with something like 'LTER 1 is...' so putting 'LTER 1: LTER 1 is...' is bad. YMMV.

from lter-core-metabase.

twhiteaker avatar twhiteaker commented on July 20, 2024

In the official repo, will you please put one or the other or your suggested solutions? Either one is better than what is currently there. We can explain how those fields are used in the documentation.

from lter-core-metabase.

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.