graph-studio
Admin CLI Basics
This topic introduces the basic commands that are useful for viewing data in named graphs, running queries, and finding particular named graphs, subjects, predicates, or objects.
The anzo CLI is an advanced administration tool for managing Graph Studio. It is primarily used for debugging and inspecting system configurations, executing batch operations, and aiding in migrations and deployments. To script user interface operations or control Graph Studio with the CLI, please contact Altair.
Retrieving Named Graphs
To retrieve named graphs from Graph Studio, use the get subcommand. This section lists example usage of anzo get. To view the help for get, run anzo help get.
Get a named graph:
anzo get http://film.com/films/PulpFiction
Get a named graph and save its contents to a file:
anzo get –f pulp.trig http://film.com/films/PulpFiction
Get a named graph and its metadata graph:
anzo get –m http://film.com/films/PulpFiction
Get only the metadata graph:
anzo get –M http://film.com/films/PulpFiction
Finding Statements
To retrieve particular statements with a simple quad pattern match against the entire database, use the find subcommand. You can find statements by specifying one value in the quad (subject, predicate, object, or named graph) or any combination of values. Any URIs and/or literal values that you specify must match the value in the data. Partial values, wildcard characters, and regular expressions are not supported. This section lists example usage of anzo find. To view the help for find, run anzo help find.
Find all statements about a particular resource (subject):
anzo find –sub http://film.com/films/PulpFiction
Find all rdf:type statements for a particular type:
anzo find –pred rdf:type –uri film:Movie
Find all rdf:type statements for a particular type in a given named graph:
anzo find –pred rdf:type –uri film:Movie films:PulpFiction
Count all rdf:type statements for a particular type:
anzo find –n –pred rdf:type –uri film:Movie
Running Queries
To run a SPARQL query against the database, use the query subcommand. This section lists example usage of anzo query. To view the help for query, run anzo help query.
Execute a query from a file. The named graphs to run against are defined in the query:
anzo query –f filmQuery.rq
Execute a query from a file against all named graphs:
anzo query –a –f filmQuery.rq
Execute a query specified on the command line (not recommended):
anzo query "SELECT ?name …"
Execute a query from a file and pipe the results to another file:
anzo query –f film.rq > film.txt
Changing the Output Format
The anzo CLI enables you to request results in the following formats: TriG (default), RDF, RDFS, XML, NT, N3, TTL, TriX, CSV, and JSON. To change the format for results, you use the -o option with subcommands such as find, get, and query.
For example, the following get subcommand returns data set details in XML format:
anzo get -o xml http://csi.com/FileBasedLinkedDataSet/059060234accd1d2d44b6bbb4207ee54
<rdf:RDF
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ld="http://cambridgesemantics.com/ontologies/2009/05/LinkedData#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://csi.com/DataLocation/059060234accd1d2d44b6bbb4207ee54">
Source: https://docs.sw.siemens.com/documentation/external/PL20260212925461721/en-US/graph_studio/anzo-cli-basics.htm · retrieved 2026-08-23