diff --git a/influxdb_client/client/flux_csv_parser.py b/influxdb_client/client/flux_csv_parser.py index 924121ad..4b706d49 100644 --- a/influxdb_client/client/flux_csv_parser.py +++ b/influxdb_client/client/flux_csv_parser.py @@ -52,6 +52,7 @@ def _parse_flux_response(self): start_new_table = False table = None parsing_state_error = False + table_base_index = 0 for csv in self._reader: # debug @@ -80,6 +81,7 @@ def _parse_flux_response(self): yield self._prepare_data_frame() start_new_table = True + table_base_index = table_index table = FluxTable() self._insert_table(table, table_index) table_index = table_index + 1 @@ -111,7 +113,7 @@ def _parse_flux_response(self): continue # to int converions todo - current_index = int(csv[2]) + current_index = int(csv[2]) + table_base_index if current_index > (table_index - 1): # create new table with previous column headers settings