kaqing 2.0.84__py3-none-any.whl → 2.0.85__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kaqing might be problematic. Click here for more details.

@@ -28,8 +28,11 @@ class Audit(Command):
28
28
 
29
29
  state, args = self.apply_state(args, state)
30
30
 
31
- r = super().intermediate_run(cmd, state, args, Audit.cmd_list(), display_help=False)
32
- if isinstance(r, str) and r == 'command-missing':
31
+ r = None
32
+ if len(args) > 0:
33
+ r = super().intermediate_run(cmd, state, args, Audit.cmd_list(), display_help=False)
34
+
35
+ if not r or isinstance(r, str) and r == 'command-missing':
33
36
  sql = 'select * from audit order by ts desc limit 10'
34
37
  if args:
35
38
  sql = ' '.join(args)
adam/utils_athena.py CHANGED
@@ -48,14 +48,15 @@ def run_audit_query(sql: str):
48
48
 
49
49
  if state == 'SUCCEEDED':
50
50
  results_response = athena_client.get_query_results(QueryExecutionId=query_execution_id)
51
- column_info = results_response['ResultSet']['Rows'][0]['Data']
52
- columns = [col.get('VarCharValue') for col in column_info]
53
- lines = []
54
- for row in results_response['ResultSet']['Rows'][1:]:
55
- row_data = [col.get('VarCharValue') for col in row['Data']]
56
- lines.append('\t'.join(row_data))
57
-
58
- log(lines_to_tabular(lines, header='\t'.join(columns), separator='\t'))
51
+ if results_response['ResultSet']['Rows']:
52
+ column_info = results_response['ResultSet']['Rows'][0]['Data']
53
+ columns = [col.get('VarCharValue') for col in column_info]
54
+ lines = []
55
+ for row in results_response['ResultSet']['Rows'][1:]:
56
+ row_data = [col.get('VarCharValue') for col in row['Data']]
57
+ lines.append('\t'.join(row_data))
58
+
59
+ log(lines_to_tabular(lines, header='\t'.join(columns), separator='\t'))
59
60
  else:
60
61
  log2(f"Query failed or was cancelled. State: {state}")
61
62
  log2(f"Reason: {query_status['QueryExecution']['Status'].get('StateChangeReason')}")
adam/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- __version__ = "2.0.84" #: the working version
4
+ __version__ = "2.0.85" #: the working version
5
5
  __release__ = "1.0.0" #: the release version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaqing
3
- Version: 2.0.84
3
+ Version: 2.0.85
4
4
  Summary: UNKNOWN
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -14,9 +14,9 @@ adam/repl_commands.py,sha256=1AFE8AJoyQdJd0tlcwtMnwMjV5G7jL9MDkxJZxdo150,4963
14
14
  adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
15
15
  adam/repl_state.py,sha256=dXyGlWXcSsfCjrYwMhU44PVn_oThSZ8dhJ5HCVE8-qU,8743
16
16
  adam/utils.py,sha256=sbsNZP3qGJtb6fXCa4dDXHry5ay9ev583cCZIQzy07s,7382
17
- adam/utils_athena.py,sha256=TbDv26_f7gCz0EmBJrtwmNPY0IRa7SaQIUrLiGaXh3o,2250
17
+ adam/utils_athena.py,sha256=_E-Ik-rgpIhDhpwlllH3qlyI3P_8Jcw9b9qSj2Ql2UM,2319
18
18
  adam/utils_net.py,sha256=65fhBnWMCkhGtyHqz95qcHaCo35q-WX1RBkkXG8dKpI,416
19
- adam/version.py,sha256=V7DW_alZgubQUK1rhTS1PMRaCoPuOB_iZiB5r5OguYk,139
19
+ adam/version.py,sha256=SfFdSx99xjv6dmyMa6T5bmSm3TNRAiaI4-KWzbffs6Q,139
20
20
  adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
22
22
  adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
@@ -79,7 +79,7 @@ adam/commands/rollout.py,sha256=52_4ijna3v-8Oug12et43DRHFDNhiN34p6xLTQmhdbQ,2959
79
79
  adam/commands/shell.py,sha256=wY_PIx7Lt6vuxhFArlfxdEnBbrouCJ3yNHhFn17DEqw,848
80
80
  adam/commands/watch.py,sha256=mmBFpB8T1V7zrNs5b2YNyDDztMym_ILPDdkrbdAXTas,2438
81
81
  adam/commands/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- adam/commands/audit/audit.py,sha256=-LsGihEhS_CUr_cNvf4hS0z8SKr2cxcyH8loPcwGEvY,1807
82
+ adam/commands/audit/audit.py,sha256=xLXwDSYYTuVr_O5gDo87Wa4qSR71zjnj1Q6vN8dF_dE,1864
83
83
  adam/commands/audit/audit_repair_tables.py,sha256=5Glsy29md3KH_4_smuVBeu6c4zygICPK8Jiv-fNRC38,1186
84
84
  adam/commands/cql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
85
85
  adam/commands/cql/cql_completions.py,sha256=dXe51NTWEJis76587IWSn9Av-cjC0J6KMaxlBKfF4wM,411
@@ -183,8 +183,8 @@ adam/sso/idp.py,sha256=fvcwUw_URTgsO6ySaqTIw0zQT2qRO1IPSGhf6rPtybo,5804
183
183
  adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
184
184
  adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
185
185
  adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
186
- kaqing-2.0.84.dist-info/METADATA,sha256=lmjAGlH1YfrrmAG9z7fwnrqxCzsW8QjdvZq5qTeuzQM,132
187
- kaqing-2.0.84.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
188
- kaqing-2.0.84.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
189
- kaqing-2.0.84.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
190
- kaqing-2.0.84.dist-info/RECORD,,
186
+ kaqing-2.0.85.dist-info/METADATA,sha256=H9R7Qb1ZTmYMDrzCFBJziK45RLM3IDkx82kFaDk1kpE,132
187
+ kaqing-2.0.85.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
188
+ kaqing-2.0.85.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
189
+ kaqing-2.0.85.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
190
+ kaqing-2.0.85.dist-info/RECORD,,