LinuxCommandLibrary

gsql

TigerGraph graph database query shell

TLDR

Connect to TigerGraph

$ gsql
copy
Run query from file
$ gsql [query.gsql]
copy
Run inline query
$ gsql -g [graphname] "[GSQL query]"
copy
Specify graph
$ gsql -g [mygraph]
copy
Run as user
$ gsql -u [username] -p [password]
copy

SYNOPSIS

gsql [options] [file|query]

DESCRIPTION

GSQL is the query language and shell for TigerGraph, a graph database. It provides SQL-like syntax for graph queries, data loading, and schema management.
GSQL supports pattern matching, graph algorithms, and procedural extensions for complex graph analytics.

PARAMETERS

-g graph

Graph name to use.
-u user
Username.
-p password
Password.
-ip host
Server IP address.
--ssl
Use SSL connection.

QUERY EXAMPLE

$ USE GRAPH social

CREATE QUERY findFriends(VERTEX<Person> p) FOR GRAPH social {
  Start = {p};
  Friends = SELECT t FROM Start:s -(Knows:e)- Person:t;
  PRINT Friends;
}

INSTALL QUERY findFriends
RUN QUERY findFriends("person1")
copy

CAVEATS

Requires TigerGraph installation. Query installation needed before running. Syntax differs from standard SQL. Graph schema must be defined first.

HISTORY

GSQL was developed by TigerGraph (formerly GraphSQL), founded by Yu Xu in 2012. TigerGraph focuses on real-time analytics on massive graphs, with GSQL designed for both simple queries and complex graph algorithms.

SEE ALSO

neo4j(1), arangosh(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community