Code Monkey home page Code Monkey logo

sampledb's Introduction

SampleDB

cloudspannerecosystem

This application allows you to quickly get a sample database into Cloud Spanner. It does so by loading data from a CSV file into a new Cloud Spanner database.

The data contained in the CSV file is sourced from the "Hacker News - Y Combinator" BigQuery public dataset.

Please feel free to report issues and send pull requests, but note that this application is not officially supported as part of the Cloud Spanner product.

Setup

Create an instance

Create a Cloud Spanner instance if you haven't already done so. Remember the instance name, as you'll need it when running the application.

Authentication

This sample requires you to have authentication set up. Refer to the Authentication Getting Started Guide for instructions on setting up credentials for applications.

Install Dependencies

  • Install pip and virtualenv if you do not already have them. You may want to refer to the Python Development Environment Setup Guide for Google Cloud Platform for instructions.

  • Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.

    virtualenv env
    source env/bin/activate
    
  • Install the dependencies needed to run the samples.

    pip install -r requirements.txt
    

Run the application

python batch_import.py <instance_id> <database_id>
  • <instance_id>: your Cloud Spanner instance ID.
  • <database_id>: the Cloud Spanner database ID; the application will create and populate this database.

sampledb's People

Contributors

lgruen avatar g-easy avatar

Watchers

James Cloos 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.