azure-cosmos-db-cassandra-go-getting-started

command module
v0.0.0-...-9cda8b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 8 Imported by: 0

README


page_type: sample languages:

  • go products:
  • azure description: "Azure Cosmos DB is a globally distributed multi-model database. One of the supported APIs is the Cassandra API" urlFragment: azure-cosmos-db-cassandra-go-getting-started

Developing a Go app with Cassandra API using Azure Cosmos DB (gocql Driver)

Azure Cosmos DB is a globally distributed multi-model database. One of the supported APIs is the Cassandra API.

The code included in this sample is intended to get you quickly started with a Go application that connects to Azure Cosmos DB with the Cassandra API. It walks you through creation of keyspace, table, inserting and querying the data.

Prerequisites

Before you can run this sample, you must have the following prerequisites:

Running this sample

  1. Clone this repository using git clone https://github.com/Azure-Samples/azure-cosmos-db-cassandra-go-getting-started

  2. Change directories to the repo using cd azure-cosmos-db-cassandra-go-getting-started

  3. Set environment variables

export COSMOSDB_CASSANDRA_CONTACT_POINT=<Contact Point for Azure Cosmos DB Cassandra API>
export COSMOSDB_CASSANDRA_PORT=<Port for Azure Cosmos DB Cassandra API>
export COSMOSDB_CASSANDRA_USER=<Username for Azure Cosmos DB Cassandra API>
export COSMOSDB_CASSANDRA_PASSWORD=<Password for Azure Cosmos DB Cassandra API>
  1. Run the application
go run main.go

More information

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL