/qds-sdk-ruby

Ruby SDK for Qubole API

Primary LanguageRubyApache License 2.0Apache-2.0

Qubole

Qubole REST API client

Build Status Gem Version

Documentation

API Documentation

Installation

Add this line to your application's Gemfile:

gem 'qubole'

And then execute:

$ bundle

Or install it yourself as:

$ gem install qubole

Usage

	require 'qubole'

	# Configure Qubole with api_token and optional API version
	Qubole.configure(api_token: 'ksbdvcwdkjn123423', version: 'v1.2')

	# Submit Command
	command = Qubole::Commands::Hive.new
	command.submit(query: "SHOW TABLES", label: "custom cluster")
	command.status # => "waiting"
	command.refresh!
	command.status # => "done"
	command.results # => {"results"=>"default_qubole_airline_origin_destination\r\ndefault_qubole_memetracker\r\n", "inline"=>true}
	id = command.id
	command = Qubole::Command.find(id)
	command.logs # => "OK\n  Time taken: 3.017 seconds, Fetched: 2 row(s)"

Implemented

Qubole REST API version v1.2

  • Authentication
  • Command API
    • Submit a Command
    • View Command Status
    • View Command Results
    • View Command Logs
    • View Hadoop Jobs Spawned By a Command
    • Cancel a Command
    • View Command History
    • Composite Command
    • DB Export Command
    • DB Import Command
    • DB Tap Query Command
    • Hadoop Jar Command
    • Hive Command
    • Pig Command
    • Presto Command
    • Shell Command
    • Spark Command
  • Hive Metadata API
    • List Tables
    • Get Table Definition
    • Get Table Properties
    • Store Table Properties
    • Delete Table Properties
  • DbTap API
    • List DbTaps
    • View a DbTap
    • List Tables in a DbTap
    • Create a DbTap
    • Edit a DbTap
    • Delete a DbTap
  • Scheduler API
    • List Schedules
    • View a Schedule
    • Create a Schedule
    • Suspend,Resume or Kill a Schedule
    • List Schedule Actions
    • View a Schedule’s Action
    • Kill a Schedule Action
    • Rerun a Scheduled Action
    • List All Actions
    • View an Action
  • Reports API
    • All Commands Report
    • Canonical Hive Commands Report
    • Cluster nodes Report
  • Cluster API
    • List All Clusters
    • Create a New Cluster
    • View Cluster Configuration
    • Edit Cluster Configuration
    • Clone a Cluster
    • Start or Terminate a Cluster
    • Check Cluster Status
    • Delete a Cluster
    • Reassign Cluster Label
    • Run Adhoc Scripts on a Cluster
    • Cluster Metrics
    • Add a Node to a Cluster
    • Replace a Node in a Cluster
    • Remove a Node from a Cluster
    • Take an HBase Snapshot
    • View an HBase Snapshot Schedule
    • Restore HBase Tables
    • Update an HBase Snapshot Schedule

Contributing

  1. Fork it ( https://github.com/[my-github-username]/qubole/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request