STARDOG: Cannot configure geospatial using stardog.properties - stardog

I am attempting to configure stardog to handle geospatial functions. I have been following the instructions and I have placed the properties file as directed in the home folder. I now want to enable geospatial functions. I set spatial.use.jts=true as instructed. I then placed the jts jar in the server classpath. I am not sure exactly which folder this is, so I placed it in the server folder (I also placed it in the server subfolders and also STARDOG_HOME, just to be sure!).
I then tried to run a geospatial function:
?feature geof:nearby(53.3442497253418 -6.240039825439453 2 http://qudt.org/vocab/unit#Kilometer).
and I get an internal server error, which produces the following error in the log (only the first few lines printed here):
ERROR 2017-05-30 16:22:47,298 [XNIO-1 task-2] com.complexible.stardog.protocols.http.server.StardogHttpServiceLoader:accept(228): An unexpected exception was handled by the server
org.openrdf.query.QueryEvaluationException: com.complexible.stardog.plan.eval.ExecutionException: The database has geospatial functionality disabled, cannot perform spatial queries.
What am I doing wrong, why are geospatial functions still disabled?

If you are using a Community license, geospatial functions are disabled. Using a Developer/Enterprise trial would fix that.
Additionally, you need to set spatial.enabled=true in your database's properties, either during db create (stardog-admin db create -n myDb -o spatial.enabled=true --) or by offlining the db and editing the metadata (stardog-admin metadata set -o spatial.enabled=true -- myDb)
If you are still having issues, feel free to report them in the Stardog Community forum.

Related

How do I edit neo4j.conf in an AuraDB instance?

I am trying to edit the settings of my AuraDB hosted neo4j instance, specifically, trying to set the following line:
apoc.import.file.enabled=true
I have looked at the official tutorial and many other places, and for the life of me, I am not able to find out where either the "settings" button is located, or how to locate the neo4j.conf or apoc.conf files. It seems that something has possibly changed in a newer version. I have tried both in the browser at https://console.neo4j.io/#databases and in Neo4J Desktop. For the desktop application, I am running it on Ubuntu via the .appimage. I created my database on the website and connected via remote connection following this guide.
Some things that might help me solve the issue:
Is it possible to open a shell in auradb to let me run normal bash commands?
Is the .conf accessible "within" the .appimage?
From the official description of File locations, I am supposedly able to do the following in Neo4j Desktop to find the configuration file:
From the Open dropdown menu of your Neo4j instance, select Terminal,
and navigate to /conf/neo4j.conf.
Yet, when I press the Open dropdown menu, I do not see a Terminal option. What I get is Neo4j Browser, Neo4j Bloom, and Neo4j ETL Tool.
Aura is a managed database - which is to say that you don't get low-level access to configuration of the kind you're describing. The documentation you're looking at relates to self-hosted instances of Neo4j, where you're the one managing and configuring the instance from scratch and where you have that level of access to the underlying configuration.
To the problem you're trying to solve, the following article entitled Loading data into Neo4j Aura is your best bet for the currently available options for loading data into your managed database.
Per the documentation, APOC is installed in Aura databases, but only a limited set of functions and procedures are enabled (as of May 2022). In particular, only a small subset of apoc.import procedures are available - from what I can see, CSV and GraphML support is enabled via apoc.load.csv and apoc.load.graphml, while you also have access to apoc.load.json and apoc.load.xml.
Lists of the currently supported procedures and functions are available at the foot of that document:
Neo4j Aura Supported APOC procedures (updated).json
Neo4j Aura Supported APOC functions (updated).json
From a Neo4j Aura Knowledge Article:
In Aura, we currently do not support changing any property that may
exist in the Neo4j product and defined in neo4j.conf.

Neo4J Connection issues to local project

I am really sorry to ask a simple question like this, but it is getting frustrating. I installed neo4j 4.0.4 on my Windows machine, created a new project as shown in the official tutorial video and set a password for my local graph. Funnily, the tutorial video ends after setting the password and opening the browser not showing how to perform Cypher queries on this newly created database. In neo4j Desktop my database is shown correctly and it seems to be up and running.
However, when I try to connect to this database via the browser, I do not see the database at all. It is so confusing when connecting to the server to specify a username and password, if you only need to set a password for your database?! The default neo4j user can see the system and default database but not my project database. In addition, I cannot link files from the project directory in Cypher queries. I tried to disable authentication, but it did not help at all.
When I issue SHOW DATABASES command, it does not list my database as well.
Update / Edit:
Seems I misunderstood the concept of projects. Every database is named neo4j - default, regardless of the name specified in the project ?!. However, I still cannot access project files. So far, I copied the files manually in the database directory under "imports". But I guess that is not the intended way.
After importing data to this default database, it still shows no data in the project itself.
Data files in the imports directory are not automatically imported into the DB. That is because neo4j has no idea how you want to store that data as nodes and relationships.
So, it is up to you to determine your desired data model, and then write the appropriate code to enforce that data model.
You can take a look at this page to learn about how to import CSV data (probably the most commonly used import data format).

Unable to switch neo4j database

I am new in neo4j and i am using "neo4j-community-3.0.1" . I want to switch database and retrieve nodes .After google i found how to switch database . But there is no file with name
conf/neo4j-server.properties
There are two files neo4j.conf and neo4j-wrapper.conf . But there is not any configuration such
org.neo4j.server.database.location=data/graph.db
Can any one help me how to switch database and i am able to see node using
browser
As of Neo4J 3.0, all the configuration files have been streamlined and unified into one file. Which is "neo4j.conf".
You need to change the DB path in this file.
If you are using Linux the file can be found at
/etc/neo4j/neo4j.conf
The actual entry you need to change will be
dbms.directories.data=/var/lib/neo4j/data
If you are using the windows client for Neo4J Community. You should have an option to browse to a database directory before starting the database.
Quoting this link.
http://neo4j.com/blog/neo4j-3-0-massive-scale-developer-productivity/
"The new file, config and log structures in Neo4j 3.0 are designed to streamline operations and to bring Neo4j better into line with operational IT expectations. One notable change is to move from multiple config files to a single namespaced files."
The ops manual might also be of use to you.
http://neo4j.com/docs/operations-manual/current/

Neo4J web console has stats for my embedded data, but cannot query it

I'm currently evaluating Neo4J (2.0M3), and in an attempt to get some kind of visualisation and query-exploration (I haven't succeeded yet!), I switched from using the Test DB to an Embedded DB, and have a Server that I can start up when required.
I understand how to get my node and relationship data written to the data directory of my choice (via How to explore databases created by an embedded-Neo4j Java application and stored outside the /data directory?), and how to configure the Server/web console to point to that directory. Sure enough, the Dashboard does show the data counts I expect, but no Cypher query I try - not even the ones that work fine in my unit tests - return any nodes. Simple lookups by name and Id all fail.
Can anyone explain the inconsistency? This happens with a vanilla Server install, with data written to the default graph.db directory, as well as with different directories. The paths under 'Server Info' are all what I expetc to see.
Another thing I don't understand: why can I not have my own Server running, and create a GraphDatabaseFactory/GraphDatabaseService in code that will accept a server URI, which will allow me to use the standard Java API and see live updates in the web console without having to stop/start the server each time?
You can set up your embedded java project to even start a server, see http://www.cakesolutions.net/teamblogs/2012/05/23/enabling-neo4j-web-admin-tool-on-the-embedded-server-using-spring-data/

Deploying an ASP.net application

What is the correct proceedure when deploying an ASP.net MVC application? I am using the built in forms based authentication and deploying using the publish function in VS2008 but when deploying it doesn't seem to deploy the ASPNETDB to the server and I end up with errors like
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 1802 and the SqlException message is: CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\INETPUB\WWWROOT\HOURS3\APP_DATA\ASPNETDB_TMP.MDF'.
I looked this up and attempted to change the sql server to run under the local system account as per
http://forums.asp.net/t/984436.aspx
but that doesn't seem to have helped.
When you try to publish this way, I believe you're going to overwrite your database with the one you are currently developing with. This means if you had any changes in your web environment, such as new users, you would lose them when you overwrote them in a publish. Additionally the reason you're probably getting permission denied, is because the file is already in use by the website, and Windows doesn't like it if you try deleting a file that is in use.
Typically I set my databases to publish in a different methodology than the ASP.net files. I often generate an upgrade script using a tool such as RedGate SQL Compare. This allows me to upgrade the one live on the server instead of copying a new file.

Resources