vesoft-inc / nebula-console Goto Github PK
View Code? Open in Web Editor NEWCommand line interface for the Nebula Graph service
License: Apache License 2.0
Command line interface for the Nebula Graph service
License: Apache License 2.0
In the current version, the "update" statement support the "when" clause.It seems the concept is not unified.We need to support the "where" clause to keep the concept consistent.
As titled.
detail: vesoft-inc/nebula#3719
Could we consider adding help on the client/console side?
help
to show commands in topics
help zone
to show commands in topic zones(with examples)
As the title states.
push: true
for build-push-action@v3
nebula-console/.github/workflows/docker.yml
Lines 22 to 26 in c7012ff
the docker build and push in release.yaml is still the old one for single arch.
nightly image
release image
as titled.
My version of nebula is:3.0.0
My version of console is:3.0.0 and 2.6.0(Have tested for the same error to occur)
error:
2022/06/03 22:11:29 Fail to initialize the connection pool, host: 127.0.0.1, port: 9669, failed to open connection, error: failed to verify client version: verifyClientVersion failed: wrong method name
panic: Fail to initialize the connection pool, host: 127.0.0.1, port: 9669, failed to open connection, error: failed to verify client version: verifyClientVersion failed: wrong method name
goroutine 1 [running]:
log.Panicf(0xc0003a6000, 0xb6, 0x0, 0x0, 0x0)
/opt/hostedtoolcache/go/1.16.4/x64/src/log/log.go:361 +0xc5
main.main()
/home/runner/work/nebula-console/nebula-console/main.go:535 +0xb10
As shown in the image, I imported an ngql file, created tags and edge types, but can't insert vertices.
The lines at the beginning are as follows.
drop space nba;
create space nba(partition_num=10,replica_factor=1,vid_type=fixed_string(32));
use nba;
create tag player(name string,age int);
create tag team(name string);
create edge serve(start_year int,end_year int);
create edge like(likeness int);
insert vertex player(name,age) values "player100":("Tim Duncan", 42);
insert vertex player(name,age) values "player101":("Tony Parker", 36);
insert vertex player(name,age) values "player102":("LaMarcus Aldridge", 33);
insert vertex player(name,age) values "player103":("Rudy Gay", 32);
Please take a look. Thank you.
Check 2.0.0 for readme.md
$ docker run --rm -ti --network nebula-docker-compose_nebula-net --entrypoint=/bin/sh vesoft/nebula-console:v2-nightly
$ nebula-console-linux-amd64-v3.0.0 -addr 10.1.1.168 -port 9669 -user root -p nebula -e 'USE basketballplayer; explain MATCH (m) RETURN m'
(root@nebula) [(none)]> USE basketballplayer; explain MATCH (m) RETURN m
[ERROR (-1004)]: SyntaxError: syntax error near `explain'
Mon, 24 Oct 2022 10:08:00 UTC
$ nebula-console-linux-amd64-v3.0.0 -addr 10.1.1.168 -port 9669 -user root -p nebula -e 'USE basketballplayer; profile MATCH (m) RETURN m'
(root@nebula) [(none)]> USE basketballplayer; profile MATCH (m) RETURN m
[ERROR (-1004)]: SyntaxError: syntax error near `profile'
Mon, 24 Oct 2022 10:09:41 UTC
I could mitigate with -f
though
❯ echo 'USE basketballplayer;\nPROFILE MATCH (m)-[e0:follow]->(n),(m)-[e1:serve]->(n) WHERE id(m)=="player100" RETURN n,e0,e1;' > profile0.ngql
❯ cat profile0.ngql
USE basketballplayer;
PROFILE MATCH (m)-[e0:follow]->(n),(m)-[e1:serve]->(n) WHERE id(m)=="player100" RETURN n,e0,e1;
❯ nebula-console-linux-amd64-v3.0.0 -addr 10.1.1.168 -port 9669 -user root -p nebula -f profile0.ngql > profile0.log
❯ head profile0.log -n 20
(root@nebula) [(none)]> USE basketballplayer;
Execution succeeded (time spent 1207/1677 us)
Mon, 24 Oct 2022 09:56:46 UTC
(root@nebula) [basketballplayer]> PROFILE MATCH (m)-[e0:follow]->(n),(m)-[e1:serve]->(n) WHERE id(m)=="player100" RETURN n,e0,e1;
+----------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| n | e0 | e1 |
+----------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
| ("team204" :team{name: "Spurs"}) | [:follow "player100"->"team204" @0 {degree: 95}] | [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}] |
+----------------------------------+--------------------------------------------------+-----------------------------------------------------------------------+
Got 1 rows (time spent 8638/9799 us)
Execution Plan (optimize time 294 us)
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------+----------------------------------
| id | name | dependencies | profiling data | operator info |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------+----------------------------------
| 13 | Project | 12 | ver: 0, rows: 1, execTime: 35us, totalTime: 37us | outputVar: { |
| | | | | "colNames": [ |
SKIP is already supported, but Console cannot auto-complete SKIP.
Now when we enable the export mode, only the normal return message will be exported into the CSV file. No commands, no errors. Please consider adding the commands executed and error messages into the output. In this case, we can do a detailed analysis to the output.
BTW, the returned tables are poorly formated, can we optimize this as well?
TODO add LDBC IC query
connect to nebula error:
docker run --rm -ti --network nebula-docker-compose_nebula-net vesoft/nebula-console:nightly --addr 127.0.0.1 --port 9669
E0407 02:43:50.550912 1 GraphClient.cpp:54] Thrift rpc call failed: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused Connection failed
docker-compose ps
nebula-docker-compose_graphd1_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32818->19669/tcp, 0.0.0.0:32817->19670/tcp, 0.0.0.0:32819->9669/tcp nebula-docker-compose_graphd2_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32812->19669/tcp, 0.0.0.0:32811->19670/tcp, 0.0.0.0:32813->9669/tcp nebula-docker-compose_graphd_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32804->19669/tcp, 0.0.0.0:32803->19670/tcp, 0.0.0.0:9669->9669/tcp nebula-docker-compose_metad0_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32801->19559/tcp, 0.0.0.0:32800->19560/tcp, 0.0.0.0:32802->9559/tcp, 9560/tcp nebula-docker-compose_metad1_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32795->19559/tcp, 0.0.0.0:32794->19560/tcp, 0.0.0.0:32796->9559/tcp, 9560/tcp nebula-docker-compose_metad2_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32798->19559/tcp, 0.0.0.0:32797->19560/tcp, 0.0.0.0:32799->9559/tcp, 9560/tcp nebula-docker-compose_storaged0_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32809->19779/tcp, 0.0.0.0:32808->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:32810->9779/tcp, 9780/tcp nebula-docker-compose_storaged1_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32815->19779/tcp, 0.0.0.0:32814->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:32816->9779/tcp, 9780/tcp nebula-docker-compose_storaged2_1 /usr/local/nebula/bin/nebu ... Up (healthy) 0.0.0.0:32806->19779/tcp, 0.0.0.0:32805->19780/tcp, 9777/tcp, 9778/tcp, 0.0.0.0:32807->9779/tcp, 9780/tcp
-v does not return version information
log
[nebula@hadoop-node-2 ~]$ ./nebula-console-linux-amd64-v2.0.0-ga -v
nebula-console version Git: , Build Time:
[nebula@hadoop-node-2 ~]$
Please check the FAQ documentation before raising an issue
Describe the bug (required)
How to log into nebula without a password?
Your Environments (required)
uname -a
g++ --version
or clang++ --version
lscpu
a3ffc7d8
)How To Reproduce(required)
Steps to reproduce the behavior:
(root@nebula) [(none)]> create user foesa
Execution succeeded (time spent 4205/8811 us)
Wed, 12 Oct 2022 09:02:01 UTC
-p
and arbitrary password and without the configuration -p
. Both ways can't log in to nebula.[root@foesa foesa.yang]# ./nebula-console -addr 192.168.8.136 -port 9669 -u foesa -p nebula
2022/10/12 09:02:38 Fail to create a new session from connection pool, fail to authenticate, error: Invalid password
panic: Fail to create a new session from connection pool, fail to authenticate, error: Invalid password
goroutine 1 [running]:
log.Panicf(0x76c2b6, 0x35, 0xc00008de38, 0x1, 0x1)
/opt/hostedtoolcache/go/1.16.4/x64/src/log/log.go:361 +0xc5
main.main()
/home/runner/work/nebula-console/nebula-console/main.go:541 +0x9b9
[root@foesa foesa.yang]# ./nebula-console -addr 192.168.8.136 -port 9669 -u foesa
2022/10/12 09:02:41 Error: argument password is empty!
panic: Error: argument password is empty!
goroutine 1 [running]:
log.Panicf(0x76530d, 0x22, 0x0, 0x0, 0x0)
/opt/hostedtoolcache/go/1.16.4/x64/src/log/log.go:361 +0xc5
main.validateFlags()
/home/runner/work/nebula-console/nebula-console/main.go:473 +0x14f
main.main()
/home/runner/work/nebula-console/nebula-console/main.go:503 +0x10b
show users
to see the user foesa.(root@nebula) [(none)]> show users
+---------+--------------+
| Account | IP Whitelist |
+---------+--------------+
| "foesa" | "" |
| "root" | "" |
+---------+--------------+
Got 2 rows (time spent 1104/2228 us)
Expected behavior
Additional context
General Question
I first type STA
, then tab, console returns STATUS
.
but I don’t want it. So I remove the TUS
and add an R
.
STAR
I want to autocomplete START
but nothing happens.
When I run nebula
without any ports I'm getting this error
./bin/nebula
--port must be specified
It works after I added the port
./bin/nebula --port 3699
Welcome to Nebula Graph (Version d878eb4)
The port should default to 3699.
Use gographviz to convert the nebula.plan_description structure to the Graph type of graphviz, let it render the final string, and avoid problems such as possible character translation in the middle.
from jira
as titled
context: vesoft-inc/nebula-docker-compose#110
nebula-console version Git: b9df832, Build Time: 2022-07-18T11:31:02+0000
How To Reproduce(required):
cmd+r “输入l 然后回车”
then console quit
目前客户端对根据sql整体长度截断(超过4096部分丢失),导致服务端无法正常执行sql,请放开限制。
Hi,
I look at the https://github.com/vesoft-inc/nebula-console/releases, there are only amd
and arm
version, there is no x86
version.
I would ask why there is no x86 version, thanks.
At first I typed SHOW CREATE TAG
and pressed Tab, and found a letter I
was automatically entered.
Then I tried SHOW CREATE EDGE
and the same thing happened. I realized this might be a problem related to the auto completion rules. Console may have mistaken the statements I entered as CREATE TAG
or CREATE EDGE
, so I may need INDEX
, IF NOT EXISTS
or IF EXISTS
. But console ignored SHOW
.
related issue: vesoft-inc/nebula-studio#54
One of our users was trying to create some script to automate nGQL query to output result in CSV leveraging console :CSV
syntax.
The current semantic of :CSV
means to save the next line of :CSV
result to file, which is clear and making a lot of sense :).
While in this user's need, the shell script is calling console -e
, thus the only thing it could done are something like:
console ... -e `use foo; :csv bar.csv; go from ...`
This should not be supported for the initial definition of :CSV
as it only means to output query in next line.
The way to support this was to alternatively use -f filename
where in the file, multi-line of use foo;\n:csv bar.csv;\n go ...
was placed.
But with this, I would like to ask for help on considering changing our semantic of :CSV
on allowing its tailing query to output to the file if exists.
:csv bar.csv; go from ...
Do you think this makes sense?
Thanks
As titled.
docker: Error response from daemon: network nebula-docker-compose_nebula-net not found.
Such as:
\quit
\exit
\format <table, json>
\help
option 0: send YIELD "foo"
to keep the session alive(i.e. by default every 59 minutes)
option 1: catch Session not existed!
and do something.
To mitigate this case:
[ERROR (-1002)]: Get sessionId[1667208687399203] failed: Session `1667208687399203' not found: Session not existed!
version:
./bin/nebula-console -v
nebula-console version Git: 3ce5151, Build Time: 2021-08-20T07:22:02+0000
After a user log in as root and create a user called user9 with ******
root@yk-nebula:/usr/local/nebula# ./bin/nebula-console -addr 127.0.0.1 -port 9669 -u root -p ******
2021/09/28 09:08:28 [INFO] connection pool is initialized successfully
Welcome to Nebula Graph!
(root@nebula) [(none)]> create user user9 with password "*******"
Execution succeeded (time spent 6779/7846 us)
Tue, 28 Sep 2021 09:09:24 CST
(root@nebula) [(none)]> exit
Another user may login in with same environment as other user and find root's history (even with password).
root@yk-nebula:/usr/local/nebula# ./bin/nebula-console -addr 127.0.0.1 -port 9669 -u us001 -p ******
2021/09/28 09:10:38 [INFO] connection pool is initialized successfully
Welcome to Nebula Graph!
(us001@nebula) [(none)]> create user user9 with password "*******"
[ERROR (-1008)]: PermissionError: No permission to write user.
Tue, 28 Sep 2021 09:10:57 CST
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.