Class: Aliyun::Odps::InstanceTask
Instance Attribute Summary collapse
Instance Method Summary
collapse
#client, #initialize, property, #update_attrs
Instance Attribute Details
6
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 6
property :comment, String
|
#end_time ⇒ DateTime
12
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 12
property :end_time, DateTime
|
#histories ⇒ Array
14
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 14
property :histories, Array
|
#name ⇒ String
4
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 4
property :name, String, required: true
|
#property ⇒ Hash
7
8
9
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 7
property :property, Hash, init_with: ->(hash) do
hash.map { |k, v| { 'Name' => k, 'Value' => v } }
end
|
#query ⇒ String
10
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 10
property :query, String
|
#start_time ⇒ DateTime
11
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 11
property :start_time, DateTime
|
#status ⇒ String
13
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 13
property :status, String
|
#type ⇒ String
5
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 5
property :type, String, required: true, within: %w(SQL SQLPLAN MapReduce DT PLSQL)
|
Instance Method Details
#to_hash ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/aliyun/odps/model/instance_task.rb', line 16
def to_hash
{
'SQL' => {
'Name' => name,
'Comment' => || '',
'Config' => {
'Property' => property || { 'Name' => '', 'Value' => '' }
},
'Query!' => "<![CDATA[#{query}]]>"
}
}
end
|