def open_or_create_table(client, table, drop=False):
  exists = False
  if client.table_exists(table):
    exists = True
    if drop:
      client.delete_table(table)
      exists = False

  if not exists:
    # Create the schema for the table, basically all float cols
    cols = [kudu.ColumnSchema.create("ts", kudu.INT64)]
    cols += [kudu.ColumnSchema.create(x, kudu.FLOAT) for x in DSTAT_COL_NAMES]

    # Based on the column meta data create a new schema object, where the first column
    # is the key column.
    schema = kudu.schema_from_list(cols, 1)
    client.create_table(table, schema)

  return client.open_table(table)
Based on the default dstat column names create a new table indexed by a timstamp col
dataset/ETHPy150Open cloudera/kudu-examples/python/dstat-kudu/kudu_dstat.py/open_or_create_table