{"id":38615782,"url":"https://github.com/d1820/cosmos-query-manager","last_synced_at":"2026-01-17T08:49:32.000Z","repository":{"id":40901923,"uuid":"132195911","full_name":"d1820/cosmos-query-manager","owner":"d1820","description":"Query Development Tool for Azure DocumentDB/CosmosDB","archived":false,"fork":false,"pushed_at":"2024-12-21T22:52:21.000Z","size":139640,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-21T23:24:29.662Z","etag":null,"topics":["azure-documentdb","cosmos-db","documentdb","query-builder","query-parser","query-statement","rollback-migrations","transactions"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d1820.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-04T22:47:00.000Z","updated_at":"2024-12-21T22:52:18.000Z","dependencies_parsed_at":"2023-01-25T03:15:22.418Z","dependency_job_id":null,"html_url":"https://github.com/d1820/cosmos-query-manager","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/d1820/cosmos-query-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1820%2Fcosmos-query-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1820%2Fcosmos-query-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1820%2Fcosmos-query-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1820%2Fcosmos-query-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d1820","download_url":"https://codeload.github.com/d1820/cosmos-query-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1820%2Fcosmos-query-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["azure-documentdb","cosmos-db","documentdb","query-builder","query-parser","query-statement","rollback-migrations","transactions"],"created_at":"2026-01-17T08:49:31.163Z","updated_at":"2026-01-17T08:49:31.993Z","avatar_url":"https://github.com/d1820.png","language":"C#","readme":"\n# Cosmos Query Manager for Azure DocumentDB\n\nCosmos Query Manager is a Windows based query manager for Azure DocumentDb/Cosmos DB\n\n* Develop, run, edit your DocumentDb/Cosmos DB SQL commands\n* Add, edit and delete documents\n* Work with multiple database and multiple environments\n* Transaction and Rollback support\n\n# Install\n\nIf you want to install the application please grab the \"latest\" .EXE installer file from the releases folder in the project source\n\n## Version 2.0 release\nThis version has some breaking changes that will need to be addressed. \nDue to the relationship between the DocumentDB SDK nuget package (2.9.2) and the Cosmos Emulator the emulator will need to be updated. \nThis version of Cosmos Manager works with Cosmos Emulator version 2.7.1.0 or later. When upgrading emulators you will need to reseed the data. \nTo do this first export all existing collection data and then re-import it using the dt.exe tool. \nThis is needed due to the changes Cosmos Emulator has made to no longer support non-partitioned collections.\n\n# Code base\n\nThis is a C# application, requiring VS2017+\n\n# Application Walk-through\n\n\n## Create a new Query Tab\nThere are 3 ways to create a new query tab\n- From File select\n\u003cimg src=\"Content/CMNewQueryFile.png\" \u003e\n\n- From the File List View\n\u003cimg src=\"Content/CMNewQueryFileList.png\" \u003e\n\n- From double clicking in the tabs bar\n\u003cimg src=\"Content/CMNewQueryDoubleClickTabs.png\" \u003e\n\n\n## Working with existing query files\nYou can open any directory folder to load all the .cSQL files. This also loads all children folders and files as well. This provides the easy of working across many files, but still being able to organize them.\n\n## Loading Connections\nTo create the connections file view the Help Guide.\n![](/Content/CosmosManagerConnect.jpg)\n\n### Changing connections\nIn the query options toolbar on the far right is a dropdown to change the connection string of where the query gets executed. Each connection string will color the current tab to a set color. This helps in keeping track of what environment a query has been ran against at a quick glance.\n\n\u003cimg src=\"Content/CMConnectionChange.png\" \u003e\n\n## Query Options\n\n- \u003cimg src=\"Content/json.png\" width=\"24\"\u003e Formats the query statement\n- \u003cimg src=\"Content/text_lowercase.png\" width=\"24\"\u003e Selected text to lowercase\n- \u003cimg src=\"Content/text_uppercase.png\" width=\"24\"\u003eSelected text to uppercase\n- \u003cimg src=\"Content/text_indent.png\" width=\"24\"\u003e Indents LIne\n- \u003cimg src=\"Content/text_indent_remove.png\" width=\"24\"\u003e Outdents Line\n- \u003cimg src=\"Content/refresh.png\" width=\"24\"\u003e Controls word wrap of the query statement\n- \u003cimg src=\"Content/format_font_size_less.png\" width=\"24\"\u003e \u003cimg src=\"Content/format_font_size_more.png\" width=\"24\"\u003e Changes the font size of the query statement\n- \u003cimg src=\"Content/3floppy-unmount-icon.png\" width=\"24\"\u003e Saves the query statement\n- \u003cimg src=\"Content/Start-icon.png\" width=\"24\"\u003e Runs the query statement\n\n## Result Options\nOn selects we have options available to manipulate the results list\n\n- \u003cimg src=\"Content/refresh.png\" width=\"24\"\u003e Send all the selected documents to a New Query Update statement\n- \u003cimg src=\"Content/documents_delete.png\" width=\"24\"\u003e Send all the selected documents to a New Query Delete statement\n\n\n## Single Document Options\n\n- \u003cimg src=\"Content/json.png\" width=\"24\"\u003e Formats the document\n- \u003cimg src=\"Content/text_lowercase.png\" width=\"24\"\u003e Selected text to lowercase\n- \u003cimg src=\"Content/text_uppercase.png\" width=\"24\"\u003e Selected text to uppercase\n- \u003cimg src=\"Content/text_indent.png\" width=\"24\"\u003e Indents LIne\n- \u003cimg src=\"Content/text_indent_remove.png\" width=\"24\"\u003e Outdents Line\n- \u003cimg src=\"Content/refresh.png\" width=\"24\"\u003e Controls word wrap of the document\n- \u003cimg src=\"Content/format_font_size_less.png\" width=\"24\"\u003e \u003cimg src=\"Content/format_font_size_more.png\" width=\"24\"\u003e Changes the font size of the document\n- \u003cimg src=\"Content/Delete-file-icon.png\" width=\"24\"\u003e Deletes the document\n- \u003cimg src=\"Content/3floppy-unmount-icon.png\" width=\"24\"\u003e Saves the document\n- \u003cimg src=\"Content/Downloads-icon.png\" width=\"24\"\u003e Exports the results document\n\n## Query Output\nIn the output tab we can see all information related to the executed query. On selects we output all the cosmos metrics and costs, on other queries information related to the success of the query are displayed.\n\n\u003cimg src=\"Content/CMQueryOutput.png\"\u003e\n\n## Transaction Cache\nThe transaction cache is the storage location where rollback files are stored. The application never deletes from this folder so there is always a rollback \nhistory available as a data safety precaution. As this folder grows with backup data for transactions it may need to be cleaned out or have the files archived somewhere.\n\n# Commandline Support (v2.0)\nCosmos Manager now provides commandline support. This can be used to automate CosmosDB updates as part of a release or deployment cycle.\nOne of the challenges with using Cosmos is the lack of automation and transaction ability when changing data within CosmosDB. By using this through the commandline you now have that control.\n\n### Options\n| Options| Description |\n| -----\n| --connections | The JSON file that contains all the CosmosDB connections information. |\n| --connectTo | he name of the connection to use to connect to CosmosDB. |\n| --script | The .CSQL script to execute. |\n| --folder | The folder that contains the .CSQL scripts to execute. |\n| --output | The .CResult file the query output is written to. |\n| --continueOnError | Flag to indicate whether to continue script executions on error.|\n| --ignorePrompts | Flag to indicate whether to continue without accepting user input on prompts. Used for executing data altering scripts without transactions. |\n| --includeDocumentInOutput | Flag to indicate whether to write the document results to the console and output file. |\n\n### Examples\n\n#### Get Help\n```CMD\nCosmosManager2019.exe exec --help\n```\n\n#### Run a single script\n```CMD\nCosmosManager2019.exe exec --connections \"C:\\TestScripts\\connections.json\" --connectTo \"Local Cosmos\" --script \"C:\\TestScripts\\FindMyUserId.csql\" --output \"C:\\TestScripts\\output.cresult\"\n```\n\n#### Run all scripts in a folder\n```CMD\nCosmosManager2019.exe exec --connections \"C:\\TestScripts\\connections.json\" --connectTo \"Local Cosmos\" --folder \"C:\\TestScripts\\\" --includeDocumentInOutput --output \"C:\\TestScripts\\output.cresult\"\n```\n\n### Output\nCurrently text display output is the only option. It provides all the CossmmosDB metrics and execution summaries and results.\n\n#### Sample Execution Summary\n\n \u003cimg src=\"Content/executionSummary.png\" \u003e\n\n#### Sample Execution Result\n\n \u003cimg src=\"Content/executionResults.png\" \u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd1820%2Fcosmos-query-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd1820%2Fcosmos-query-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd1820%2Fcosmos-query-manager/lists"}