Skip to content

Latest commit

 

History

History
178 lines (128 loc) · 6.5 KB

tde-file-generation.adoc

File metadata and controls

178 lines (128 loc) · 6.5 KB

TDE File Generation

Integration with Tableau can also be achieved by generated TDE files to be used by Tableau Desktop or Server.

We provide this ability with a Neo4j Server extension that you can send a query request to to generate a TDE file.

The only drawback is that it requires OS specific Tableau libraries to supply with the extension.

Build & Install Instructions for Neo4j - Tableau TDE Generator Extension

Download from GitHub

If you want to use a pre-build binary, use the latest binary release (for your Neo4j installation)

Build it yourself

git clone http://github.com/neo4j-contrib/neo4j-tableau
cd neo4j-tableau/extension

# install dependencies, build project and create zip file: neo4j-tableau-<version>.zip
./build.sh

Install Extension

Unzip neo4j-tableau-<version>.zip to $NEO4J_HOME/plugins.

Edit the $NEO4J_HOME/conf/neo4j.conf file, add:

Neo4j 3.x
dbms.unmanaged_extension_classes=org.neo4j.unmanaged.extension.tableau=/export
Neo4j 2.3 $NEO4J_HOME/conf/neo4j-server.properties
org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.unmanaged.extension.tableau=/export

Install Tableau Components

Windows

Mac OSX

N.B.

After completing all the steps it might occur an error during the REST API invocation. If you get a response reporting the following message:

“A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision”

Then you need to do additional configuration steps. In general this error is due to the fact that the curl library (in the Frameworks directory in the dmg file) is too old or lacks of some features. The easiest way to update your curl is to use Homebrew (the package manager for Mac OS X).

Run the following command:

$ brew install Curl --with-libssh2 --with-libmetalink --with-rtmpdump --with-nghttp2

After the installation is completed you need to find the new Curl library with:

$ locate libcurl.4.dylib | grep Cellar

It might happen that you don’t have your catalog ready so the previous command replies telling you to generate the catalog. In this case you can run the following command:

$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

It might take time to load the catalog, but after a few minutes if you run again the “locate” command it should answer like that:

/usr/local/Cellar/curl/7.54.1/lib/libcurl.4.dylib

This is the path of the new (working) library but you need also to find the libraries to be replaced. Run the following command:

$ locate libtabcurl.4.dylib

You get an answer that should be similar to this:

/Applications/Tableau Desktop 10.3.app/Contents/Frameworks/libtabcurl.4.dylib
/Library/Frameworks/TableauServer.framework/Versions/A/Libraries/libtabcurl.4.dylib

In general, you don’t need to replace the library inside “Applications” folder because is related to Tableau Desktop and you are focusing on the Tableau Framework (SDK) dependencies. The last command to run is:

$ cp /usr/local/Cellar/curl/7.54.1/lib/libcurl.4.dylib /Library/Frameworks/TableauServer.framework/Versions/A/Libraries/libtabcurl.4.dylib

After that you can restart your Neo4j instance.

Linux

Versions

  • This code has been tested on Neo4j 2.3 and 3.0 versions.

  • This code has been tested against Tableau 9.1.

  • The TDE format should be able to be read by Tableau versions 7 and higher.

Testing the TDE Extension

Here are sample queries in that you can run to generate TDE files after setting up the movies dataset via :play movies in your Neo4j server.

To create a TDE from the results of a Neo4j Cypher query, pass for instance the following query:

MATCH (n:Movie) RETURN n

To this URL:

It will generate and RETURN a TDE file for usage in Tableau.

More Example Queries for Testing the Extension

Query: MATCH (p:Person)-[a:ACTED_IN]->(m:Movie) RETURN p,a,m
URL: http://localhost:7474/export/tableau/tde/MATCH%20%28p%3APerson%29-%5Ba%3AACTED_IN%5D-%3E%28m%3AMovie%29%20RETURN%20p%2Ca%2Cm
Query: MATCH (p)-[a]->(m:Movie) RETURN p,a,m
URL: http://localhost:7474/export/tableau/tde/MATCH%20(p)-%5Ba%5D-%3E(m%3AMovie)%20RETURN%20p%2Ca%2Cm
Query: MATCH (n:Movie) RETURN n
URL: http://localhost:7474/export/tableau/tde/MATCH%20(n%3AMovie)%20RETURN%20n

Publishing to Tableau Server

For publishing the extract to Tableau Server use this URL (set project and datasource names w/o curly brackets):

Replace {project} and `{datasource}´ with your details.

http://localhost:7474/export/tableau/tdepublish/{project}/{datasource}/MATCH%20(n%3AMovie)%20RETURN%20n

For Example:

Query: MATCH (n:Movie) RETURN n
URL: http://localhost:7474/export/tableau/tdepublish/default/Neo4jCypher/MATCH%20(n%3AMovie)%20RETURN%20n

Edit $NEO4J_HOME/plugins/tableau-server.properties file when extracts should be published:

# Properties and defaults to publish TDE files to server
server.url=172.20.10.8
username=admin
password=mypass
# For content-url, specify the content URL (site ID) of the site to connect to.
# To connect to the default site, pass an empty string for the content URL.
site.id=