Using an Algorithm

This page provides information on how to use a TigerGraph Graph Data Science (GDS) Library algorithm.

The algorithm library is included, ready to install, with the TigerGraph database.

Install/Run on GraphStudio

Nearly all algorithms are available in GraphStudio’s built-in menu of graph algorithms that lets you click-to-choose and then install any or all graph algorithms. For new users on TigerGraph Cloud, this is the simplest way.

Install/Run as Standard GSQL Queries

Because TigerGraph’s graph algorithms are written as GSQL queries, you can install and run them the same way that you install and run other GSQL queries:

  • As GSQL commands: INSTALL QUERY and RUN QUERY

  • Using REST endpoints: POST /gsl/queries/install and GET /query/{graph_name}/{query_name}

  • pyTigerGraph functions: Featurizer.installAlgorithm() and Featurizer.runAlgorithm()

  • Using GraphStudio’s graphical user interface commands for Add Query, Install Query, and Run Query.

Install/Run as Packaged Template Queries

Database versions 3.8 and higher offer selected algorithms in an additional format, as packaged template queries. The packaging simplifies the installation and management of the library, and new CALL command performs just-in-time compilation of the template queries to offer even better performance than before. TigerGraph is continually improving its library. To get the latest version, users can always go to our GitHub repository: GSQL Graph Algorithm Repository.

Output

Most of the algorithm queries provide multiple output formats. You usually have the option to output one or more of the following:

  • JSON output to console

  • CSV output to a file

  • Results written to an attribute of vertices or edges

If you are running an algorithm on a TigerGraph Cloud cluster, you need to use AdminPortal to download the algorithm’s output files to your local machine. See Download GSQL Output File for details.