swa 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/swa/cli/athena_command.rb +11 -1
- data/lib/swa/cli/base_command.rb +2 -0
- data/lib/swa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 731347c42ce0823ababd94ff7eeb58ea42e9d42cfbf152cea6d103356f8ea9d2
|
4
|
+
data.tar.gz: fe2feaa04f3fd3df8f2664160b70d362050b587e22772018a6221ebe13482ff5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2e6b01eb2be3d32536688c14db2b5511281f735b989716a26be37a8feb773ee153497de1a9ac1816112cedf8b5387ab656db38e14da1f8bbe6f6245e37965a1
|
7
|
+
data.tar.gz: 9a6939b4984e7a5eb0e2a66e795312e91e634a173310607b2bcf3f2ba4f885a4fc98bb8ee51b6ca201465922c14a60d813f5ac0e54e0321ae8a1e1b4935fc7d9
|
@@ -112,7 +112,11 @@ module Swa
|
|
112
112
|
)
|
113
113
|
wait_for_query(start_query_response.query_execution_id)
|
114
114
|
query_results = athena_client.get_query_results(query_execution_id: start_query_response.query_execution_id)
|
115
|
-
|
115
|
+
if query =~ /\AEXPLAIN/
|
116
|
+
output_explain_result(query_results.result_set)
|
117
|
+
else
|
118
|
+
output_results_as_csv(query_results.result_set)
|
119
|
+
end
|
116
120
|
end
|
117
121
|
|
118
122
|
private
|
@@ -127,6 +131,12 @@ module Swa
|
|
127
131
|
signal_error error.response.query_execution.status.state_change_reason
|
128
132
|
end
|
129
133
|
|
134
|
+
def output_explain_result(result_set)
|
135
|
+
result_set.rows.drop(1).each do |row|
|
136
|
+
puts row.data.first.var_char_value
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
130
140
|
end
|
131
141
|
|
132
142
|
subcommand ["workgroups", "wgs"], "Show work-groups" do
|
data/lib/swa/cli/base_command.rb
CHANGED
@@ -27,6 +27,8 @@ module Swa
|
|
27
27
|
super(arguments)
|
28
28
|
rescue Aws::Errors::MissingCredentialsError
|
29
29
|
signal_error "no credentials provided"
|
30
|
+
rescue Aws::Errors::MissingRegionError, Aws::Errors::InvalidRegionError => e
|
31
|
+
signal_error e.message
|
30
32
|
rescue Aws::Errors::ServiceError => e
|
31
33
|
signal_error e.message
|
32
34
|
end
|
data/lib/swa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|