Giter Club home page Giter Club logo

explorer's People

Contributors

ashleyhx avatar mewim avatar prrao87 avatar riolku avatar semihsalihoglu-uw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

explorer's Issues

Provide means to set default node property as some other property than primary key

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?

image

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.

Empty field validation

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.

How is source file located?

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

Open the side panel when clicking on a node or edge. Expand a node to its neighbors when double clicking.

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.

  • Open the side panel when clicking on a node or edge
  • Expand a node to its neighbors when double clicking

Dialog Closing

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.

Upgrade kuzu to 0.0.10

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 CALLs instead.

Cancel query

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.

Schema view inconsistency when user modifies the schema via shell

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.

Preview GPT-generated query

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.

Docs update to help new users understand what to do

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:

  • What does {path to database file} mean? (an example with local directory structure would help)
  • What does {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?

Hardcoded kuzu path for development

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.

settings: Table view options

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?

Rendering self loop edge

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 *;

Possibly additional documentation for launching Explorer

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:

Screen Shot 2024-02-09 at 4 42 39 PM

This is what I see on my Docker app:
Screen Shot 2024-02-09 at 4 45 16 PM

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?

Display `DOUBLE` and `FLOAT` values in scientific notation

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.

image

So we should display by default something like 1.0667e-02.

Undirected Cypher queries renders incorrect relationship directions in graph view

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:

image

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.

image

Suggested behaviours

Option 1

Disable arrow rendering (show undirected edges) if the user specified an undirected query without any directions.

Option 2

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.

Timestamp shows result in local timezone rather than UTC

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.

Unexpected behaviour

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):

image

Expected behaviour

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.

Replace `apt` with `apt-get`

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.

User quality of life improvements

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).

  • Can’t rerun an existing query in the same cell by pressing Shift + Enter (user can rerun the existing query cell by mouse-clicking “Run”, but it would be nice to not have to involve mouse-clicks). It seems like the keyboard-only approach to running queries (Shift + Enter) always tries to run the topmost cell, when ideally, it would run the current cell that the user is on.
  • Cannot save commonly run queries for next session - it would be better to address this at the front end rather than the DB itself, as in many cases the front end might be accessed read-only by users who aren't doing the data engineering and managing the database itself.
  • If the local database changes, the Docker container must be restarted to see the changes in the UI. This isn’t immediately obvious to a new user as they may think they've done something wrong, and it’s also not convenient because they have to stop/restart the container (maybe this can this be addressed better with the standalone application?).
  • Dynamically update graph using force-directed layout, see #85
  • Graph explore feature, see #6
  • Standalone explorer app, see #8

Force-directed layout graph for nicer UX

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.

Description of Main page

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.

Schema view auto-layout issue

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.

Schema Refresh

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.

Size limits

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

Documentation about mapping multiple directories are accessible and which ones are not

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.