We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ba55ae1 + 79dee71 commit 9cd96cdCopy full SHA for 9cd96cd
ksql/utils.py
@@ -83,7 +83,7 @@ def parse_columns(columns_str):
83
def process_row(row, column_names):
84
row = row.replace(",\n", "").replace("]\n", "")
85
row_obj = json.loads(row)
86
- if 'finalMessage' in row_obj:
+ if "finalMessage" in row_obj:
87
return None
88
column_values = row_obj["row"]["columns"]
89
index = 0
@@ -100,12 +100,14 @@ def process_query_result(results, return_objects=None):
100
yield from results
101
102
# parse rows into objects
103
- header = next(results)
+ try:
104
+ header = next(results)
105
+ except StopIteration:
106
+ return
107
columns = parse_columns(header)
108
109
for result in results:
110
row_obj = process_row(result, columns)
111
if row_obj is None:
112
return
113
yield row_obj
-
0 commit comments