RelAx allows cross-reference (xRef) data of Microsoft Dynamics 365 for Finance and Operations to be imported to a graph database (Neo4j).
Using a graph database allows easier querying of indirect references and supports certain queries that are difficult to do in a relational database. Such queries are often needed when working with cross-reference data of Microsoft Dynamics 365 Finance and Operations; the purpose of RelAx is getting the data from the SQL database to a graph database, namely Neo4j.
During the process, RelAx also creates a SQL database with an enhanced schema, which may also be used for easier querying of cross-reference data. This is not the main purpose of the application, but it is a useful by-product that can be used on its own as well.
On the other hand, the application demonstrates quite a few things and it's open source, therefore you're free to modify as you like. Remember also that you can modify the graph database after the import (e.g. to add a label to nodes meeting certain criteria), therefore you can do some schema adjustments without changing the application itself.
RelAx can be used to convert your own cross-reference data to a graph database, but maybe you want to try a graph database with cross-references from a standard F&O application before going through the process of running RelAx and importing the data to Neo4j. For that case, I prepared a dump of such a Neo4j database that you can restore in Neo4j Desktop.
RelAx as such doesn't need much of an installation; it's a mere console application for Windows. Nevertheless a few other things are needed:
- .NET 9+ runtime.
- D365 F&O xRef database that the current user can implicitly log into (there is no option to set SQL credentials).
- Neo4j Desktop to be able to create a graph database and import the data there.
RelAx needs a D365 F&O xRef database to take the data from. You can either provide a database server and database name, or let RelAx to take it from an UDE (Unified Dev Environment) configuration.
Using database server and database name:
RelAx.CLI.exe --dbserver '(LocalDB)\MSSQLLocalDB' --dbname 'xRefMTF'
Using an UDE configuration file:
RelAx.CLI.exe --ude-config "C:\Users\UserA\AppData\Local\Microsoft\Microsoft\Dynamics365\XPPConfig\AConfig.xml"
Using the default UDE configuration:
RelAx.CLI.exe --ude-default
The application supports a few more parameters; call it without any parameter (or with --help parameter) to see the list of all available parameters and their description.
RelAx produces CSV files with cross-references data to be imported to Neo4j, plus a Cypher query file (import.cypher) that contains the Cypher queries to create nodes and relationships in Neo4j based on the files.
The output files are created in the folder specified by --output-folder parameter; a temporary folder is used if the parameter is not specified.
CSV files created by RelAx can be imported to Neo4j using Neo4j Desktop GUI. By default, Neo4j allows file imports from a specific folder only, therefore you
either need to copy the files there or reconfigure Neo4j to allow imports from other locations.
The default folder for imports is import folder in the Neo4j instance. The path of the instance folder can be seen in Neo4j Desktop.
You can configure a different folder (or allow any location) in neo4j.conf file (dbms.directories.import property).
Then go to Query tab, make sure you're connected to the right instance and database, and run the Cypher query from import.cypher produced by RelAx. This will create the nodes and relationships in the graph database based on the CSV files.