question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[OBS] Boundaries query templates need parenthesis fix

See original GitHub issue

While resolving some questions about OBS functions and integration we found out an issue with one of the query templates. These templates with the OR clause:

https://github.com/CartoDB/cartodb/blob/d8614f137cab6980a9fe8fd18f5d6a833ec98a66/lib/assets/core/javascripts/cartodb3/data/data-observatory/boundaries-collection.js#L5-L11

shall include parenthesis to enforce the correct precedence:

SELECT * FROM OBS_GetAvailableGeometries(
  ST_MakeEnvelope(-74, 41, -73, 40, 4326),
  NULL,
  <numer_id>,
  <denom_id>, 
  <timespan_id>
) denoms
WHERE valid_numer IS TRUE
 AND (valid_denom IS TRUE OR <denom_id> IS NULL) -- edited
 AND valid_timespan IS TRUE

as explained in https://github.com/CartoDB/dataservices-api/issues/370#issuecomment-303959407

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
nobuticommented, May 29, 2017

Yes, internally denom_id is normalize 😃

0reactions
xavijamcommented, Jun 19, 2017

Could we close this then?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Question / Help - Red border around sources | OBS Forums
When you select a source it shows the boundaries or borders with a red border ... Just click on one side and drag...
Read more >
Customizing OC Output With Go Templates
This is a self-led workshop to demonstrate the power of Go templates and how much fun you can have while using them with...
Read more >
Query Builder API | Adobe Experience Manager
The functionality of the Asset Share Query Builder is exposed through a Java API and a REST API.
Read more >
Search templates | Elasticsearch Guide [8.5] | Elastic
A search template is a stored search you can run with different variables. If you use Elasticsearch as a search backend, you can...
Read more >
Running parameterized queries | BigQuery - Google Cloud
To use an array type in a query parameter set the type to ARRAY<T> where T is the type of the elements in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found