OmniSciDB
a5dc49c757
|
Public Member Functions | |
def | __init__ |
def | createDataAndImportTable |
def | generateColumnsSchema |
def | getCreateTableCommand |
def | getCopyFromCommand |
def | generateData |
def | generateDataParallel |
def | createExpectedTableDetails |
def | doesTableHasExpectedSchemaInDB |
def | doesTableHasExpectedNumEntriesInDB |
def | createTableInDB |
def | importDataIntoTableInDB |
Public Attributes | |
table_name | |
fragment_size | |
num_fragments | |
db_name | |
db_user | |
db_password | |
db_server | |
db_port | |
data_dir_path | |
num_entries | |
column_list | |
is_remote_server | |
data_file_name_base | |
Definition at line 47 of file create_table.py.
def create_table.SyntheticTable.__init__ | ( | self, | |
kwargs | |||
) |
kwargs: table_name(str): synthetic table's name in the database fragment_size(int): fragment size (number of entries per fragment) num_fragment(int): total number of fragments for the synthetic table db_user(str): database username db_password(str): database password db_port(int): database port db_name(str): database name db_server(str): database server name data_dir_path(str): path to directory that will include the generated data is_remote_server(Bool): if True, it indicates that this class is not created on the same machine that is going to host the server.
Definition at line 48 of file create_table.py.
def create_table.SyntheticTable.createDataAndImportTable | ( | self, | |
skip_data_generation = False |
|||
) |
Definition at line 80 of file create_table.py.
References create_table.SyntheticTable.createTableInDB(), create_table.SyntheticTable.data_file_name_base, create_table.SyntheticTable.doesTableHasExpectedNumEntriesInDB(), create_table.SyntheticTable.doesTableHasExpectedSchemaInDB(), create_table.SyntheticTable.generateDataParallel(), create_table.SyntheticTable.importDataIntoTableInDB(), create_table.SyntheticTable.is_remote_server, create_table.SyntheticTable.num_entries, and split().
def create_table.SyntheticTable.createExpectedTableDetails | ( | self | ) |
Creates table details in the same format as expected from pymapd's get_table_details
Definition at line 207 of file create_table.py.
References create_table.SyntheticTable.column_list.
Referenced by create_table.SyntheticTable.doesTableHasExpectedSchemaInDB().
def create_table.SyntheticTable.createTableInDB | ( | self | ) |
Definition at line 277 of file create_table.py.
References create_table.SyntheticTable.db_name, create_table.SyntheticTable.db_password, create_table.SyntheticTable.db_port, create_table.SyntheticTable.db_server, create_table.SyntheticTable.db_user, create_table.SyntheticTable.getCreateTableCommand(), and create_table.SyntheticTable.table_name.
Referenced by create_table.SyntheticTable.createDataAndImportTable().
def create_table.SyntheticTable.doesTableHasExpectedNumEntriesInDB | ( | self | ) |
Verifies whether the existing table in the database has the expected number of entries in it as in this class.
Definition at line 253 of file create_table.py.
References create_table.SyntheticTable.db_name, create_table.SyntheticTable.db_password, create_table.SyntheticTable.db_port, create_table.SyntheticTable.db_server, create_table.SyntheticTable.db_user, create_table.SyntheticTable.num_entries, and create_table.SyntheticTable.table_name.
Referenced by create_table.SyntheticTable.createDataAndImportTable().
def create_table.SyntheticTable.doesTableHasExpectedSchemaInDB | ( | self | ) |
Verifies whether the existing table in the database has the expected schema or not.
Definition at line 216 of file create_table.py.
References create_table.SyntheticTable.createExpectedTableDetails(), create_table.SyntheticTable.db_name, create_table.SyntheticTable.db_password, create_table.SyntheticTable.db_port, create_table.SyntheticTable.db_server, create_table.SyntheticTable.db_user, and create_table.SyntheticTable.table_name.
Referenced by create_table.SyntheticTable.createDataAndImportTable().
def create_table.SyntheticTable.generateColumnsSchema | ( | self | ) |
Definition at line 117 of file create_table.py.
def create_table.SyntheticTable.generateData | ( | self, | |
thread_idx, | |||
size | |||
) |
Single-thread random data generation based on the provided schema. Data is stored in CSV format.
Definition at line 161 of file create_table.py.
References create_table.SyntheticTable.column_list, create_table.SyntheticTable.data_file_name_base, join(), and heavyai.open().
Referenced by create_table.SyntheticTable.generateDataParallel().
def create_table.SyntheticTable.generateDataParallel | ( | self | ) |
Uses all available CPU threads to generate random data based on the provided schema. Data is stored in CSV format.
Definition at line 181 of file create_table.py.
References create_table.SyntheticTable.generateData(), and create_table.SyntheticTable.num_entries.
Referenced by create_table.SyntheticTable.createDataAndImportTable().
def create_table.SyntheticTable.getCopyFromCommand | ( | self | ) |
Definition at line 154 of file create_table.py.
References create_table.SyntheticTable.data_file_name_base, and create_table.SyntheticTable.table_name.
Referenced by create_table.SyntheticTable.importDataIntoTableInDB().
def create_table.SyntheticTable.getCreateTableCommand | ( | self | ) |
Definition at line 139 of file create_table.py.
References create_table.SyntheticTable.column_list, create_table.SyntheticTable.fragment_size, and create_table.SyntheticTable.table_name.
Referenced by create_table.SyntheticTable.createTableInDB().
def create_table.SyntheticTable.importDataIntoTableInDB | ( | self | ) |
Definition at line 293 of file create_table.py.
References create_table.SyntheticTable.db_name, create_table.SyntheticTable.db_password, create_table.SyntheticTable.db_port, create_table.SyntheticTable.db_server, create_table.SyntheticTable.db_user, and create_table.SyntheticTable.getCopyFromCommand().
Referenced by create_table.SyntheticTable.createDataAndImportTable().
create_table.SyntheticTable.column_list |
Definition at line 73 of file create_table.py.
Referenced by create_table.SyntheticTable.createExpectedTableDetails(), create_table.SyntheticTable.generateData(), and create_table.SyntheticTable.getCreateTableCommand().
create_table.SyntheticTable.data_dir_path |
Definition at line 71 of file create_table.py.
create_table.SyntheticTable.data_file_name_base |
Definition at line 78 of file create_table.py.
Referenced by create_table.SyntheticTable.createDataAndImportTable(), create_table.SyntheticTable.generateData(), and create_table.SyntheticTable.getCopyFromCommand().
create_table.SyntheticTable.db_name |
Definition at line 66 of file create_table.py.
Referenced by create_table.SyntheticTable.createTableInDB(), create_table.SyntheticTable.doesTableHasExpectedNumEntriesInDB(), create_table.SyntheticTable.doesTableHasExpectedSchemaInDB(), create_table.SyntheticTable.importDataIntoTableInDB(), heavydb.thrift.ttypes.TDBInfo.read(), heavydb.thrift.ttypes.TQueryInfo.read(), heavydb.thrift.ttypes.TDBInfo.write(), and heavydb.thrift.ttypes.TQueryInfo.write().
create_table.SyntheticTable.db_password |
create_table.SyntheticTable.db_port |
create_table.SyntheticTable.db_server |
create_table.SyntheticTable.db_user |
create_table.SyntheticTable.fragment_size |
Definition at line 64 of file create_table.py.
Referenced by create_table.SyntheticTable.getCreateTableCommand(), heavydb.thrift.ttypes.TTableDetails.read(), and heavydb.thrift.ttypes.TTableDetails.write().
create_table.SyntheticTable.is_remote_server |
Definition at line 75 of file create_table.py.
Referenced by create_table.SyntheticTable.createDataAndImportTable().
create_table.SyntheticTable.num_entries |
Definition at line 72 of file create_table.py.
Referenced by create_table.SyntheticTable.createDataAndImportTable(), create_table.SyntheticTable.doesTableHasExpectedNumEntriesInDB(), and create_table.SyntheticTable.generateDataParallel().
create_table.SyntheticTable.num_fragments |
Definition at line 65 of file create_table.py.
create_table.SyntheticTable.table_name |
Definition at line 63 of file create_table.py.
Referenced by create_table.SyntheticTable.createTableInDB(), create_table.SyntheticTable.doesTableHasExpectedNumEntriesInDB(), create_table.SyntheticTable.doesTableHasExpectedSchemaInDB(), create_table.SyntheticTable.getCopyFromCommand(), create_table.SyntheticTable.getCreateTableCommand(), heavydb.thrift.ttypes.TTableMeta.read(), heavydb.thrift.Heavy.get_table_details_args.read(), heavydb.thrift.Heavy.get_table_details_for_database_args.read(), heavydb.thrift.Heavy.get_internal_table_details_args.read(), heavydb.thrift.Heavy.get_internal_table_details_for_database_args.read(), heavydb.thrift.Heavy.set_table_epoch_by_name_args.read(), heavydb.thrift.Heavy.get_table_epoch_by_name_args.read(), heavydb.thrift.Heavy.load_table_binary_args.read(), heavydb.thrift.Heavy.load_table_binary_columnar_args.read(), heavydb.thrift.Heavy.load_table_binary_arrow_args.read(), heavydb.thrift.Heavy.load_table_args.read(), heavydb.thrift.Heavy.create_table_args.read(), heavydb.thrift.Heavy.import_table_args.read(), heavydb.thrift.Heavy.import_geo_table_args.read(), heavydb.thrift.ttypes.TTableMeta.write(), heavydb.thrift.Heavy.get_table_details_args.write(), heavydb.thrift.Heavy.get_table_details_for_database_args.write(), heavydb.thrift.Heavy.get_internal_table_details_args.write(), heavydb.thrift.Heavy.get_internal_table_details_for_database_args.write(), heavydb.thrift.Heavy.set_table_epoch_by_name_args.write(), heavydb.thrift.Heavy.get_table_epoch_by_name_args.write(), heavydb.thrift.Heavy.load_table_binary_args.write(), heavydb.thrift.Heavy.load_table_binary_columnar_args.write(), heavydb.thrift.Heavy.load_table_binary_arrow_args.write(), heavydb.thrift.Heavy.load_table_args.write(), heavydb.thrift.Heavy.create_table_args.write(), heavydb.thrift.Heavy.import_table_args.write(), and heavydb.thrift.Heavy.import_geo_table_args.write().