Comments (8)
I will likely need something like this for time-series dataframes as well. I haven't thought very deeply about how to organize this yet. I may not do much thinking on this for the next couple weeks.
from streamz.
Great (to the need it as well)!
Another option is to include the metadata with the data and scrape the metadata off before doing the transformation and then putting it back on before emitting (but this seems a bit messier although this does offer up the option of combining data and metadata).
from streamz.
Sounds good. Sounds like there are two main ideas bounced around (correct me if I'm wrong):
- Metadata and data are packaged together in stream
- Data goes through stream, but metadata is kept in a separate place
I personally vote for the first. That's what we currently do with our streamdoc, which is basically a dictionary with args
, kwargs
and attributes
elements (among other things). The parsing is done by a decorator which decorates each mapped function here. The application of this decorator is here (where this decorator is renamed to psdm
). I apologize how messy it is but it is working for now. We're not completely settled on this idea.
I think handling all this is extremely messy from my perspective, and would suggest it not to be handled by the baseclass. Perhaps one could imagine making it a Mixin
or something? (If possible) Just throwing ideas out there.
from streamz.
Hmm I didn't think of 2. I was thinking of having metadata-data-metadata-... and then having the streams nodes (potentially including the base class) behave differently for data and metadata.
from streamz.
PS: as an alternative to pandas
, xarray
could also be convenient. See here
from streamz.
One interesting side effect of this would be that we could potentially use this to manage our exceptions as well. We could:
- Create a blacklist of types which operators (map, filter, accumulate, etc.) just ignore and include the metadata and exception classes in this list.
- Upon exception turn the data into metadata (with a whole bunch of info on why/how/when it failed) now all the operators ignore the bad data.
One nasty side effect of this is that we need to make sure that we don't pair data and metadata together in the joining nodes (zip, zip_latest, combine_latest) as the operators would be confused.
from streamz.
It sounds like this is trending toward a heterogeneous stream of data. I would argue that this may be out of scope of streamz
and may add more complexity that is not well understood yet (not enough use cases). Sounds like shed attempts to answer that. (Schematic here )
One thing I think could be useful here is multichannel streams. Something like data.data
would be the regular channel passed on to the stream and data.md
or data.anything
could be other channels. But one could argue this can be accomplished with a different data type and function handling it properly (like xarray
). I would disagree with putting multichannel streams in base class as well.
from streamz.
I think this has been handled some by #306 adding timestamp metadata could be done by the source. Another potential iteration would be to have metadata
functions that return dicts
and are passed in whatever data/metadata is applicable into the node, generating new metadata on the way out.
from streamz.
Related Issues (20)
- missing positional argument: 'topic' in to_mqtt HOT 5
- How to parametrize stream/pipeline creation? HOT 2
- Passing Username and Password to from_mqtt() HOT 4
- Dynamically add upstreams to zip HOT 2
- Dropping `pkg_resources`
- AttributeError: 'Output' object has no attribute '_ipython_display_' HOT 3
- flatten doesn't work with iterables without defined length HOT 2
- visualizing streams and changing variables during runtime HOT 5
- Is it possible to use event time/syntethic time rather than system time? HOT 2
- Time based lookback window? HOT 1
- Streamz not working in Jupyterlite
- Collect does not allow awaitable sinks
- Quickstart lacks conda/environments/streamz_dev.yml HOT 6
- Hello from LorryStream and Kotori / Streamz is cool HOT 1
- Add pytest fixture to clean up the IO loop HOT 4
- Streamz hvplot resets zoom and pan on each update HOT 3
- streamz's typing system can't work properly in vscode HOT 2
- Streamz with websocket not steaming any data HOT 5
- Parallel streams with buffers HOT 3
- Is streamz not maintained anymore? What happened to cuStreamz? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamz.