Code Monkey home page Code Monkey logo

Comments (2)

krishnanraman avatar krishnanraman commented on May 14, 2024

I tried the following for the problem I'm facing -
I have a large pipe, with 2 columns - say the columns are 'advertiser_id, 'bids
Say I limit to 100 rows
Now I will have a datafile that has 100 rows & 2 columns
I want each row to go into its own Tsv whose name is the entry in 'advertiser_id of that row.
I try writing to 100 files in a map & its fails with npe because flowdef is null.

But how about I put the datafile in a matrix, transpose to get a 2 row 100 column matrix.
Now run a map & filter on the column-name, and return a pipe that contains the bids for that advertiser.
Since there are exactly 100 pipes, just iterate over the pipes in a regular for loop & write to the sinks.
This works locally for small number of columns...without needing PailSource or TemplateTap.

Is this a scalable solution ?

from scalding.

johnynek avatar johnynek commented on May 14, 2024

I think this is going to be much more computationally expensive, but I don't really know.

This is exactly the problem that Pail is supposed to solve, so I really think we should investigate it.

By the way, next year, we will start sharding our processed logs more by column data, so we have to start using Pail more, as far as I can see. I think now is the time to adopt it more widely.

PS: Sam Ritchie can help you get started on your first Pail source.

from scalding.

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.