def append_row(table, line):
  data = [float(x.strip()) for x in line.split(",")]

  op = table.insert()
  op["ts"] = int(time.time())
  for c, v in zip(DSTAT_COL_NAMES, data):
    op[c] = v
  return op
The line is the raw string read from stdin, that is then splitted by , and prepended
dataset/ETHPy150Open cloudera/kudu-examples/python/dstat-kudu/kudu_dstat.py/append_row