예제 #1
0
def impl(context, tablename, schemaname):
    if not check_schema_exists(context, schemaname, context.dbname):
        raise Exception("Schema %s does not exist in database %s" % (schemaname, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]), context.dbname)
    dbconn.execSQL(context.conn, CREATE_MULTI_PARTITION_TABLE_SQL % (schemaname, tablename))
    context.conn.commit()
    check_table_exists(context, context.dbname, '.'.join([schemaname, tablename]), table_type = 'ao')
예제 #2
0
def impl(context, storage_type, tablename, col_name_list, col_type_list, schemaname):
    schemaname_no_quote = schemaname
    if '"' in schemaname:
        schemaname_no_quote = schemaname[1:-1]
    if not check_schema_exists(context, schemaname_no_quote, context.dbname):
        raise Exception("Schema %s does not exist in database %s" % (schemaname_no_quote, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]), context.dbname)
    create_table_with_column_list(context.conn, storage_type, schemaname, tablename, col_name_list, col_type_list)
    check_table_exists(context, context.dbname, '.'.join([schemaname, tablename]), table_type = storage_type)
예제 #3
0
def impl(context, tablename, schemaname):
    if not check_schema_exists(context, schemaname, context.dbname):
        raise Exception("Schema %s does not exist in database %s" %
                        (schemaname, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]),
                         context.dbname)
    dbconn.execSQL(context.conn,
                   CREATE_MULTI_PARTITION_TABLE_SQL % (schemaname, tablename))
    context.conn.commit()
    check_table_exists(context,
                       context.dbname,
                       '.'.join([schemaname, tablename]),
                       table_type='ao')
예제 #4
0
def impl(context, storage_type, tablename, col_name_list, col_type_list,
         schemaname):
    if not check_schema_exists(context, schemaname, context.dbname):
        raise Exception("Schema %s does not exist in database %s" %
                        (schemaname, context.dbname))
    drop_table_if_exists(context, '.'.join([schemaname, tablename]),
                         context.dbname)
    create_table_with_column_list(context.conn, storage_type, schemaname,
                                  tablename, col_name_list, col_type_list)
    check_table_exists(context,
                       context.dbname,
                       '.'.join([schemaname, tablename]),
                       table_type=storage_type)