### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/binary/BinaryRDFWriter.html Signals that the RDF writing process is starting. ```APIDOC ## Method: start() ### Description Signals that the RDF writing process is starting. ### Signature `void start()` ``` -------------------------------- ### Install pystardog Library Source: https://docs.stardog.com/tutorials/build-a-python-app Install the official Stardog Python client library. ```bash python -m pip install pystardog ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/AbstractRDFHandler.html Notification that the processing has started. ```APIDOC ## start() ### Description Notification that the processing has started. ### Method `void start()` ### Parameters None ### Response None ``` -------------------------------- ### start Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/turtle/TurtleWriter.html Signals that the RDF writing process is starting. ```APIDOC ## start() ### Description Signals that the RDF writing process is starting. ``` -------------------------------- ### Fully Qualified Connection String Examples Source: https://docs.stardog.com/operating-stardog/command-line-interface Examples of fully qualified connection strings for `stardog` commands, including server URL, database name, and options. ```text {scheme}{host}:{port}/{databaseName};{option}={value} ``` ```text http://myserver:5820/myDb ``` ```text http://localhost:12345/myOtherDb ``` ```text http://169.175.100.5:1111/myDb;reasoning=true ``` -------------------------------- ### Start Stardog Server with Upgrade Argument Source: https://docs.stardog.com/additional-resources/migration-guide Initiate an automatic system database upgrade to Stardog 9.0.0 by running the server start command with the --upgrade flag. ```bash server start --upgrade ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/turtle/PrettyTurtleWriter.html Signals that the RDF writing process is starting. This method must be called before any statements are handled. ```APIDOC ## start() ### Description Signals that the RDF writing process is starting. Specified by: `start` in interface `RDFHandler` Specified by: `start` in interface `RDFWriter` Overrides: `start` in class `TurtleWriter` ``` -------------------------------- ### start Method Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/ForwardingRDFHandler.html Notification that the processing has started. ```APIDOC ## start() ### Description Notification that the processing has started. ### Method public void start() ### Implements `RDFHandler.start` ``` -------------------------------- ### Install Stardog CLI on Debian-Based Systems Source: https://docs.stardog.com/install-stardog/client/linux-installation Installs the Stardog CLI package using apt-get. Adds the Stardog GPG key and repository before installation. ```bash $ sudo apt update $ sudo apt install gnupg $ curl http://packages.stardog.com/stardog.gpg.pub | sudo apt-key add $ echo "deb http://packages.stardog.com/deb/ stable main" | sudo tee -a /etc/apt/sources.list $ sudo apt-get update $ sudo apt-get install -y stardog-cli= ``` -------------------------------- ### Start Stardog Server Source: https://docs.stardog.com/install-stardog/server/azure-marketplace Navigate to the Stardog binary directory and start the Stardog server. This command may initially return a license error if the license is not yet in place. ```bash cd /opt/stardog/bin ./stardog-admin server start ``` -------------------------------- ### start Method Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/query/AbstractQueryResultHandler.html Signals the start of query processing. ```APIDOC ## start() ### Description Signal that query processing is starting. ### Method `public void start()` ### Specified by `start` in interface `QueryResultHandler` ``` -------------------------------- ### Start Stardog with Docker Compose Source: https://docs.stardog.com/docker/docker-compose Starts the Stardog service defined in your `docker-compose.yml` file. If volumes do not exist, they are created. ```bash docker compose up ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/rdfjson/RDFJSONWriter.html Signals the start of the RDF writing process. This method should be called before any RDF data is written. ```APIDOC ## start() ### Description Signals that the RDF writing process is starting. This method must be called before any `handle()` or `comment()` methods are invoked. ### Method `void start()` ### Implements `RDFHandler.start()` `RDFWriter.start()` ``` -------------------------------- ### Query JDBC metadata examples Source: https://docs.stardog.com/stardog-admin-cli-reference/virtual/virtual-source_metadata Various command-line examples for querying metadata from virtual graph sources using different levels of qualification. ```bash $ stardog-admin virtual source_metadata source.properties ``` ```bash $ stardog-admin virtual source_metadata source.properties source_schema ``` ```bash $ stardog-admin virtual source_metadata --catalog source_catalog source.properties source_schema ``` ```bash $ stardog-admin virtual source_metadata source.properties source_schema source_table ``` ```bash $ stardog-admin virtual source_metadata -c source_catalog source.properties source_schema source_table ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/trig/TrigWriter.html Signals that the RDF writing process is starting. This method is part of the RDFHandler and RDFWriter interfaces. ```APIDOC ## start() ### Description Signals that the RDF writing process is starting. ### Signature `public void start()` ### Implements `RDFHandler.start`, `RDFWriter.start` ### Overrides `TurtleWriter.start` ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/query/io/text/TextBooleanQueryResultWriter.html Indicates that the writing process has begun. ```APIDOC ## start() ### Description Indicates that the writing process has begun. ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/jsonld/StreamingJSONLDWriter.html Signals that the RDF writing process is starting. This method must be called before any RDF data is written. ```APIDOC ## start() ### Description Signals that the RDF writing process is starting. Specified by: `start` in interface `RDFHandler` Specified by: `start` in interface `RDFWriter` ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/query/io/text/csv/SPARQLCSVResultWriter.html Indicates that writing has begun. ```APIDOC ## start() ### Description Indicates that writing has begun. ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/ForwardingRDFWriter.html Signals that the RDF writing process is starting. This method is part of the RDFHandler and RDFWriter interfaces. ```APIDOC ## start() ### Description Signals that the RDF writing process is starting. ### Method `void start()` ### Implements * `RDFHandler.start()` * `RDFWriter.start()` ``` -------------------------------- ### Start ZooKeeper Instances Source: https://docs.stardog.com/high-availability-cluster/installation-and-setup Use ZooKeeper's command-line tools to start ZooKeeper nodes for the cluster. Ensure you have the correct configuration path. ```bash $ ./zookeeper-3.8.3/bin/zkServer.sh start /path/to/zookeeper/config # on node 1 $ ./zookeeper-3.8.3/bin/zkServer.sh start /path/to/zookeeper/config # on node 2 $ ./zookeeper-3.8.3/bin/zkServer.sh start /path/to/zookeeper/config # on node 3 ``` -------------------------------- ### Define sample dataset and label properties Source: https://docs.stardog.com/query-stardog/label-service Example RDF data and configuration for label properties used in service examples. ```turtle :Germany a :Country; rdfs:label "Deutschland"; skos:prefLabel "Germany"@en, "Deutschland"@de . :Spain a :Country; rdfs:label "España"; skos:prefLabel "Spain"@en . ``` ```text label.properties="http://www.w3.org/2004/02/skos/core#prefLabel,http://www.w3.org/2000/01/rdf-schema#label" ``` -------------------------------- ### Start Stardog Server Source: https://docs.stardog.com/operating-stardog/database-administration/checkpoint Use this command to start the Stardog server. This is used during the crisis restore process to trigger the system database restore. ```bash $ stardog-admin server start ``` -------------------------------- ### Install Stardog CLI Tools Source: https://docs.stardog.com/install-stardog Commands to install the Stardog CLI on different operating systems. ```bash $ brew install stardog-union/tap/stardog ``` ```bash $ curl http://packages.stardog.com/stardog.gpg.pub | sudo apt-key add $ echo "deb http://packages.stardog.com/deb/ stable main" | sudo tee -a /etc/apt/sources.list $ sudo apt-get update && sudo apt-get install -y stardog-cli ``` ```bash $ curl http://packages.stardog.com/stardog.gpg.pub | sudo rpm --import /dev/stdin $ curl http://packages.stardog.com/rpms/stardog.repo | sudo tee /etc/yum.repos.d/stardog.repo $ sudo yum install -y stardog-cli ``` ```bash $ curl https://downloads.stardog.com/stardog/stardog-cli-latest.zip --output stardog-cli-latest.zip $ unzip stardog-cli-latest.zip ``` -------------------------------- ### Start Stardog Instances Source: https://docs.stardog.com/high-availability-cluster/installation-and-setup Deploy Stardog instances for the cluster using the `stardog-admin server start` command. Specify the home directory and port. For cluster deployments, ensure superuser credentials are provided for ZooKeeper security and intra-cluster communication. ```bash $ stardog-admin server start --home ~/stardog --port 5821 # on node 4 $ stardog-admin server start --home ~/stardog --port 5821 # on node 5 $ stardog-admin server start --home ~/stardog --port 5821 # on node 6 ``` -------------------------------- ### HTTP Request Log Entry Source: https://docs.stardog.com/virtual-graphs/data-sources/rest-connector-configuration Example log output showing a GET request to the configured URI. ```text 2021-03-16T10:59:38.860-0400 ... [HTTP|Req: 8] GET https://localhost:8081/WeatherForecast ``` -------------------------------- ### Initialize Project Directory Source: https://docs.stardog.com/tutorials/build-a-python-app Create a new project directory and navigate into it. ```bash mkdir python-client && cd python-client ``` -------------------------------- ### Install Stardog CLI Tools Source: https://docs.stardog.com/install-stardog/index Commands to install the Stardog CLI on various operating systems. ```bash $ brew install stardog-union/tap/stardog ``` ```bash $ curl http://packages.stardog.com/stardog.gpg.pub | sudo apt-key add $ echo "deb http://packages.stardog.com/deb/ stable main" | sudo tee -a /etc/apt/sources.list $ sudo apt-get update && sudo apt-get install -y stardog-cli ``` ```bash $ curl http://packages.stardog.com/stardog.gpg.pub | sudo rpm --import /dev/stdin $ curl http://packages.stardog.com/rpms/stardog.repo | sudo tee /etc/yum.repos.d/stardog.repo $ sudo yum install -y stardog-cli ``` ```bash $ curl https://downloads.stardog.com/stardog/stardog-cli-latest.zip --output stardog-cli-latest.zip $ unzip stardog-cli-latest.zip ``` -------------------------------- ### Create a database from a configuration file Source: https://docs.stardog.com/stardog-admin-cli-reference/db/db-create Initializes an empty database using settings defined in a properties file. ```bash $ stardog-admin db create -c database.properties ``` -------------------------------- ### Stored Query Attributes Output Source: https://docs.stardog.com/operating-stardog/database-administration/stored-queries Example output format for retrieving stored query attributes using `stored get`. ```text +------------------------+-------------------------------------------------------------+ | Stored Query Attribute | Value | +------------------------+-------------------------------------------------------------+ | Description | a stored query for unit test | | Query String | select ?p {?s ?p ?o} | | Reasoning | true | | Database | typesDb | | Creator | user | | Shared | false | | Name | types | | Annotation | urn:typeGroups="types" | +------------------------+-------------------------------------------------------------+ ``` -------------------------------- ### Start React Development Server Source: https://docs.stardog.com/tutorials/build-a-react-app Launch the local development server to view the application. ```bash yarn start ``` -------------------------------- ### Implement User List Endpoint Source: https://docs.stardog.com/developing/extending-stardog/http-server Example implementation of a GET request handler that retrieves users and sends a JSON response. ```java @GET @Produces("application/json") public void listUsers(final HttpServerExchange theExchange) { JsonArray aUsers = new JsonArray(); mKernel.get().getUserManager().getAllUsers().stream() .map(JsonPrimitive::new) .forEach(aUsers::add); JsonObject aObj = new JsonObject(); aObj.add(HTTPAdminProtocolConsts.COLLECTION_USERS, aUsers); final String aJSON = aObj.toString(); HttpServerExchanges.Responses.contentType(theExchange, "application/json"); HttpServerExchanges.Responses.contentLength(theExchange, aJSON.length()); theExchange.getResponseSender().send(aJSON); } ``` -------------------------------- ### Initialize React Project Source: https://docs.stardog.com/tutorials/build-a-react-app Create a new React application directory using npx. ```bash npx create-react-app ~/stardog-react ``` -------------------------------- ### Start Stardog Server on a Custom Port Source: https://docs.stardog.com/operating-stardog/server-administration/running-the-server To use a port other than the default 5820, specify the desired port when running the Docker container. This example binds to port 8080. ```bash $ docker run -v ~/stardog-home:/var/opt/stardog -p 8080:5820 stardog/stardog ``` -------------------------------- ### Create a database with initial data Source: https://docs.stardog.com/stardog-admin-cli-reference/db/db-create Initializes a new database with a specified name and loads RDF files into the default graph. ```bash $ stardog-admin db create -n my-database input.ttl another_file.rdf moredata.rdf.gz ``` -------------------------------- ### Using Stardog CLI Commands Source: https://docs.stardog.com/install-stardog/client/macOS-installation Once installed, you can use `stardog` and `stardog-admin` commands to interact with remote Stardog servers. Examples include querying a server and checking its status. ```bash # Query a remote server $ stardog query -s http://my-stardog-server:5820 mydb "SELECT * WHERE { ?s ?p ?o } LIMIT 10" ``` ```bash # Check server status $ stardog-admin --server http://my-stardog-server:5820 server status ``` -------------------------------- ### Install bash-completion on Ubuntu Source: https://docs.stardog.com/operating-stardog/command-line-interface Installs the bash-completion package on Ubuntu systems using apt-get. This provides shell autocompletion capabilities. ```bash sudo apt-get install bash-completion ``` -------------------------------- ### Create Stardog home directory and add license Source: https://docs.stardog.com/install-stardog/server/docker Prepare the Stardog home directory, which stores databases and configuration. Ensure a valid license file is placed here for the server to start. For Windows, use a Windows-style path. ```bash mkdir -p ~/stardog-home cp /path/to/stardog-license-key.bin ~/stardog-home/ ``` -------------------------------- ### Example Path Query Results Source: https://docs.stardog.com/query-stardog/path-queries This table shows the expected results of the path query, including the start node (x), end node (y), and the date of birth for the end node. ```text +------------------+---------------------+------------------------+ | x | y | date | +------------------+---------------------+------------------------+ | test:Kevin_Bacon | test:Gary_Sinise | | | test:Gary_Sinise | test:Robert_Redford | "1936-08-18"^^xsd:date | | | | | | test:Kevin_Bacon | test:Brad_Pitt | | | test:Brad_Pitt | test:Robert_Redford | "1936-08-18"^^xsd:date | | | | | | test:Kevin_Bacon | test:Tom_Cruise | | | test:Tom_Cruise | test:Robert_Redford | "1936-08-18"^^xsd:date | +------------------+---------------------+------------------------+ ``` -------------------------------- ### Query Plan Example Source: https://docs.stardog.com/operating-stardog/database-administration/managing-query-performance This is an example of a query plan that can help diagnose performance issues by identifying expensive operators like MergeJoin. ```text MergeJoin(?person) [#391K] +─ Sort(?person) [#391K] | `─ MergeJoin(?article) [#391K] | +─ Scan[POSC](?article, rdf:type, bench:Article) [#208K] | `─ Scan[PSOC](?article, dc:creator, ?person) [#898K] `─ Scan[PSOC](?person, foaf:name, ?name) [#433K] ``` -------------------------------- ### Calculate Average Path Length Source: https://docs.stardog.com/query-stardog/stored-query-service This example shows how to compute the average length of paths returned by a stored path query. It uses the stardog:length function within a SELECT query and groups the results by the start node. ```sparql prefix sqs: prefix stardog: # return the average length of paths grouped by the start node SELECT ?start (avg(stardog:length(?path)) as ?avg_length) { SERVICE { [] sqs:vars ?start, ?path } } GROUP BY ?start ``` -------------------------------- ### Create a database with configuration options Source: https://docs.stardog.com/stardog-admin-cli-reference/db/db-create Initializes a database with specific configuration options and initial data, using the double-dash separator to distinguish arguments. ```bash $ stardog-admin db create -n db1 -o icv.enabled=true icv.reasoning.enabled=true -- input.ttl ``` -------------------------------- ### start Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/ParserContext.html Notification that the processing has started. ```APIDOC ## start ### Description Notification that the processing has started. Specified by: `start` in interface `RDFHandler` Overrides: `start` in class `AbstractRDFHandler` ``` -------------------------------- ### Setup Virtual Environment Source: https://docs.stardog.com/tutorials/build-a-python-app Create and activate a Python virtual environment to manage project dependencies. ```bash python3 -m venv env ``` ```bash source env/bin/activate ``` -------------------------------- ### Create a Database with Custom Options Source: https://docs.stardog.com/developing/programming-with-stardog/java.html Demonstrates creating a database with specific configuration options, such as enabling full-text search. ```java try (AdminConnection aAdminConnection = AdminConnectionConfiguration.toServer("http://localhost:5820").credentials("admin", "admin").connect()) { aAdminConnection.newDatabase("test") .set(SearchOptions.SEARCHABLE, true) .create(); } ``` -------------------------------- ### Start HAProxy Source: https://docs.stardog.com/high-availability-cluster/installation-and-setup/index Launch the HAProxy process using the specified configuration file. ```bash $ haproxy -f haproxy.cfg ``` -------------------------------- ### Install bash-completion via MacPorts Source: https://docs.stardog.com/operating-stardog/command-line-interface Installs bash-completion using MacPorts. This is an alternative to Homebrew for installing shell completion support. ```bash sudo port install bash-completion ``` -------------------------------- ### Example Properties File for External Compute Source: https://docs.stardog.com/external-compute/vg-materialization-external-compute This is an example properties file used for configuring external compute platforms like EMR Serverless or Spark on Kubernetes. It includes JDBC connection details and SQL schema information. ```properties jdbc.url=jdbc:spark://adb-XXXXXX.XX.azuredatabricks.net:443/default;transportMode=http;ssl=1;AuthMech=3;httpPath=/sql/1.0/endpoints/XXXXXXX; jdbc.username=xxxx jdbc.password=xxxxx jdbc.driver=com.simba.spark.jdbc.Driver sql.schemas=* ``` -------------------------------- ### Create Stardog Database Source: https://docs.stardog.com/tutorials/using-virtual-graphs Initialize an empty database named 'music' to host the virtual graph. ```bash stardog-admin db create -n music ``` -------------------------------- ### get Source: https://docs.stardog.com/javadoc/snarl/com/complexible/stardog/plan/eval/service/ServiceQuery.html Gets a configuration option of the ServiceQuery. ```APIDOC ## get ### Description Get a configuration option of the ServiceQuery. ### Method public final T get(Option theOption) ### Type Parameters * `T` - the type of the value of the option ### Parameters * **theOption** (Option) - the option to retrieve ### Returns the value of the option, or null if it's not set and there is no default ``` -------------------------------- ### Install Stardog CLI on RPM-Based Systems Source: https://docs.stardog.com/install-stardog/client/linux-installation Installs the Stardog CLI package using yum. Imports the GPG key and adds the repository configuration. ```bash $ curl http://packages.stardog.com/stardog.gpg.pub -o stardog.gpg.pub $ sudo rpm --import stardog.gpg.pub $ curl http://packages.stardog.com/rpms/stardog.repo | sudo tee /etc/yum.repos.d/stardog.repo $ sudo yum install -y stardog-cli- ``` -------------------------------- ### Stardog Assembler Description Example Source: https://docs.stardog.com/javadoc/snarl/com/complexible/stardog/jena/StardogModelAssembler.html This example shows how to define a Stardog database connection using an RDF assembler description. It specifies the Stardog URL, database name, username, password, and enables reasoning. ```turtle @prefix ja: . @prefix stardog: . @prefix : . stardog:Database ja:assembler "com.complexible.stardog.jena.StardogModelAssembler" . [] a stardog:Database ; stardog:url ; stardog:name "myDB" ; stardog:username "user" ; stardog:password "pass" ; stardog:reasoning true . ``` -------------------------------- ### Create Database using Configuration File (CLI) Source: https://docs.stardog.com/operating-stardog/database-administration/managing-databases Create a database using a properties file for configuration via the stardog-admin CLI. ```bash # -n/--name option can be omitted because 'database.name' is contained in database.properties stardog-admin db create -c database.properties Successfully created database 'myDatabase'. ``` -------------------------------- ### Quickstart Stardog Deployment on Kubernetes Source: https://docs.stardog.com/install-stardog/server/kubernetes Use this command to quickly deploy Stardog for evaluation or development environments. Ensure the VERSION environment variable is set. ```bash export VERSION=${VERSION} helm repo add stardog https://stardog-oss.github.io/kube-stardog-stack helm repo update helm install my-stardog-stack stardog/kube-stardog-stack --version ${VERSION} ``` -------------------------------- ### install Source: https://docs.stardog.com/javadoc/snarl/com/complexible/common/inject/Injectors.html Installs a Guice module class into the given binder. ```APIDOC ## install ### Description Installs a Guice module class into the given binder. ### Method Signature `static void install(com.google.inject.Binder theBinder, Class theClass)` ``` -------------------------------- ### Start Header Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/query/io/json/AbstractSPARQLJSONWriter.html Protected method to start writing the header section. ```java protected void startHeader() ``` -------------------------------- ### Start Stardog with Optional SSL Support Source: https://docs.stardog.com/operating-stardog/security/encryption-in-transit Use this command to start the Stardog server, allowing both HTTP and HTTPS connections. The default ports are 5820 for HTTP and 5821 for HTTPS. ```bash stardog-admin server start --enable-ssl ``` -------------------------------- ### start Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/jsonld/JSONLDWriter.html Signals the start of the RDF writing process. This method is deprecated. ```APIDOC ## start() ### Description Deprecated. Signals that the RDF writing process is starting. ``` -------------------------------- ### Initialize .NET Project Source: https://docs.stardog.com/tutorials/accessing-stardog-from-dotnet Commands to create a new console application and add the required dotNetRDF package. ```bash dotnet new console --framework net7.0 --no-restore ``` ```bash dotnet add package dotNetRDF ``` -------------------------------- ### SimpleSAXParser Example XML Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/query/io/xml/SimpleSAXParser.html This is the example XML document that will be parsed by SimpleSAXParser. ```xml Hello World! ``` -------------------------------- ### Explain Query Plan with Query File using CLI Source: https://docs.stardog.com/getting-support Provide the path to a query file when using the `query explain` CLI command. ```bash stardog query explain myDatabase ~/queries/myQuery.rq ``` -------------------------------- ### Schema Declaration Example Source: https://docs.stardog.com/additional-resources/migration-guide Example of schema.org domainIncludes declaration for a property. ```turtle :Person a owl:Class . :worksFor a owl:ObjectProperty ; so:domainIncludes :Person . ``` -------------------------------- ### Permission Examples Source: https://docs.stardog.com/operating-stardog/security/security-model Illustrates the application of the permission syntax for various actions and resources. ```text [CREATE, “db:*”] ``` ```text [READ, “db:myDb”] ``` ```text [GRANT, “virtual-graph:virtual://myVG”] ``` ```text [READ, “named-graph:myDb\http://stardog.com/graphs/graph1”] ``` -------------------------------- ### Validation Report Examples Source: https://docs.stardog.com/data-quality-constraints Example outputs for valid and invalid database states. ```Turtle @prefix sh: . [ a sh:ValidationReport ; sh:conforms true ] . ``` ```Turtle @prefix : . @prefix sh: . [ a sh:ValidationReport ; sh:conforms false ; sh:result [ a sh:ValidationResult ; sh:resultSeverity sh:Violation ; sh:sourceShape :SongLengthShape ; sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; sh:focusNode :Love_Me_Do ; sh:resultPath :length ; sh:value 125.0 ; sh:resultMessage "Value must have datatype xsd:integer" ] , [ a sh:ValidationResult ; sh:resultSeverity sh:Violation ; sh:sourceShape :AlbumDateShape ; sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; sh:focusNode :Please_Please_Me ; sh:resultPath :date ; sh:resultMessage "There must be <= 1 values" ] , [ a sh:ValidationResult ; sh:resultSeverity sh:Violation ; sh:sourceShape :AlbumTrackShape ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:focusNode :McCartney ; sh:resultPath :track ; sh:resultMessage "There must be >= 1 values" ] ] . ``` -------------------------------- ### Start Stardog server with Docker Source: https://docs.stardog.com/install-stardog/server/docker Launch the Stardog server container, mounting the local Stardog home directory and mapping the default port for server access. Additional configurations for SELinux and data persistence are detailed in the documentation. ```bash docker run -v ~/stardog-home/:/var/opt/stardog -p 5820:5820 stardog/stardog ``` -------------------------------- ### Query Example Source: https://docs.stardog.com/additional-resources/migration-guide Example SPARQL query that may be affected by the reasoning optimization. ```sparql ?x a :Person ; :worksFor ?y . ``` -------------------------------- ### start Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/LineSupplier.html Starts the line reading process in a separate thread. This method returns immediately. ```APIDOC ## start ### Description Starts the reading process. This function will return immediately and reading the input stream will be done in a thread in the `shared executor` until the stream is consumed or this supplier is `stopped`. If this function is called multiple times subsequent calls will have no effect. ### Method `public void start() throws IOException` ### Throws `IOException` ``` -------------------------------- ### _begin() Source: https://docs.stardog.com/javadoc/snarl/com/complexible/stardog/api/KernelDatabaseConnection.html Protected method to begin a transaction. ```APIDOC ## _begin() ### Description Protected method to begin a transaction. ### Method Signature ```java protected UUID _begin() throws StardogException ``` ### Throws * `StardogException` ``` -------------------------------- ### Start ZooKeeper Instances Source: https://docs.stardog.com/high-availability-cluster/installation-and-setup/index Initialize the ZooKeeper nodes using the standard server script provided with the ZooKeeper distribution. ```bash $ ./zookeeper-3.8.3/bin/zkServer.sh start /path/to/zookeeper/config # on node 1 $ ./zookeeper-3.8.3/bin/zkServer.sh start /path/to/zookeeper/config # on node 2 $ ./zookeeper-3.8.3/bin/zkServer.sh start /path/to/zookeeper/config # on node 3 ``` -------------------------------- ### start() Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/DelegatingRDFHandler.html Notification that the processing has started. This method is called at the beginning of an RDF processing task. ```APIDOC ## start() ### Description Notification that the processing has started. ### Method `void start()` ### Implements `RDFHandler.start()` ``` -------------------------------- ### Database Contents Example Source: https://docs.stardog.com/query-stardog/bi-tools-and-sql-queries Example RDF data representing persons with names and nationalities. ```turtle @prefix : . :Alice a :Person ; :name "Alice" ; :nationality :USA . :Bob a :Person ; :name "Bob" ; :nationality :UK . ``` -------------------------------- ### Stardog server startup output Source: https://docs.stardog.com/install-stardog/server/docker Example output indicating a successful Stardog server startup within a Docker container, showing license information and network accessibility. ```text ************************************************************ This copy of Stardog is licensed to Somebody Awesome (somebody.awesome@stardog.com), Stardog This is a Enterprise license This license will expire in 237 days on Thu Sep 17 14:05:09 GMT 2026 ************************************************************ :; ;; `;`: `'+', :: `++ `;:` +###++, ,#+ `++ . ##+.,', '#+ ++ + ,## ####++ ####+: ##,++` .###+++ .####+ ####++++# `##+ ####+' ##+#++ ###++``###'+++ `###'+++ ###`,++.,: ####+ ##+ ++. ##: ### `++ ### `++` ##` ++: ###++, ##+ ++, ##` ##; `++ ##: ++; ##, ++: ;+++ ##+ ####++, ##` ##: `++ ##: ++' ;##'#++ ;++ ##+ ### ++, ##` ##' `++ ##; ++: ####+ ,. +++ ##+ ##: ++, ##` ### `++ ### .++ '#; ,####++' +##++ ###+#+++` ##` :####+++ `####++' ;####++` `####+; ##++ ###+,++` ##` ;###:++ `###+; `###++++ ## `++ .## ;++ #####++` `;;;. ************************************************************ Stardog server 12.0.0 started on Fri Jan 23 02:01:32 GMT 2026. Stardog server is listening on all network interfaces. HTTP server available at http://localhost:5820. Default query executor is AUTO. STARDOG=/opt/stardog/bin/.. STARDOG_EXT=/var/opt/stardog-ext STARDOG_HOME=/var/opt/stardog/ ``` -------------------------------- ### Configure Database Options at Creation using CLI Source: https://docs.stardog.com/operating-stardog/database-administration/managing-databases Pass configuration options to the `stardog-admin db create` command using the `-o` or `--options` flag. Options are key-value pairs separated by spaces. Use `--` after the last option if values might be misinterpreted. ```bash stardog-admin db create -n myDatabase -o option1=value1 option2=value2 -- ``` -------------------------------- ### Instance Data Example Source: https://docs.stardog.com/additional-resources/migration-guide Example of instance data with type declarations and property assertions. ```turtle :Alice a :Person ; :worksFor :ACME ; :Bob :worksFor :ACME . ``` -------------------------------- ### Initialize Gradle Project Source: https://docs.stardog.com/tutorials/learn-java Interactive prompts for configuring a new Gradle project for a Java application. ```text Select type of project to generate: 1: basic 2: application 3: library 4: Gradle plugin Enter selection (default: basic) [1..4] 2 Select implementation language: 1: C++ 2: Groovy 3: Java 4: Kotlin 5: Scala 6: Swift Enter selection (default: Java) [1..6] 3 Split functionality across multiple subprojects?: 1: no - only one application project 2: yes - application and library projects Enter selection (default: no - only one application project) [1..2] 1 Select build script DSL: 1: Groovy 2: Kotlin Enter selection (default: Groovy) [1..2] 1 Select test framework: 1: JUnit 4 2: TestNG 3: Spock 4: JUnit Jupiter Enter selection (default: JUnit Jupiter) [1..4] 1 Project name (default: JavaStardogClient): Source package (default: JavaStardogClient): ``` -------------------------------- ### start Source: https://docs.stardog.com/javadoc/snarl/com/stardog/stark/io/rdfxml/RDFXMLWriter.html Signals that the RDF writing process is starting. This method must be called before any writing operations. ```APIDOC ## start ### Description Signals that the RDF writing process is starting. This method should be called once at the beginning of the serialization process. ### Method `public void start() throws WritingFailed` ### Throws * `WritingFailed` - If the writing process fails to start. ``` -------------------------------- ### Create Stardog Database and Load Data Source: https://docs.stardog.com/query-stardog/obfuscating-data Use the stardog-admin tool to create a new database and load the sample data. ```bash stardog-admin db create -n myDatabase sample.trig ``` -------------------------------- ### Explain Query with Live Profiling Source: https://docs.stardog.com/operating-stardog/database-administration/managing-query-performance Start a query with additional instrumentation for profiling and inquire about its live state using the query ID. ```bash stardog-admin query explain -- {db} {query_id} ``` -------------------------------- ### Configure Stardog Server via JVM Arguments Source: https://docs.stardog.com/operating-stardog/security/encryption-in-transit Alternatively, you can set SSL Keystore properties via JVM arguments when starting the Stardog server. ```bash export STARDOG_SERVER_JAVA_ARGS="-Djavax.net.ssl.keyStore=/path/to/my-keystore.jks -Djavax.net.ssl.keyStorePassword=changeit" ``` -------------------------------- ### Install HAProxy on Debian Source: https://docs.stardog.com/high-availability-cluster/installation-and-setup/index Use standard package management to install HAProxy on Debian-based systems. ```bash $ sudo apt-get update $ sudo apt-get install haproxy ``` -------------------------------- ### Executing a Select Query with Parameters and Limits Source: https://docs.stardog.com/javadoc/snarl/com/complexible/stardog/api/Query.html Demonstrates how to create a SelectQuery, set parameters, apply offset and limit, execute the query, and properly close the result set. It is recommended to use parameter methods to avoid injection attacks. ```java SelectQuery q = c.select("select * where ..."); q.parameter("foo", 12); q.parameter("bar", false); q.parameter("subj", s); q.offset(10); q.limit(250); // run it TupleQueryResult r = q.execute(); while (r.hasNext()) { // do awesome things... r.next(); } // always close your query result sets! r.close(); ``` -------------------------------- ### Pass Server Startup Options Source: https://docs.stardog.com/docker/server-configuration Append startup flags directly to the docker run command to configure the Stardog server entrypoint. ```bash $ docker run -v ~/stardog-home:/var/opt/stardog -p 5820:5820 \ stardog/stardog --enable-ssl ``` ```bash $ docker run -v ~/stardog-home:/var/opt/stardog -p 5820:5820 \ stardog/stardog --enable-ssl --bind 192.168.1.100 ``` -------------------------------- ### Create Stardog Database Source: https://docs.stardog.com/tutorials/accessing-stardog-from-dotnet Establishes a server connection and recreates the database if it already exists. ```csharp // using will automatically call Dispose() for us using (StardogServer stardog = new StardogServer(SERVER_URL, STARDOG_USERNAME, STARDOG_PASSWORD)) { // if the database already exists, delete it if (stardog.ListStores().Contains(DATABASE_NAME)) { stardog.DeleteStore(DATABASE_NAME); } IStoreTemplate template = stardog.GetDefaultTemplate(DATABASE_NAME); stardog.CreateStore(template); } ``` -------------------------------- ### Initialize ZooKeeper Data Directories Source: https://docs.stardog.com/high-availability-cluster/installation-and-setup/index Commands to create the data directory for ZooKeeper on each node. ```bash $ mkdir /data/zookeeperdata # on node 1 $ mkdir /data/zookeeperdata # on node 2 $ mkdir /data/zookeeperdata # on node 3 ``` -------------------------------- ### Verify Stardog CLI Installation Source: https://docs.stardog.com/stardog-cloud/accessing-api-endpoint Command to verify the Stardog CLI installation by listing databases on the server. ```bash ​​$ stardog-admin --server https://[custom-name].stardog.cloud:5820 db list -u ``` -------------------------------- ### Install Stardog JavaScript Library Source: https://docs.stardog.com/tutorials/build-a-react-app Navigate to the project directory and add the stardog.js dependency. ```bash cd ~/stardog-react yarn add stardog ``` -------------------------------- ### Obfuscated SPARQL Query Example Source: https://docs.stardog.com/query-stardog/obfuscating-data Example of a SPARQL query after obfuscation, with URIs replaced by obfuscated identifiers. ```sparql SELECT ?x0 FROM WHERE { ?x0 . } ``` -------------------------------- ### Configure keystore settings via environment variables Source: https://docs.stardog.com/docker/ssl Passes Java system properties for keystore location and password using the STARDOG_SERVER_JAVA_ARGS environment variable. ```bash docker run --name my-stardog \ -v stardog-home:/var/opt/stardog \ -v stardog-security:/stardog-security \ -p 5820:5820 -p 5821:5821 \ -e STARDOG_SERVER_JAVA_ARGS="-Djavax.net.ssl.keyStore=/stardog-security/my-keystore.jks -Djavax.net.ssl.keyStorePassword=changeit" \ stardog/stardog --enable-ssl ``` -------------------------------- ### Obfuscated Data Example Source: https://docs.stardog.com/query-stardog/obfuscating-data Example of RDF data after obfuscation, using Stardog's obfuscation prefix. ```turtle @prefix obf: . obf:19b37d9ffd391cd0e29ad7a0c92722e1190ab546213370807320d5e351d10b79 { obf:d27330fb53d3f2a6d5068ce46d248392ec09f93692a8e36a7bd33a3c128dafd4 obf:64b72b77e8949f32a09d38590b15e7a757a1db3bc0a186405cc4e83141b54e2a "628b49d96dcde97a430dd4f597705899e09a968f793491e4b704cae33a40dc02" ; obf:396dc63bd5eb69cb7a1283567c9eadd91d1319555faac5e6644314b0cf0c150d "888b19a43b151683c87895f6211d9f8640f97bdc8ef32f03dbe057c8f5e56d32" . obf:ac6d2bb543a71a5ec4ac0a591b8c0aafa9ad54adf0d1d686f00fabc6799ddcf9 obf:64b72b77e8949f32a09d38590b15e7a757a1db3bc0a186405cc4e83141b54e2a "628b49d96dcde97a430dd4f597705899e09a968f793491e4b704cae33a40dc02" ; obf:396dc63bd5eb69cb7a1283567c9eadd91d1319555faac5e6644314b0cf0c150d "4fac6dbe26e823ed6edf999c63fab3507119cf3cbfb56036511aa62e258c35b4" . } ``` -------------------------------- ### Begin a transaction Source: https://docs.stardog.com/stardog-cli-reference/tx/tx-begin Initiates a new transaction for the specified database. ```bash $ stardog tx begin myDb ``` -------------------------------- ### begin() Source: https://docs.stardog.com/javadoc/snarl/com/complexible/stardog/api/Connection Starts a new transaction on the database. All subsequent operations will be part of this transaction until it is committed or rolled back. ```APIDOC ## Method: begin `UUID begin()` ### Description Start a new transaction. ### Method Signature `public UUID begin()` ### Returns * `UUID` - The unique identifier for the newly started transaction. ``` -------------------------------- ### Install Spark Operator via Helm Source: https://docs.stardog.com/voicebox/using-unstructured-data-with-voicebox Commands to add the repository and install the Spark Operator into a dedicated namespace. ```bash helm repo add spark-operator https://kubeflow.github.io/spark-operator # Update Helm repositories helm repo update # Install Spark Operator helm install spark-operator spark-operator/spark-operator \ --namespace spark-operator \ --create-namespace \ --set webhook.enable=true \ --set sparkJobNamespace=default ``` -------------------------------- ### Configure and Manage a Stardog Connection Pool Source: https://docs.stardog.com/developing/programming-with-stardog/java.html Demonstrates initializing a connection configuration, setting up a pool with specific parameters, obtaining and releasing connections, and shutting down the pool. ```java // We need a configuration object for our connections, this is all the information about // the database that we want to connect to. ConnectionConfiguration aConnConfig = ConnectionConfiguration .to("testConnectionPool") .server("http://localhost:5820") .credentials("admin", "admin"); // We want to create a pool over these objects. See the javadoc for ConnectionPoolConfig for // more information on the options and information on the defaults. ConnectionPoolConfig aConfig = ConnectionPoolConfig .using(aConnConfig) // use my connection configuration to spawn new connections .minPool(10) // the number of objects to start my pool with .maxPool(1000) // the maximum number of objects that can be in the pool (leased or idle) .expiration(1, TimeUnit.HOURS) // Connections can expire after being idle for 1 hr. .blockAtCapacity(1, TimeUnit.MINUTES); // I want obtain to block for at most 1 min while trying to obtain a connection. // now i can create my actual connection pool ConnectionPool aPool = aConfig.create(); // if I want a connection object... Connection aConn = aPool.obtain(); // now I can feel free to use the connection object as usual... // and when I'm done with it, instead of closing the connection, I want to return it to the pool instead. aPool.release(aConn); // I could also use a try-with-resources block, as connections obtained from the pool will auto-release when `close()` is called try (Connection anotherConn = aPool.obtain()) { // Do more things in here and then let java release it back to the pool } // and when I'm done with the pool, shut it down! aPool.shutdown(); ``` -------------------------------- ### Install bash-completion via Homebrew Source: https://docs.stardog.com/operating-stardog/command-line-interface Installs bash-completion using Homebrew. This is a prerequisite for enabling Stardog autocomplete on macOS. ```bash brew install bash-completion ``` -------------------------------- ### SP2B Query 5a Example Source: https://docs.stardog.com/tutorials/reading-stardog-query-plans A query example that may trigger the use of a LoopJoin node in the execution plan. ```sparql SELECT DISTINCT ?person ?name WHERE { ?article rdf:type bench:Article . ?article dc:creator ?person . ?inproc rdf:type bench:Inproceedings . ?inproc dc:creator ?person2 . ?person foaf:name ?name . ?person2 foaf:name ?name2 FILTER (?name=?name2) } ``` -------------------------------- ### Unselective SPARQL Query Example Source: https://docs.stardog.com/tutorials/reading-stardog-query-plans An example of a query that returns a large volume of results, making it inherently unselective. ```sparql SELECT DISTINCT ?name1 ?name2 WHERE { ?article1 rdf:type bench:Article . ?article2 rdf:type bench:Article . ?article1 dc:creator ?author1 . ?author1 foaf:name ?name1 . ?article2 dc:creator ?author2 . ?author2 foaf:name ?name2 . ?article1 swrc:journal ?journal . ?article2 swrc:journal ?journal FILTER (?name1 SELECT ?acct ?amount { ?acct a :Account ; :hasAmount ?amount ; } ``` -------------------------------- ### Explain Query Plan using CLI Source: https://docs.stardog.com/getting-support Use the `query explain` command in the Stardog CLI to get the query plan for a given database and query. ```bash stardog query explain myDatabase "SELECT ?title WHERE { ?title . }" ``` -------------------------------- ### SPARQL Query Example Source: https://docs.stardog.com/operating-stardog/database-administration/managing-query-performance This SPARQL query is used as an example to demonstrate performance issues related to join algorithms and filters. ```sparql SELECT DISTINCT ?person ?name WHERE { ?article rdf:type bench:Article . ?article dc:creator ?person . ?inproc rdf:type bench:Inproceedings . ?inproc dc:creator ?person2 . ?person foaf:name ?name . ?person2 foaf:name ?name2 FILTER (?name=?name2) } ``` -------------------------------- ### Create a database with named graphs Source: https://docs.stardog.com/stardog-admin-cli-reference/db/db-create Initializes a database and loads files into specific named graphs using the @ syntax. ```bash $ stardog-admin db create -n myDb input0.ttl @http://stardog.com/graph/1 input1.ttl input2.ttl @urn:stardog:graph:2 input3.ttl @ input4.ttl ```