You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if I have missed something since the documentation is very limited up to now. I would consider it one of the most important features of a tool like dataplane to not only create nodes once (e.g. a python code block) but being able to reuse this node in other pipelines as well.
To do that, we would need something like a central library to look for existing nodes so that you could drag&drop them into your pipeline in the same way as you do it for processors right now, but instead of being empty or with the default "print("Node-ID")" statements it would contain the code that was already written in another pipeline.
Ideally, you would also have some git integration for that, because if you write a significant amount of code, you surely want it to be versioned. Presumably, you could simulate that by running a bash script to clone a git repository and execute it, but than you loose the advantage of the built-in editor.
Hi there @renepeinl these are good points. Slowly but surely, I keep adding to the documentation so any feedback on that front is welcome. We are looking into import/export as well as git integration. Reusable nodes is an interesting concept that hasn't been raised before, I can definitely look into that. I know it is a bit painful to copy and paste the same code all the time.
We use python libraries to centralise all our code and to have reusable components. Happy to write up some documents on how to do that if that works for you? You can import your own private python packages. I am developing some Dataplane python libraries with recipes to help reduce the amount of code one needs to keep writing. I haven't updated our documentation to reflect this as yet - I am still testing the package but you can find it over here:
+1 for reusable nodes. As my use case is a lot of modules that need to be shared between pipelines.
Also looking for some easy way to share data between python modules. Looked at the documentation, but couldn't find anything there. Something like this maybe:
The first question about reusable nodes, I am busy looking into a solution and I agree will be useful for teams.
The second question about transferring variables between nodes is available, I need to still update the documentation. It is how you transfer data between pipeline steps in general.
If the data is large use the S3 method and for small and fast moving data use the Redis method as follows:
fromdataplaneimportpipeline_redis_storeredisConnect=redis.Redis(host=redis-service, port=6379, db=0)
data=“myvalue”
# Store the data with key hellors=pipeline_redis_store(StoreKey="hello", Value=data, Redis=redisConnect, Expire=True, ExpireDuration=timedelta(minutes=15))
Activity
saul-data commentedon Oct 24, 2022
Hi there @renepeinl these are good points. Slowly but surely, I keep adding to the documentation so any feedback on that front is welcome. We are looking into import/export as well as git integration. Reusable nodes is an interesting concept that hasn't been raised before, I can definitely look into that. I know it is a bit painful to copy and paste the same code all the time.
We use python libraries to centralise all our code and to have reusable components. Happy to write up some documents on how to do that if that works for you? You can import your own private python packages. I am developing some Dataplane python libraries with recipes to help reduce the amount of code one needs to keep writing. I haven't updated our documentation to reflect this as yet - I am still testing the package but you can find it over here:
Install python packages
https://learn.dataplane.app/installing-python-packages
Dataplane python package
https://pypi.org/project/dataplane/
fyodorr commentedon Dec 28, 2022
+1 for reusable nodes. As my use case is a lot of modules that need to be shared between pipelines.
Also looking for some easy way to share data between python modules. Looked at the documentation, but couldn't find anything there. Something like this maybe:
Python node1: dataplane.export.variable1 = value;
Python node2: $variable1
And in GUI:
saul-data commentedon Dec 28, 2022
@fyodorr thanks for the suggestion.
The first question about reusable nodes, I am busy looking into a solution and I agree will be useful for teams.
The second question about transferring variables between nodes is available, I need to still update the documentation. It is how you transfer data between pipeline steps in general.
If the data is large use the S3 method and for small and fast moving data use the Redis method as follows:
Install dataplane python package in the code editor: https://pypi.org/project/dataplane/
Sending node
Receiving node