Giter Club home page Giter Club logo

marklogic-community / pipes Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 1.0 111.87 MB

Pipes for MarkLogic DataHub is visual programming tool for MarkLogic Data Hub. It integrates with MarkLogic's Datahub and produces custom code step(s) using a no-code UI environment.

Home Page: https://marklogic-community.github.io/pipes/

License: Other

JavaScript 86.29% Dockerfile 0.01% Shell 0.19% HTML 0.06% CSS 0.46% Java 4.24% Vue 8.68% Batchfile 0.04% Stylus 0.03%
marklogic marklogic-data-hub pipes data-integration litegraph transform-data

pipes's Introduction

Pipes for MarkLogic DataHub

What is it?

A visual programming tool for MarkLogic. It integrates with the MarkLogic Data Hub and produces the code for a Custom Step using a no-code UI environment.

Pipes for MarkLogic DataHub is a community tool. As such, it is not supported by MarkLogic Corporation and is only updated and corrected based on a best-effort approach. Any contribution or feedback is welcomed to make the tool better.

I just want to run it

Please read here the documentation here:

https://marklogic-community.github.io/pipes/

I'd like to contribute to Pipes

Great! You should get in touch with the Pipes team to discuss your contribution. On this page you can learn how to run and debug Pipes locally:

https://github.com/marklogic-community/pipes/wiki/Run-and-debug-Pipes-locally

pipes's People

Contributors

danielholgate avatar dependabot[bot] avatar epoilvet avatar grtjn avatar jeremybrunetml avatar josvanroosmalen avatar kgmanuel avatar peetkes avatar sashamitrovich avatar stuartmoorhouse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kghmanuel

pipes's Issues

Use Graph title when saving

Graphs/Steps have a "Title" (left panel), but when you "Save graph" the dialog asks for a name to save the Graph under.

Screen Shot 2020-01-27 at 09 50 46

Two enhancements around this:

  1. Save dialog should use the "title" as default value in the pop up. Users can then change/modify this at save time and changes in popup also update the Title.
  2. Using an existing (in DB) graph name should pop up a warning before save to ensure user is aware they'll overwrite

Remove duplicates core.sjs

Core.sjs is now duplicated 2-3 times in the project. This should be removed. For the faster engine (#40) we need to 1 core.sjs. Can you please prioritize this?

DHF core collections shouldn't be available in Pipes dropdowns

Collections such "http://marklogic.com/entity-services/models", "http://marklogic.com/data-hub/flow" etc are used by DHF to store flows, steps and other configurations.
Currently Pipes displays every collection in drop downs (when you create a block or execute a graph) but we don't want to let users accidentally pull documents from these collections, or write into them, at the risk of corrupting a DHF project.
Solution is to filter out collection names starting with the "http://marklogic.com"

Make geo/GeoProject function generic

Currently geo/GeoProject function returns hardcoded WKT LINESTRING.

Should use input geometry type as return type e.g. POINT, LINESTRING, POLYGON and MULTI... variations.

WKT geometric objects support after this improvement:
POINT
LINESTRING
POLYGON <- Only simple polygon without hole

Not supported:
POLYGON <- Polygon with hole
MULTIPOINT
MULTILINESTRING
MULTIPOLYGON <- Multipolygon without or with hole
GEOMETRYCOLLECTION
TRIANGLE
TIN
POLYHEDRALSURFACE
POINT ZM <- Point with
POINT M <- Point with
POINT EMPTY <- Empty geometry object
MULTIPOLYGON EMPTY <- Empty geometry object

Examples:

Supported:
POINT (30 10)
LINESTRING (30 10, 10 30, 40 40)
POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) <- Only simple polygon without hole

Not supported:
POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30)) <- Polygon with hole
MULTIPOINT ((10 40), (40 30), (20 20), (30 10))
MULTIPOINT (10 40, 40 30, 20 20, 30 10)
MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))
MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))
MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20))) <- Multipolygon with hole
GEOMETRYCOLLECTION (POINT (40 10), LINESTRING (10 10, 20 20, 10 40), POLYGON ((40 40, 20 45, 45 30, 40 40)))

See https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry

Add support for javascript reprojection libraries like RDNAPTRANS and PROJ6 so you can choose between online (Esri) service or local library.
For big data sets might be better to convert outside DHF/Pipes

As a user, I'd like to be able to log into Pipes using a log-in form instead of specifying the credentials in application.properties

Possible changes:

  • don't assume default values if application.properties username and password are not provided
  • they can still be provided in which case the log-in form can be skipped
  • log in form
  • username in upper right corner (?) as information
  • log out button - could be available if clicked on the username, see previous (?), regardless how user signed in (using properties or log-in form)

@danielholgate, @epoilvet , what do you think about proposed changes?
It's a request from @michelderu

Add XPath block

Add XPath block. Widgets: XPath + Namespaces. Input: node, output: nodes.

Write a High Performance Execution Engine

I can work on a high performance Execution Engine. I have some background in compiler/language design, so I can help with this ;-).

I first will play around with Pipes for the coming week for a POC, and we first need to collaborate on ideas/requirements.

I think the best way is to write a SJS code generator, which converts the model in native SJS code. An alternative is converting the model to an Intermediate Code which then requires an interpreter on top of SJS, which cost extra development work and does not add anything because SJS is already portable etc.

I see that execution of the code is relatively isolated, so the code generator generated code should have the same input/output to make it a (relatively easy) drop-in-replacement.

Error starting Pipes on Windows

Windows 10, Java SE Runtime Environment (build 1.8.0_171-b11)

Starting Pipes throws an exception:

`java -jar marklogic-pipes-0.8.1579126868.jar

20:00:00.808 [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restTemplate' defined in class path resource [com/marklogic/pipes/ui/ClientConfig.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.client.RestTemplate]: Factory method 'restTemplate' threw exception; nested exception is java.lang.NumberFormatException: null
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:484)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at com.marklogic.pipes.ui.Proxy.main(Proxy.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.client.RestTemplate]: Factory method 'restTemplate' threw exception; nested exception is java.lang.NumberFormatException: null
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
... 27 common frames omitted
Caused by: java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.marklogic.pipes.ui.ClientConfig.restTemplate(ClientConfig.java:72)
at com.marklogic.pipes.ui.ClientConfig$$EnhancerBySpringCGLIB$$48defcbf.CGLIB$restTemplate$1()
at com.marklogic.pipes.ui.ClientConfig$$EnhancerBySpringCGLIB$$48defcbf$$FastClassBySpringCGLIB$$8a57712b.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
at com.marklogic.pipes.ui.ClientConfig$$EnhancerBySpringCGLIB$$48defcbf.restTemplate()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 28 common frames omitted`

Allow Source Blocks to be created from DHF Custom Step details

The fields which can be selected when creating Source Blocks should be inspected from a user-selected DB & Collection (Default), or alternatively from those in a pre-existing DHF Custom Step.

Add a selector between these two options and hide/show db and collection dropdowns etc

Clean/check parameters in application.properties

A few problems have been reported recently which were caused by a trailing space which had been accidentally copy/pasted after either the credentials or the DHF path in application.properties.

Properties should be trimmed so Pipes still works despite these. Possibly also alert the user on the console to the problem so they can correct, but still go ahead and start up with the trimmed values

Restrict file upload to relevant types

When going to FROM FILE I can select any kind of document. E.g. when I pick a PDF and PNG it looks like they get 'uploaded'. Not sure if there is any negative impact but might make sense to restrict to certain file types?

image

Support Gradle properties files

It would be nice if Pipes could run in Gradle properties mode eg:

java -jar *pipes.jar -gradleMode -environmentLabel=mydocker

This should read properties from gradle.properties and override by gradle-docker.properties.

I can take care of the impl.

Tx

Reloaded blocks not available in graph

When a block is reloaded from the database the details appear in the "Source Blocks" panel but the block does not appear in the Library (right click) within the graph

Working with Entities: notification for a block when underlying Entity changes

At the moment, Entity blocks are fixed at creation time.

Is there a preferred way to work with Entities getting updated in Pipes? Say you add new property to an Entity, do you have to create another block first, remove existing from graph, and redo connecting new block with input output? Or are there other options? Similar question for removing or editing Entity properties.

An enhancement would be to notify users when an entity underlying a block changes. This would at least make user aware and give him possibility to act -> manually recreate it.. Auto-recreating/updating the block could be problematic because properties could disappear or be renamed and would break existing connections. But doing nothing for updated entities will break the graph too?

Ideally, Pipes should draw a warning sign on an Entity block if it notices that the Entity definition in DHF has changed. This could be triggered by re-loading the graph. Depending on change automated actions could be executed.

Block creation screen UI improvements

The block creation form needs clean up to fix a few quirky behaviors and give better feedback to users:

  • Add validation of custom field names (cannot be empty/null, must be valid json property name, maximum property lengths?)
  • Validation of block names (non-null, remove unsupported characters etc)
  • Reset fields/form after successful save
  • Currently has two "Create Block" fields and buttons at top + bottom : Just one seems cleaner
  • Instead of current adding "- already saved" to block name after save, add an icon which indicates it has been saved
  • Define use case for re-loading/editing blocks and change form as appropriate. Should blocks ever be editable after creation?
    Misc other small UI glitches around data entry here

Pipes is throwing away Exceptions

Error Handling is not very good in Pipes. The Java Middle Tier is throwing away Exceptions. I will create a branch, fix this and create a pull request.

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.