def store_table_metadata()

in flatten_join_nested_file.py [0:0]


def store_table_metadata(tbl_name, dynf_coll, df_name, tbl_join_lvl, has_child):

    global tables_info_map
    global tables_to_join_map
    global dataframes_map
    global s3_target_path_map

    # create a list of S3 output path indexed by table name
    s3_target_path_map[tbl_name] = s3_target_path+tbl_name
    # create a list of dataframes indexed by table name
    dataframes_map[tbl_name] = dynf_coll.select(df_name).toDF()
    # create a list of columns indexed by table name
    if tbl_name not in tables_info_map:
        tables_info_map[tbl_name] = {'columns': dataframes_map[tbl_name].schema.names,
                                     'has_child': has_child, 'nested_lvl': tbl_join_lvl, 'join_to_tbls': [], 'join_col': []}