Module: Aliyun::Odps
- Defined in:
- lib/aliyun/odps.rb,
lib/aliyun/odps/http.rb,
lib/aliyun/odps/list.rb,
lib/aliyun/odps/error.rb,
lib/aliyun/odps/utils.rb,
lib/aliyun/odps/client.rb,
lib/aliyun/odps/struct.rb,
lib/aliyun/odps/project.rb,
lib/aliyun/odps/version.rb,
lib/aliyun/odps/modelable.rb,
lib/aliyun/odps/model/table.rb,
lib/aliyun/odps/model/tables.rb,
lib/aliyun/odps/authorization.rb,
lib/aliyun/odps/configuration.rb,
lib/aliyun/odps/tunnel/router.rb,
lib/aliyun/odps/model/function.rb,
lib/aliyun/odps/model/instance.rb,
lib/aliyun/odps/model/projects.rb,
lib/aliyun/odps/model/resource.rb,
lib/aliyun/odps/service_object.rb,
lib/aliyun/odps/model/functions.rb,
lib/aliyun/odps/model/instances.rb,
lib/aliyun/odps/model/resources.rb,
lib/aliyun/odps/model/task_result.rb,
lib/aliyun/odps/model/table_column.rb,
lib/aliyun/odps/model/table_schema.rb,
lib/aliyun/odps/model/instance_task.rb,
lib/aliyun/odps/tunnel/upload_block.rb,
lib/aliyun/odps/tunnel/table_tunnels.rb,
lib/aliyun/odps/model/table_partition.rb,
lib/aliyun/odps/tunnel/upload_session.rb,
lib/aliyun/odps/model/table_partitions.rb,
lib/aliyun/odps/tunnel/download_session.rb more...
Defined Under Namespace
Modules: Modelable, Struct Classes: Authorization, Client, Configuration, DownloadSession, Error, Function, Functions, Http, Instance, InstanceNameInvalidError, InstanceTask, InstanceTaskNotSuccessError, Instances, List, MissingProjectConfigurationError, PriorityInvalidError, Project, Projects, RecordNotMatchSchemaError, RequestError, Resource, ResourceMissingContentError, Resources, ServiceObject, Table, TableColumn, TablePartition, TablePartitions, TableSchema, TableTunnels, Tables, TaskResult, TunnelEndpointMissingError, TunnelRouter, UploadBlock, UploadSession, Utils, ValueNotSupportedError, XmlElementMissingError
Constant Summary collapse
- VERSION =
'0.4.2'
Class Attribute Summary collapse
-
.configuration ⇒ Object
writeonly
Sets the attribute configuration.
Class Method Summary collapse
-
.config ⇒ Configuration
return current configuration.
-
.configure {|@configuration| ... } ⇒ Object
Config Odps.
-
.list_projects(options = {}) ⇒ List
(also: projects)
List all projects.
-
.project(name = config.project) ⇒ Project
(also: get_project)
Get project.
-
.update_project(name, options = {}) ⇒ Object
Update Project Information.
Class Attribute Details
permalink .configuration=(value) ⇒ Object (writeonly)
Sets the attribute configuration
19 20 21 |
# File 'lib/aliyun/odps.rb', line 19 def configuration=(value) @configuration = value end |
Class Method Details
permalink .config ⇒ Configuration
return current configuration
41 42 43 |
# File 'lib/aliyun/odps.rb', line 41 def config @configuration end |
permalink .configure {|@configuration| ... } ⇒ Object
Config Odps
32 33 34 35 36 |
# File 'lib/aliyun/odps.rb', line 32 def configure @configuration ||= Configuration.new yield @configuration if block_given? @configuration end |
permalink .list_projects(options = {}) ⇒ List Also known as: projects
List all projects
TODO: git.oschina.net/newell_zlx/aliyun-odps-ruby-sdk/issues/2
57 58 59 |
# File 'lib/aliyun/odps.rb', line 57 def list_projects( = {}) client.projects.list() end |
permalink .project(name = config.project) ⇒ Project Also known as: get_project
Get project
50 51 52 53 |
# File 'lib/aliyun/odps.rb', line 50 def project(name = config.project) fail MissingProjectConfigurationError unless name client.projects.get(name) end |
permalink .update_project(name, options = {}) ⇒ Object
Update Project Information
63 64 65 |
# File 'lib/aliyun/odps.rb', line 63 def update_project(name, = {}) client.projects.update(name, ) end |