kuzudb / explorer Goto Github PK
View Code? Open in Web Editor NEWBrowser-based user interface for Kùzu graph database
Home Page: https://hub.docker.com/r/kuzudb/explorer
License: MIT License
Browser-based user interface for Kùzu graph database
Home Page: https://hub.docker.com/r/kuzudb/explorer
License: MIT License
It would be great if we could preset the node properties displayed (it defaults to picking the primary key) - instead, if the user knew what they wanted to display on the node, say name
or some other property, that would make the graph displayed a lot more readable and useful. Primary key on many occasions is an integer or uuid, so it's pretty ugly or not useful when displayed.
Is there a way to provide this as a config file or similar to the Dockerfile before we run the display server?
This is an example of a transaction graph that has integer primary keys for the nodes - the initial graph displayed is not very useful and I invariably end up having to customize the node display settings every time I load the explorer.
On the schema editor, when editing a relationship and adding a property, the application doesn't check for empty fields, which I feel like is the bare minimum validation.
Validating datatypes is in my opinion not necessary.
Hi. As title says I have tried putting the source .csv into the database folder but still getting an error message:
The evaluation of this cell failed with the following error:
Binder exception: No file found that matches the pattern: xxx.csv.
any thoughts on how to resolve this?
thanks
Currently the side panel of the graph view in the shell panel does not open automatically. One has to click on the arrow at the end of the graph view to open it and see the node and relationship properties. I think it should open as one clicks on a node/rel.
We should also have the behavior that when double clicking on a node, it should expand to its neighbors.
Currently, the dialog closing message updates every 0.1 seconds. In my opinion, this is non-standard and distracting. Instead, let's just update it every second.
In 0.0.10 a few table schema functions are deprecated. We need to rewrite the UI app to migrate the /api/schema
endpoint to use database CALL
s instead.
When the text label on node or edges in the graph visualization is too long, we should cut the text with ellipsis or break it into multiple lines. I tried to follow the G6 example at http://g6-v3-2.antv.vision/en/examples/shape/label but it did not work correctly. Need to look into it again.
I think it would be helpful for new users to Kùzu know that for now, the UI is accessible via Docker and a web app, but in the future, an Electron-based app will be available to make it easier to explore their graphs visually: cc @semihsalihoglu-uw
I don't know whether this belongs here, but I often find myself restarting the explorer when I issued a forever-running query. It would be great if I could reliably cancel the query from the UI.
If the user issues DDLs from the shell to update the schema, the schema view will not reflect up-to-data information unless the user refreshes the entire page. There should be a way to detect schema changes via shell DDL and perform the refresh automatically.
...on windows, or is that not wanted or is the explorer only runable under linux
Maybe I haven't seen it but there is no obvious way for me to inspect/adapt the GPT-generated cypher query before executing it. This makes the feature much less useful in my opinion.
kuzudb/kuzu#2357 replaces the enum of access modes with a boolean flag. The launching of explorer needs to be changed accordingly. However, we should hold this until the next stable release of Kùzu.
Hi @mewim, I'm trying to point to an existing KùzuDB directory mydb
that has data in it (data.kz
, catalog.kz
, metadata.kz
etc.), and following the docs isn't returning a result.
I'm using the following command.
docker run -p 8000:8000 \
-v mydb:/data \
--rm kuzudb/kuzu-ui:latest
Deployed server started on port: 8000
The Docker image successfully downloads, and the server runs on port 8000. I'm pointing my local DB directory mydb
that has all the data files inside it, and mounting it to the /database
volume in the docker container.
I then open a browser window on localhost:8000
, and attempt to run the query match (n) return n limit 1
, but this returns nothing, and it also causes the container to shut down, and I get no information that there was an error (for example, incorrect specification of the DB path).
Currently, the following items are not clear in the docs:
{path to database file}
mean? (an example with local directory structure would help){path to additional data files}
mean? (an example with local directory structure would help)Could we have a slightly more beginner-friendly README page that provides example commands that explicitly showcase how to connect to a local directory of an existing database?
In https://github.com/kuzudb/explorer/blob/master/src/server/Cypher.js we always reload the schema and check whether the schema has changed after each Cypher query, but in read-only and demo modes it is impossible to change the schema. Therefore we should skip this check in these modes, which should speed up the API a bit.
In development, we use the following code to find kuzu:
const kuzuPath = path.join(
__dirname,
"..",
"..",
"..",
"kuzu",
"tools",
"nodejs_api",
"build/"
);
kuzu = require(kuzuPath);
../../../kuzu/tools/nodejs_api/build
I suppose this is a convenience path for the author. One option to fix this would be to add an environment variable.
Related to kuzudb/kuzu#921
TODOs:
In the settings for the application we can modify something called "table view options", but I don't see any way to see the "rows" of a table. Is this intentional?
Seems we cannot render a self loop edge although it is returned correctly in table format.
Steps to reproduce
CREATE NODE TABLE N (id SERIAL, PRIMARY KEY (id));
CREATE REL TABLE R (FROM N TO N);
CREATE (:N);
MATCH (a:N) WHERE a.id = 0 CREATE (a)-[:R]->(a);
MATCH (a:N)-[e:R]->(b:N) RETURN *;
I wanted to just visualize an RDFGraph in KuzuExplorer and followed the steps here: https://github.com/kuzudb/explorer.
I ran the following command:
> docker run -p 8000:8000 \
-v /Users/ssalihog/tmp/kuzu-test/rdf-graphs/small/ \
--rm kuzudb/explorer:latest
Access mode: READ_WRITE
Version of Kùzu: v0.0.11
Deployed server started on port: 8000
There is a db under that directory. Here's what I see:
> ls /Users/ssalihog/tmp/kuzu-test/rdf-graphs/small/
catalog.kz n-121.hindex n-36.hindex.ovf n-61.hindex.ovf
data.kz n-121.hindex.ovf n-41.hindex n-66.hindex.ovf
...
But I don't see anything under the schema panel. This is what I see:
This is what I see on my Docker app:
I believe this may be something to do with the fact that kuzudb/explorer:latest using a Kuzu version that is not compatiable with the version I used to create the database under the directory. So maybe we should add documentation about how to update the docker image or whatever is the right fix for this.
Can we also add documentation that says that we should start the Docker app in our computer before running the docker run ...
command?
The current display of DOUBLE
or FLOAT
shows only 2 significant digits. This loses too much information, and I think it's best to show at least 4 decimals + scientific notation.
In the below example in the field degree_centrality
, we are shown 0.01
, but the actual value is 0.010667
.
So we should display by default something like 1.0667e-02
.
G6.js uses id
field for internal ID. However, if there is also and id
field in the original node/edge, it will be overwritten, so the frontend shows G6 ID instead of the real ID.
I think we could do a bit better with drawing the directions on relationships when the user specifies undirected Cypher queries. Consider that I have a schema as visualized below:
Note that there are no Client-Client relationships in this graph (the only paths between two clients are through a merchant).
In order to run a multi-hop query to answer questions about clients and merchants via this schema, I cannot specify the direction of the relationship, as to reach other clients, I have to pass through a merchant in an undirected manner, because we cannot have a directed relationship from merchant to the client.
To return paths in this case, I resort to an undirected query as follows:
MATCH (c:Client {client_id: 679})-[t:TransactedWith*1..3]-(m:Merchant)
RETURN * LIMIT 10;
When the paths are returned, the directions of the arrows are incorrect (we get some edges pointing from a merchant to a client) -- it seems like the arrows are drawn based on the order in which the nodes appear in the path.
Disable arrow rendering (show undirected edges) if the user specified an undirected query without any directions.
The schema is of course the "source of truth" for the directionality of a relationship. If option 1 is difficult or not a good idea for any reason, can we instead just force G6 to render the arrow directions based on the schemas, regardless of the path objects being returned? For e.g., if we got [client_1]--[merchant_1]--[client_2]--[merchant_2]
, we know from the schema that we can only have arrows in the [client]-->[merchant]
direction and not the other way around.
I provide timestamp data in a CSV file of the format 2023-12-27 04:23:04
. Without specifying any timezone offset, the default behaviour in Kùzu is to treat this as UTC (which is expected).
However, when I ingest the data into a Kùzu table and visualize it in explorer, I see the timestamp as this: 2023-12-26 23:23:04
, which is UTC - 5, which is my timezone.
The explorer incorrectly makes the assumption that the user wants the timestamp shown in their local time zone, without telling them the timezone itself. This can cause the user to believe that the timestamp they're shown is in UTC, which it's not (whereas Kùzu's storage layer also correctly stores as UTC).
In the explorer UI, this is how it looks (no TZ info or offsets specified):
The explorer should ideally obtain the TZ info from Kùzu's internal storage (which correctly parses this as UTC) and show the timezone, if possible, in the UI so that the user knows what time offsets are in the timestamp.
2023-12-27 04:23:04
should be shown as 2023-12-27 04:23:04Z
or something similar to indicate that we've parsed and stored the time internally as UTC.
We currently run apt update
, which emits a warning:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
We should use apt-get instead.
I'm listing some user inconveniences here to take a look at whenever possible (some of these might be related to the upcoming electron app).
Is there a reason we aren't implementing the force-directed layout by default? G6 has this feature. Computationally speaking, can't we force-limit the number of nodes displayed (say 100) and have the UI dynamically update the layout using the force-directed algorithm?
Pretty much every other graph visualizer does this and it really does look nice from a user perspective as they're studying the graph structure.
Upon opening the UI, I'm greeted with a shell and no text. It's not obvious to me what I can do here. It'd be good to add a description, or even a whole separate welcome page.
To add RDFGraph support, we switched to comboForce
layout in G6. However, it seems that the algorithm does not work correctly in many cases, causing the visualization elements to overlap with each other.
Seems that if I execute a DDL statement from the shell and then click Schema
tab. The DDL will not be immediately reflected on the page. Refresh the page will then show newly created tables.
Building the image yields the following. We should set a higher limit, or figure out how to strip these files to be within the limit.
- Building for production...
[BABEL] Note: The code generator has deoptimised the styling of /home/node/app/node_modules/monaco-editor/esm/vs/language/html/html.worker.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/node/app/node_modules/monaco-editor/esm/vs/language/css/css.worker.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/node/app/node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/node/app/src/utils/CypherParser/CypherParser.ts as it exceeds the max of 500KB.
WARNING Compiled with 2 warnings12:44:17 PM
warning
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
css.worker.js (1010 KiB)
editor.worker.js (248 KiB)
html.worker.js (677 KiB)
json.worker.js (375 KiB)
ts.worker.js (4.66 MiB)
js/index.6358f0f7.js (389 KiB)
css/chunk-vendors.ed48cc6e.css (328 KiB)
js/chunk-vendors.d57c2224.js (5.26 MiB)
img/kuzu-logo-inverse.png (493 KiB)
third-party/fontawesome-free-6.4.2-web/webfonts/fa-solid-900.ttf (385 KiB)
warning
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
index (5.97 MiB)
css/chunk-vendors.ed48cc6e.css
js/chunk-vendors.d57c2224.js
css/index.90908399.css
js/index.6358f0f7.js
I am using Explorer on a new database. I ran a CREATE RDFGraph command. Then I ran the following:
COPY KBPedia FROM "/Users/ssalihog/Downloads/rdf-datasets/kbpedia/*.ttl"
and got this error:
The evaluation of this cell failed with the following error:
Binder exception: No file found that matches the pattern: /Users/ssalihog/Downloads/rdf-datasets/kbpedia/*.ttl.
It is because I needed to use multiple -v commands to mount multiple local directories to multiple directories that are visible to Docker. This is likely a common case and should be documented.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.