Giter VIP home page Giter VIP logo

Comments (4)

derekperkins avatar derekperkins commented on June 27, 2024

To give a concrete example, we're rolling up raw data like this

CREATE TEMP TABLE domain_agg IF NOT EXISTS AS
SELECT
  requested,
  device_code,
  domain,

  AVG(rank) AS rank,
  SUM(estimated_traffic) AS estimated_traffic,
  CAST(AVG(pixels_from_top) AS INT64) AS pixels_from_top,
  AVG(above_the_fold_percentage) AS above_the_fold_percentage,
  AVG(serp_percentage) AS serp_percentage,

FROM 'http://localhost:3002/mosaic-data.parquet'
GROUP BY requested, device_code, domain
ORDER BY requested, device_code, domain

Given a UI toggle with these three fields available in the parquet file:

  • domain
  • subdomain
  • url

Do we have to make separate subdomain_agg and url_agg temp tables? Is there a way to do that lazily?

from mosaic.

jheer avatar jheer commented on June 27, 2024

Not yet sure if this is best viewed as a Mosaic question or a DuckDB question... at the DuckDB level, maybe take a look at GROUPING_SETS to see if you can build the table you want in a single go and then simply issue filtering queries depending on the desired groupby dimensions?

There is not currently support for dynamic generation of tables in Mosaic itself, but you could do it externally. Other than data loading operations (which are there for convenience and decoupled from all downstream operations) and internally generated data cube indexes, Mosaic doesn't currently generate its own tables.

from mosaic.

derekperkins avatar derekperkins commented on June 27, 2024

Thanks. We're definitely able to handle that dynamic generation from a workflow perspective. Given the issue about adding multi-table support, I wasn't sure if there was a lifecycle requirement we needed to tie into. We're still figuring out where the coordinator ends and DuckDB begins.

from mosaic.

derekperkins avatar derekperkins commented on June 27, 2024

I'll close this issue for now, and once we get a bit deeper, we can contribute to docs and/or examples showing something like this.

from mosaic.

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.