memgraph / mgconsole Goto Github PK
View Code? Open in Web Editor NEWmgconsole is a command-line interface (CLI) used to interact with Memgraph from any terminal or operating system.
License: GNU General Public License v3.0
mgconsole is a command-line interface (CLI) used to interact with Memgraph from any terminal or operating system.
License: GNU General Public License v3.0
The biggest challange is to first create nodes because some queries might depend on that. Order queries based on query clauses or a comment indicating start of edge queries. Add something like --concurrent
as a runtime flag.
Hello Memgraph's community,
can we look forward to 'cypherl' option in '--output-format' to gets working some time?
See this result on the latest Memgraph (2.14.0-1):
echo "match (n) return n;" | mgconsole --output-format=cypherl
Segmentation fault (core dumped)
While using: mgconsole --output-format=csv
everything works fine in every case.
There is no impact on this issue, just keeping current information about the status.
Sometimes in the batched-parallel import mode, mgclient
session can end up in a bad state:
ExecuteBatchesParallel
, taka a look at the MG_SESSION_BAD
check and figure out why is happeningImport the following dataset with batched parallel in-memory analytical mode and notice you have 300k nodes and 280k edges, while the dataset has 300k nodes and 300k edges (can be confirmed with classic mgconsole import with in-memory transactional mode). To be exact, there are 20k relationships of type DRIVES
missing.
Here is the dataset.
Hello,
on recently upgraded Fedora 35.
receiving :
[100%] Linking CXX executable mgconsole
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/mgconsole.dir/build.make:103: src/mgconsole] Error 1
make[1]: *** [CMakeFiles/Makefile2:950: src/CMakeFiles/mgconsole.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
How to reproduce:
as root:
dnf install cmake make gcc gcc-c++ openssl-devel
keybase 23 kB/s | 3.3 kB 00:00
Package cmake-3.22.0-2.fc35.x86_64 is already installed.
Package make-1:4.3-6.fc35.x86_64 is already installed.
Package gcc-11.2.1-1.fc35.x86_64 is already installed.
Package gcc-c++-11.2.1-1.fc35.x86_64 is already installed.
Package openssl-devel-1:1.1.1l-2.fc35.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
exit out of root.
as a regular user:
pwd
/home/az/XXXXX/mgconsole/build
ls -l
total 0
cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 11.2.1
-- The CXX compiler identification is GNU 11.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMake build type: Release
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.1l")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/az/XXXX/mgconsole/build
make
< outputs a lot of stuff>
Install the project...
-- Install configuration: "Release"
-- Installing: /home/az/XXXX/mgconsole/build/replxx/lib64/libreplxx.a
-- Installing: /home/az/XXXX/mgconsole/build/replxx/share/cmake/replxx/replxx-targets.cmake
-- Installing: /home/az/XXXX/mgconsole/build/replxx/share/cmake/replxx/replxx-targets-release.cmake
-- Installing: /home/az/XXXX/mgconsole/build/replxx/share/cmake/replxx/replxx-config-version.cmake
-- Installing: /home/az/XXXX/mgconsole/build/replxx/share/cmake/replxx/replxx-config.cmake
-- Installing: /home/az/XXXX/mgconsole/build/replxx/include/replxx.hxx
-- Installing: /home/az/XXXX/mgconsole/build/replxx/include/replxx.h
[ 85%] Completed 'replxx-proj'
[ 85%] Built target replxx-proj
[ 89%] Building CXX object src/utils/CMakeFiles/utils.dir/utils.cpp.o
[ 92%] Linking CXX static library libutils.a
[ 92%] Built target utils
[ 96%] Building CXX object src/CMakeFiles/mgconsole.dir/main.cpp.o
[100%] Linking CXX executable mgconsole
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/mgconsole.dir/build.make:103: src/mgconsole] Error 1
make[1]: *** [CMakeFiles/Makefile2:950: src/CMakeFiles/mgconsole.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Please adivse.
This is just minor issue regarding autocomplete. It is only just to say you know about it.
Some words cannot be auto-completed like: "constraint" or "version" (there may be more words like that), see below:
memgraph> SHOW co
coNTAINS coUNT coS coNTAINS coUNTER
memgraph> SHOW version;
+----------+
| version |
+----------+
| "2.12.1" |
+----------+
1 row in set (round trip in 0.001 sec)
This does not have any impact. It is here just for you to know.
Importing the blue sky dataset, which has 1.1 mil nodes and 6m relationships in batch mode shows this error repeating:
Rollback transaction because nodes+edges=999 batch index: 6 batch size: 1000
This happened in both analytical and transactional mode
Getting next error while trying to build mgconsole. Tried with memgraph toolchain and without, same error
[ 76%] Building CXX object src/utils/CMakeFiles/utils.dir/thread_pool.cpp.o
In file included from /home/roma/mgconsole/src/utils/thread_pool.hpp:25,
from /home/roma/mgconsole/src/utils/thread_pool.cpp:16:
/home/roma/mgconsole/src/utils/synchronized.hpp:18:10: fatal error: concepts: No such file or directory
18 | #include <concepts>
| ^~~~~~~~~~
compilation terminated.
make[2]: *** [src/utils/CMakeFiles/utils.dir/build.make:90: src/utils/CMakeFiles/utils.dir/thread_pool.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1019: src/utils/CMakeFiles/utils.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Ubuntu 20.04 (Windows 10, WSL)
Definition -> memgraph/memgraph#848
Server-side implementation -> memgraph/memgraph#1046
Can you please advise how to backup Triggers to cypher query language?
As DUMP DATABASE;
backups also CONSTRAINT, but not TRIGGER.
As saving Triggers using show triggers;
is not recoverable via cypher query language.
Not even this works:
echo "show triggers;" | mgconsole --output-format=cypherl
When you get execution times in mgconsole, they are outputted in this order:
Query PARSING time: 0.000175982 sec
Query PLAN EXECUTION time: 0.0154524 sec
Query PLANNING time: 8.054e-05 sec
But it would make more sense if it was:
Query PARSING time: 0.000175982 sec
Query PLANNING time: 8.054e-05 sec
Query PLAN EXECUTION time: 0.0154524 sec
Because that's the order in which things happen?
I've tried exporting cypherl with mgconsole using DUMP DATABASE:
mgconsole < <(echo "DUMP DATABASE;") > output.cypherl
But it does not produce a valid .cypherl file as data is in a tabular format.
If it's not possible, I guess another output format should then be added - cypherl to be able to get clean cypher queries.
ANALYTICS
mode + run mgconsole
; inside mgconsole/README.md
pageFlags:
--import-mode="batched-parallel"
--batch-size=N
--workers-number=N
Not done in the end:
Query time consists of the total time needed to create a session in the client, execute the query and fetch the results via Bolt protocol. As a result, I would like to configure to see a more granular breakdown of query time, with more information about query processing and execution without taking the time needed to fetch it from the server.
It would be useful to have the option of setting parameter values in mgconsole directly.
For example:
:param name => 'John'
Cannot be built on Ubuntu 18.04 by following the instructions in README.
When following the instructions, I had to set additional parameter in CMake
-DCMAKE_INSTALL_PREFIX=/usr/local/ in order for the command make install
to complete. Otherwise, an error:
CMake Error at src/cmake_install.cmake:41 (file):
file INSTALL cannot copy file
"/Users/memgraph/Memgraph-Repos/mgconsole/build/src/mgconsole" to
"/usr/bin/mgconsole": Operation not permitted.
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
would occur.
mgconsole/src/utils/future.hpp +276
builds fine after the semi-colon is removed
Currently, on Memgraph's download website you can download mgconsole
for MacOS and Windows, but not for Ubuntu. It would be great to have have mgconsole
available for "any" operating system.
TASKS
On SHOW
, suggest SHOW STORAGE
etc.
For example:
mgconsole < MATCH (n) RETURN n;
+-------------------+
| (:NodeB {id: 4}) |
| (:NodeB {id: 1}) |
| (:NodeB {id: 5}) |
| (:NodeB {id: 2}) |
| (:NodeB {id: 3}) |
| (:NodeB {id: 0}) |
| (:NodeA {id: 3}) |
+-------------------+
Currently, this works if you have file :
mgconsole < test.txt
Context: https://discourse.memgraph.com/t/mgconsole-non-interactive-mode-to-run-queries/373
It is so annoying that mgconsole exits when I want to interrupt the current command. Please make it exit on double ctrl + c, or not at all.
How to reproduce: press ctrl + c.
Currently mgconsole doesn't compile in debug mode, because replxx
append -d
to its static lib name in debug mode, therefore the following line in doesn't work:
mgconsole/src/utils/CMakeLists.txt
Line 12 in 7f00894
I'm trying to compile mgconsole on fedora 37 x64 bit (no arm) but after writing make
(so after cmake -DCMAKE_BUILD_TYPE=Release ..
successfull) I get this error:
Look at the last three rows. It's the same error as this one.
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.