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.
If you want to use a pre-build binary, use the latest binary release (for your Neo4j installation)
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
Unzip neo4j-tableau-<version>.zip
to $NEO4J_HOME/plugins
.
Edit the $NEO4J_HOME/conf/neo4j.conf
file, add:
dbms.unmanaged_extension_classes=org.neo4j.unmanaged.extension.tableau=/export
$NEO4J_HOME/conf/neo4j-server.properties
org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.unmanaged.extension.tableau=/export
-
Download and Extract the Tableau SDK to a directory (e.g.
c:\tableausdk
) from https://downloads.tableau.com/tssoftware/Tableau-SDK-C-Java-64Bit-9-3-1.zip -
Add the
SDK\bin
directory to thePATH
variable:PATH=C:\tableausdk\bin;%PATH%
-
Verify that the
tdeserver64.exe
runs from thec:\tableausdk\bin
directory. -
Install Visual C++ Redistributable Packages für Visual Studio 2013 (
vcredist_x64.exe
) if Tableau Desktop or Server is not installed
See https://community.tableau.com/message/452404#452404
Install the Tableau components as outlined here: https://onlinehelp.tableau.com/current/api/sdk/en-us/help.htm#SDK/tableau_sdk_installing.htm%3FTocPath%3D_3
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.
-
Download the Tableau Linux SDK (https://downloads.tableau.com/tssoftware/Tableau-SDK-Linux-64Bit-9-3-1.tar.gz)
-
Extract the Tableau Linux SDK to a directory (e.g. /home/dave/Downloads/tableauSDK)
-
Set the LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/home/dave/Downloads/tableauSDK/lib64/dataextract
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.
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
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=