def get_table(client,start,end,table_id,date_part = None):
    """Getting table data from bigquery client.

    Args:
      client (bigquery.Client) : Configured client to access bigquery
      start (str)  :  time str in the format of yy-mm:dd [HH-MM-SS.FFFFFF]
      end (str)    :  time str in the format of yy-mm:dd [HH-MM-SS.FFFFFF]
      table_id (str)  :  table name of any bigquery table without array column.
      date_part (str) : date_part param for SQL TIMESTAMP_TRUNC() function.
    Returns:
      pd.DataFrame : with index being the timestamp of the data
    """
    # enable the ability to obtain averaged data.
    if date_part is None:
        table_query_str = f"SELECT * FROM cfog.{table_id} " +\
                          f"WHERE timestamp BETWEEN '{start}' AND '{end}' " +\
                           "ORDER BY timestamp ASC"
    else:
        # first obtain a list of field names
        table_ref = client.dataset('cfog').table(table_id)
        table = client.get_table(table_ref)
        schemas = [s for s in table.schema if s.field_type in ['INT', 'FLOAT']]
        field_names = [s.name for s in schemas]
        field_name_strs = ','.join([f"AVG({name}) as {name}" for name  in field_names])
        trunc_exp = f"TIMESTAMP_TRUNC(timestamp, {date_part}) AS timestamp"
        table_query_str = f"SELECT {trunc_exp}, {field_name_strs} FROM cfog.{table_id} " +\
                          f"WHERE timestamp BETWEEN '{start}' AND '{end}' " +\
                           "GROUP BY timestamp ORDER BY timestamp"

    print(f"Executing bigquery query string: ")
    print(table_query_str + '\n')

    table_query_job = client.query(table_query_str)
    table_query_job.result()
    print("Query job complete. Start Loading Data. ")
    table_data = table_query_job.to_dataframe().set_index('timestamp')
    print(f"Query complete. Total number of data entries: {table_data.shape[0]}.\n\n")

    return table_data