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.

[DO - enrichment] variable references in aggregation

See original GitHub issue

Comes from

One thing I find confusing is how the agg_operators part works. When there are no aggregation operators specified it’s pretty clear (use the default, if available in the metadata agg_method field).

However, I find it weird that the user has to refer to a variable by slug (or ID, I suppose) but then specify the aggregation using the variable’s column_name as the dictionary key. I think this has several drawbacks:

  • I understand we specify variables to enrich (instead of full datasets) to allow enriching with variables from different datasets. But what if the variables have the same column_name in their respective datasets? For example, if I were to enrich my geometry with two population columns from different datasets (both called `pop), in order to compare them…

  • If I already know the slug (which uniquely identifies a variable), why not just use that for the agg_operators dict, too? Of course, that would imply looking up the proper column ID in the metadata (but we’re already doing that).

  • It’d be nice to be able to specify several aggregation functions for a single variable (just like Pandas does). In this case, we’d have to differentiate them somehow (maybe adding a {func}_ prefix?)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

oleurudcommented, Nov 12, 2019

^ yeah! that’s is perfect IMO

oleurudcommented, Nov 14, 2019


Read more comments on GitHub >

github_iconTop Results From Across the Web

Variables in Aggregation Expressions — MongoDB Manual
Aggregation expressions can use both user-defined and system variables. ... If the variable references an object, to access a specific field in the...
Read more >
Enrich (Analysis)—ArcGIS Pro | Documentation
ArcGIS geoprocessing tool that enriches data by adding demographic and landscape facts about the people and places that surround or are inside data ......
Read more >
Enrich your data | Elasticsearch Guide [8.5] | Elastic
An index which stores enrich data you'd like to add to incoming documents. You can create and manage these indices just like a...
Read more >
Advanced Techniques: Reference Stored Values in Variables
You can reference several different types of variable in your analyses, dashboards, and actions: session, repository, presentation, request, ...
Read more >
A Bayesian latent variable approach to aggregation of partial ...
Bayesian Aggregation of Rank Data (BARD) assigns aggregated ranks based on ... In genomic applications, the underlying variable can be some ...
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