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.


After seeing the customers using CARTO.js v4 in the wild, we’ve realized that they struggle when it comes to filtering sources. Right now, they have to add helper functions to translate their widgets filters to a source node. This doesn’t scalate.

We need to add another object to ease source nodes filtering:

  • Filter by category, like in SELECT * FROM wadus WHERE hood IN ['brooklyn', 'queens].
  • Filter by range, like in SELECT * FROM wadus WHERE price >= 34 AND price <= 100

Source nodes should be allowed to be filtered by several filters. The way to do it and what do we allow (ANDs, ORs) is to be discussed in the task of API definition.


  • Define the API: define the API first and ask the team for review. Respect the existing API style.
  • Implement filtering to source nodes. Use wrapping* to enable filtering in complex SQL source nodes.
  • Specs.
  • Add documentation:
    • Reference docs in JSDoc.
    • New example.
    • Revamp / upgrade existing references to filtering. The most likely place to add help about this is in dataviews docs.
  • Add example in examples section.

### Remarks

  • Respect existing API:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (17 by maintainers)

github_iconTop GitHub Comments

stevelewis99commented, Jul 2, 2018

This looks totally awesome, everyone. VAMOS!

rubenmoyacommented, Jul 10, 2018

Available in version 4.0.16 🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Defining Source Filters - Oracle Help Center
Source filters enable you select a dimension, and then enter filter criteria for each dimension. You can define source filter options to specify...
Read more >
Industrial Filtration Systems | Drinking Water Systems | Filter ... is a one-stop-shop in the industrial market for all of your air, gas, oil, water and chemical filtration needs. Online ordering since...
Read more >
Using source filters - AWS Database Migration Service
You can use source filters to limit the number and type of records transferred from your source to your target. For example, you...
Read more >
perlfilter - Source Filters - Perldoc Browser
A source filter is a special kind of Perl module that intercepts and modifies a source stream before it reaches the parser. A...
Read more >
Source–filter model - Wikipedia
The source–filter model represents speech as a combination of a sound source, such as the vocal cords, and a linear acoustic filter, the...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found