Aliyun ODPS SDK

Build Status Coverage Status


It is a full-featured Ruby Library for Aliyun ODPS API. Enjoy it!

Installation

It's a Ruby Gem, so you can install it like any Gem:

gem install aliyun-odps

If you use Gemfile manage your Gems, Add below to your Gemfile.

gem "aliyun-odps", require: 'aliyun/odps'

And run:

bundle install

Usage

Quick Start

First of all, config your environment.

If you use Rails, you can place it in config/initializers/aliyun_odps.rb, for other framework, just place it before your other odps code.

Aliyun::Odps.configure do |config|
  config.access_key = '<your-access-key>'
  config.secret_key = '<your-secret-key>'
  config.endpoint = '<odps-server-api>'  # "http://service.odps.aliyun.com/api"
  config.project = '<your-default-project>'
end

After that, you can get your project and start party now!

project = Aliyun::Odps.project

# Accesss tables
project.tables.list

# Access resources
project.resources.list

# Access instances
project.instances.list

# Access functions
project.functions.list


# For Tunnel
project.table_tunnels

More Example and Scenario, visit our Document

Document

Here is original Restful API, It has the most detailed and authoritative explanation for every API.

Here is our RDoc Document, It's well format to help you find more detail about methods.

Here are some more guides for help you. Welcome to advice.

All document are under ./wiki

Test

We use minitest for test and rubocop for Syntax checker, If you want to make contribute to this library. Confirm below Command is success:

bundle exec rake test

Authors && Contributors

License

licensed under the Apache License 2.0