Code Monkey home page Code Monkey logo

cosmossqlcmd's Introduction

CosmosSQLcmd

Azure Cosmos DB SQL Command Line Client Tool

This utility is a lightweight Command-Line Client for Aure Cosmos DB Core(SQL) API. It has a versatile editor for editing and executing queries directly from a Console Window!

Usage

CosmosSQLcmd --endpoint yourcosmosdbURI --key yourAccesskey --database yourDB --container yourContainer [--cp direct|gateway] [--maxfetchsize 10] [--Metrics]

  --endpoint        Required. Azure Cosmos DB account endpoint URI
  --key             Required. Azure Cosmos DB account read access key
  --database        Required. Target database to use
  --container       Required. Target container to use
  --cp              Connection policy:Direct|Gateway (Default:Direct)
  --maxfetchsize    Number of items per fetch (Default:100)
  --metrics         Include metrics
  --help            Display this help screen.

External Nuget Dependencies:

Include="CommandLineParser" Version="2.8.0" 
Include="Microsoft.Azure.Cosmos" Version="3.23.0"
Include="Newtonsoft.Json" Version="13.0.1"

Example:

CosmosSQLcmd | (https://cosmosdb.documents.azure.com:443/gateway--maxfetchsize)(db)(data)
Editor Mode | Press CTRL+E to execute query | ESC to exit

SELECT count(c)
FROM c

...Fetching (max:100)...

------------------------------------------------------------------------------------
{
  "_rid": "t6UpAM7zVcA=",
  "Documents": [
    {
      "$1": 15375
    }
  ],
  "_count": 1
}
------------------------------------------------------------------------------------


Query Completed. Press any key to return to the editor

OS Support

Windows and Linux

Screenshots

Editor Mode

Editor Screenshot

Query Results

Query Results Screenshot

Screenshot

Screenshot

cosmossqlcmd's People

Contributors

jmneto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.