{"id":26190089,"url":"https://github.com/zazuko/vscode-sparql-notebook","last_synced_at":"2025-04-15T02:09:30.754Z","repository":{"id":38246816,"uuid":"433851089","full_name":"zazuko/vscode-sparql-notebook","owner":"zazuko","description":"Visual Studio Code SPARQL Notebook Extension","archived":false,"fork":false,"pushed_at":"2025-02-17T09:05:21.000Z","size":3869,"stargazers_count":28,"open_issues_count":15,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-15T02:09:24.167Z","etag":null,"topics":["notebook","rdf","sparql","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=Zazuko.sparql-notebook","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zazuko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-01T14:05:28.000Z","updated_at":"2025-03-09T12:35:59.000Z","dependencies_parsed_at":"2023-02-10T15:31:34.069Z","dependency_job_id":"9967270a-a316-4ee0-bb69-8d9d16deefdf","html_url":"https://github.com/zazuko/vscode-sparql-notebook","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fvscode-sparql-notebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fvscode-sparql-notebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fvscode-sparql-notebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fvscode-sparql-notebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zazuko","download_url":"https://codeload.github.com/zazuko/vscode-sparql-notebook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991544,"owners_count":21194894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notebook","rdf","sparql","vscode","vscode-extension"],"created_at":"2025-03-12T00:52:27.833Z","updated_at":"2025-04-15T02:09:30.726Z","avatar_url":"https://github.com/zazuko.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VSCode SPARQL Notebook\n\n\nThis extension provides a _SPARQL Notebook_ mode for [Visual Studio Code](https://code.visualstudio.com). This is a powerful way to document SPARQL queries and make them execute as notebook code cells.\n\nUse a SPARQL notebook to:\n\n- Provide hands-on SPARQL training\n- Document data available via SPARQL\n- Validate data via SPARQL\n- Run queries against a SPARQL endpoint\n- Run queries against a local RDF file\n\nThis notebook can render SPARQL SELECT results and RDF graphs via SPARQL CONSTRUCT queries.\n\n![sparql-notebook](https://user-images.githubusercontent.com/8033981/157274845-e722bace-16aa-4055-8a07-0b8fc5a8b112.gif)\n\nThe extension automatically installs the [Stardog RDF Grammars](https://marketplace.visualstudio.com/items?itemName=stardog-union.stardog-rdf-grammars) and [SPARQL Language Server](https://marketplace.visualstudio.com/items?itemName=stardog-union.vscode-langserver-sparql) extensions for SPARQL syntax highlighting and auto-completion.\n\nThis extension is still pretty raw but it works for us [tm]. Bug reports \u0026 contributions are very welcome!\n\n## Get the Extension\n- [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=Zazuko.sparql-notebook)\n-  [Open VSX Registry](https://open-vsx.org/extension/zazuko/sparql-notebook)\n\n## Manual\n- [Manual](./doc/00_intro.md)\n\n## Features\n\n- Open any `.sparqlbook` file as a Notebook.\n- Execute query blocks in the Notebook UI and view output.\n- Configure endpoint connections in the SPARQL Notebook side panel.\n- Export a `.sparqlbook` file to Markdown.\n- Attach `.sparql` or `.rq` files to cells.\n- Use a local RDF file as a data source.\n\n## Installation\n\nYou can install it directly from the Visual Studio Code Extension tab. It is available on the [Marketplace](https://marketplace.visualstudio.com/items?itemName=Zazuko.sparql-notebook)\n\n## Usage\n\nOpen any `.sparqlbook` file with the `Open With` menu option. Then, select the `SPARQL Notebook` format. Connect to a SPARQL Endpoint and execute query blocks and view output interactively.\n\n## Endpoints\n\nEndpoints are the destinations for sending SPARQL queries, and there are two types:\n\n### Remote Servers (HTTP / HTTPS)\nYou can connect to a remote server by clicking the `+` button in the `SPARQL Connections` panel. Fill in the server URL and optional credentials. If you omit credentials, the extension will attempt a connection without them. This connection is used throughout the entire notebook, except when a cell defines its own endpoint.\n\n### Local Endpoints\nConfigure a local endpoint by right-clicking on a TTL, NT, or RDF file and selecting `SPARQL Notebook: Use File as Store`. This creates a new local endpoint populated with the chosen file's content. The entire notebook uses this endpoint, except when a cell specifies its own.\n\n![local-file-store](https://github.com/zazuko/vscode-sparql-notebook/assets/8033981/c02dc4bd-1cd1-4c01-8032-cc2d74fceb5c)\n\n### Cell-Specific Endpoints\nYou can assign an endpoint to a specific cell by adding a comment with the endpoint URL or file path in a code cell:\n\n```sparql\n# [endpoint=https://lindas.admin.ch/query]\n```\n\nor \n```sparql\n# [endpoint=./relative/path/file.ttl]\n```\n\n```sparql\n# [endpoint=/absolute/path/file.ttl]\n```\nWorking with relative paths makes the notebook portable.\n\nFor file based endpoints you can have multiple files in the endpoint definitions in many ways:\n\nAbsolute or relative paths pattern are supported but i suggest to use relative paths for portability.\n```sparql\n# [endpoint=./rdf/{a,b}.ttl]\n```\nor \n```sparql\n# [endpoint=./rdf/*.ttl]\n```\nor \n```sparql\n# [endpoint=./rdf/a.ttl]\n# [endpoint=./rdf/b.ttl]\n```\n\nNote: You cannot mix HTTP endpoints and file endpoints in the same cell.\n\n### Cell Status Bar\nThe cell status bar displays information about the endpoint in use and its source.\n\n## Code Cell (SPARQL Cell)\nA code cell contains a SPARQL query, which can be a SELECT, ASK, CONSTRUCT, or DESCRIBE query. Execute a code cell by clicking the Run Cell button in the cell toolbar or pressing Ctrl+Enter (or Option+Enter on Mac).\n\n### Query from a file\nYou can attach a query file to a cell. The query file will load and execute when you run the cell. Supported file extensions include `.sparql` and `.rq`. Saving the notebook also saves the query file.\n\n![ext-query](https://github.com/zazuko/vscode-sparql-notebook/assets/8033981/68da289e-1d1f-4b6d-9986-bcfc455aa15a)\n\n### Cell Status Bar\nThe cell status bar indicates whether the cell uses a query file.\n\n## FAQ\n\n### Show SELECT Results as a Table\n\nTechnically that means set the default renderer for MIME-Type `application/sparql-results+json`.\n\n1. in the output cell, choose `application/sparql-results+json`\n2. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac),\n3. Search for \"mime\" and click: \"Notebook: Save Mimetype Display Order\"\n4. You will be prompted to choose either to ...\n   - enable that default setting globally (choose \"User Settings\")\n   - or locally for that specific workspace (choose \"Workspace Settings\")\n\n![save_mimetype_order](https://user-images.githubusercontent.com/8033981/172578922-73a4a3f5-3a55-4fc1-b961-bb4ce4df945c.gif)\n\n### Export as Markdown\n\nRight click a `.sparqlbook`file and select `Export to Markdown`.\n\n\n\n## Contribute\n\nThis extension uses the [\nNotebook API ](https://code.visualstudio.com/api/extension-guides/notebook). Contributions \u0026 bug fixes are always welcome!\nh\n## Credits\n\n- Stardog VSCode Extensions, https://github.com/stardog-union/stardog-vsc\n- Oxigraph, https://github.com/oxigraph\n- Random Fractals Inc., https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-table\n\nAnd all contributors ❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fvscode-sparql-notebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzazuko%2Fvscode-sparql-notebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fvscode-sparql-notebook/lists"}