Coder Social home page Coder Social logo

graphyx's Introduction

graphyx

Graphyx is a set of Neo4j connectors for Alteryx:

  • Neo4j Input: Import cypher queries into Alteryx workflows
  • Neo4j Output: Export Alteryx data as Neo4j nodes and relationships
  • Neo4j Delete: Use Alteryx data to define how Neo4j nodes and relationships should be deleted

The engine for the connectors was built using the Alteryx Go SDK and the official Go driver for Neo4j.

The user interfaces were built using Flutter.

Table of contents

  1. Installation
  2. Feedback
  3. Neo4j Input
  4. Neo4j Output
  5. Neo4j Delete

Installation

Download the installer from tools.tlarsendataguy.com. After running the installer, the new tools will be available in the Connectors tab in Designer.

Installation files are also available at tools.tlarsendataguy.com if you are unable to use the installer, or run into issues with the installer.

Back to top

Feedback

Submit any bugs or feature requests using GitHub Issues.

Back to top

Neo4j Input

The Neo4j Input tool is used to import Cypher queries into Alteryx workflows. Cypher is the query language of Neo4j databases.

Overview

The configuration screen of the input tool looks like this:

The top panel contains information needed to connect to the Neo4j database. It can be minimized by clicking the top of the panel.

  • url: The Neo4j or Bolt endpoint for the Neo4j database.
  • username: The username to run the query as.
  • password: The password to authenticate the user with.
  • database: If blank, the default database will be used. Database can be ignored for Community editions of Neo4j. Users connected to the Enterprise edition of Neo4j can use this database field to select which database to import from.

The bottom panel contains the query and defines how Alteryx should extract data from the returned objects. Because Neo4j is schema-less and Alteryx manipulates tabular data, this translation must be provided by the user. Each field needs to be explicitly defined from the returned objects of the query. The connector is smart enough to know what type of objects are returned from the query and will guide you toward extracting the data you want.

The username and password are required to validate the query in the configuration panel. However, they are optional for the engine. The engine will look for a generic Windows credential matching the provided url. If one is found, the engine ignores the username and password and uses the Windows credential to authenticate.

Using the input tool for the first time

Drag the input tool onto the canvas.

In the configuration screen, enter the bolt endpoint url, username, password, and (optionally) database.

Enter a valid Cypher query into the query textfield. Cypher queries can be multi-line and the text field will expand up to 10 lines. After 10 lines, the text field will start scrolling.

Validate the query by clicking the 'Validate Query' button. This will test your connection to Neo4j and tell you whether the query is valid. It also saves the return value types so you can build out the field mapping.

Add a new field to the output by clicking the 'Add Field' button. A new, empty field will be appended to the field list. Provide a name for the field in the textbox. This is the Alteryx field name. Then, use the drop-down to define which data gets populated into the output field. You must keep selecting options from the drop-down until a basic data type is found (strings, numbers, dates, bools).

Field mappings can be deleted by clicking the 'X' icon in the pill. Deleting a pill in the middle will delete all downstream pills as well.

Fields can be deleted by clicking the trash can icon to the left of the field.

Fields can be re-arranged by clicking the drag handle on the right of the field and dragging up and down.

Sometimes, you don't want to spend a lot of time extracting information out of nodes, paths, and relationships. These return objects can be converted into a string representation by selecting 'To String' from the field mapping drop-down.

Back to top

Neo4j Output

The Neo4j Output tool is used to export nodes and relationships to a Neo4j database.

Overview

There are two different screens for the output tool, depending on how it is configured. The default screen is for exporting nodes and looks like this:

The top panel contains information needed to connect to the Neo4j database. It can be minimized by clicking the top of the panel.

  • url: The HTTP endpoint for the Neo4j database. By default, this will be port 7474. Do not use any endpoint other than the HTTP endpoint. The engine uses the bolt endpoint, but it obtains the exact address by first calling into the HTTP endpoint.
  • username: The username to run the query as.
  • password: The password to authenticate the user with.
  • database: If blank, the default database will be used. Database can be ignored for Community editions of Neo4j. Users connected to the Enterprise edition of Neo4j can use this database field to select which database to import from.

Username and password are optional for the engine. The engine will look for a generic Windows credential matching the provided url. If one is found, the engine ignores the username and password and uses the Windows credential to authenticate.

The middle panel defines the batch size and the type of object to export (nodes or relationships).

The bottom panel is used to define how nodes are exported to Neo4j. By default, the export tool is an upsert tool. Nodes that already exist in the database are updated and nodes that do not exist are created. The 'node ID fields' section contains the properties the output tool will use to identify whether a node already exists in the database. If no ID fields are provided, the tool will only create new nodes.

The 'update the following properties' section determines which properties of nodes are created/updated.

The screen for exporting relationships looks like this:

The top two panels are the same as the export node screen. The third panel defines the relationship type and any properties that should be created/updated on the relationship.

The fourth panel tells the output tool how to match the left node in the relationship. The bottom panel tells the output tool how to match the right node in the relationship.

Just as with the export node screen, exporting relationships is an upsert operation by default.

Back to top

Neo4j Delete

The Neo4j Delete tool is used to delete nodes and relationships from a Neo4j database.

Overview

There are two different screens for the delete tool, depending on how it is configured. The default screen is for deleting nodes and looks like this:

The top panel contains information needed to connect to the Neo4j database. It can be minimized by clicking the top of the panel.

  • url: The HTTP endpoint for the Neo4j database. By default, this will be port 7474. Do not use any endpoint other than the HTTP endpoint. The engine uses the bolt endpoint, but it obtains the exact address by first calling into the HTTP endpoint.
  • username: The username to run the query as.
  • password: The password to authenticate the user with.
  • database: If blank, the default database will be used. Database can be ignored for Community editions of Neo4j. Users connected to the Enterprise edition of Neo4j can use this database field to select which database to import from.

Username and password are optional for the engine. The engine will look for a generic Windows credential matching the provided url. If one is found, the engine ignores the username and password and uses the Windows credential to authenticate.

The middle panel defines the batch size and the type of object to delete (nodes or relationships).

The bottom panel is used to define how nodes are deleted from Neo4j. Neither the label nor the ID fields are required. Providing a label and no ID fields will delete all nodes with that label. Providing ID fields but no label will delete any type of node with matching properties. Providing neither will delete all nodes from the database. When the tool deletes nodes, it will also delete any relationships attached to those nodes.

The screen for deleting relationships looks like this:

The top two panels are the same as the delete node screen. The third panel defines the relationship type and any properties that should be matched when deleting relationships.

The fourth panel tells the output tool how to match the left node in the relationship. The bottom panel tells the output tool how to match the right node in the relationship.

As with the delete node screen, the labels, types, and properties are all optional. This provides a lot of flexibility to precisely define how relationships should be deleted, but also makes it easier to mistaklenly delete relationships. Use with caution.

Back to top

graphyx's People

Contributors

tlarsendataguy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fbiville

graphyx's Issues

"URI scheme is not supported" for Neo4j Output

Hi. I am trying to use these tools but I can't past connection issues.
My server is at a URL similar to: "http://myserver.domain.com:8443"

The Neo4j Input tool returns error 404.
The Neo4j Output tool returns "URI scheme is not supported".

Any idea what might be causing that?

The database is up and accessible at: "http://myserver.domain.com:8443/browser"

If I try to use the bolt: URI, I am getting 'Unable to connect to the database' as excepted since you indicated to only use the HTTP URI. The errors above happen when using the HTTP URI.

Export map and list properties

Idea:
Allow blob fields to be exported as properties on nodes and relationships. Valid blob fields are JSON-encoded text representing the desired property type (map or list). Invalid JSON will not be exported.

No Metadata Available

image

We are just starting to use the tools. Using the input tool we get the following on pressing "verify":

"The query was successful but no records were returned. No metadata is available to generate output fields."

Assume this means we cannot use the "add field" facility, and that it cannot read the meta data from Neo4j (v4.4.8 enterprise) - but I'm not sure.
Its just a test query: MATCH (t:Team) RETURN t.name and works ok in Neo4j browser. We are using a specific database, not a default.
I'm not sure what could be wrong.

Error: Neo4j Input (2): ConnectivityError

I am getting this error:

"Error: Neo4j Input (2): ConnectivityError: Timeout while waiting for connection to any of [[neo4j.acme.com:7867]]: %!s()"

Would you be able to assist in advising me how best to resolve this?

Please note the only way that I am able to validate the query is:
url: https://neo4j.acme.com
This connection is able to validate the query, but will not pull in data and produces this error: "Error: Neo4j Input (2): ConnectivityError: Timeout while waiting for connection to any of [[neo4j.acme.com:7867]]: %!s()"

These url addresses will not work:
url: https://neo4j.acme.com:7867 will not validate and will not run. Under Validate query, the following error is noted: "Unable to connect to the Neo4j database. Double-check the URL make sure you have a working network connection to the database."

url: http://neo4j.acme.com:7867 creates an error and will not connect.
url: http://neo4j.acme.com:7474 creates an error and will not connect.
url: https://neo4j.acme.com:7474 creates an error and will not connect.

If there is no solution, please let me know a suggestion to make to our Neo4J admin regarding how our system is configured.

I really need this connection and really appreciate all your help.

Graphyx 1.0.6
Alteryx version 2022.1.1
Neo4J version 4.4.12

Thank you so much

Malform http response (Possible bolt protocol obstacle)

Any idea how to resolve these errors (these are errors found after Alteryx finishes running my workflow. No data is pulled through)?

First error: "http://neo4j.acme.com:7474": net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x00\x00\x00\x02\x01\x00"

Second error: Error: Neo4j Input (1): expected no error but got: URI scheme is not supported

My URL: bolt protocol is: jdbc:neo4j:bolt+s://
My IP: bolt protocol is: jdbc:neo4j:bolt://

Using DBeaver,
jdbc:neo4j:bolt+s://http://neo4j.acme.com:7474 with user name and password, will connect to neo4j.
jdbc:neo4j:bolt://http://neo4j.acme.com:7474 with user name and password, will not connect to neo4j.

Thank you

Alteryx version 2022.1.1
Neo4J version 4.4.12

Update Neo4j Go driver to latest 4.x

Hello, I am the maintainer of the official Go driver for Neo4j.
I was wondering if the Go driver could be updated to the latest 4.x (currently 4.4.2).
I had a quick stab at it, but the compilation fails for unrelated reasons.

I remain available to discuss any potential blockers for this update.

Macro Only Please (if possible)

My IT department is not excited about opening this executable on my laptop. If possible, is there anyway you could send me a copy of the alteryx macro?

Add option to delete existing relationships when exporting nodes

Sometimes we want to delete all relationships when performing an upsert of existing nodes. Those relationships would get recreated by a later process, if still valid.

Today, this requires importing a list of nodes and all of its relationships, then sending it through the Delete tool.

It would be easier if an option was available in the Output tool to delete all existing relationships when the output tool is updating an existing node.

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.