airbyte-integrations/connectors/source-s3/unit_tests/test_parquet_parser.py
def generate_parquet_file(name: str, columns: Mapping[str, str], num_rows: int, custom_rows: Mapping[int, Mapping[str, Any]] = None) -> str:
    """Generates  a random data and save it to a tmp file"""
    filename = os.path.join(tmp_folder(), name + "." + filetype)
    if os.path.exists(filename):
        return filename

    types = list(columns.values()) if num_rows else []
    rows = [_generate_row(types) for _ in range(num_rows)]
    for n, custom_row in (custom_rows or {}).items():
        rows[n] = custom_row
    return _save_parquet_file(filename, list(columns.keys()) if num_rows else [], rows)
Generates  a random data and save it to a tmp file
Generates  a random data and save it to a tmp file
Generates a random data and save it to a tmp file
def generate_parquet_file(name: str, columns: Mapping[str, str], num_rows: int, custom_rows: Mapping[int, Mapping[str, Any]] = None) -> str:
    filename = os.path.join(tmp_folder(), name + "." + filetype)
    if os.path.exists(filename):
        return filename
    types = list(columns.values()) if num_rows else []
    rows = [_generate_row(types) for _ in range(num_rows)]
    for n, custom_row in (custom_rows or {}).items():
        rows[n] = custom_row
    return _save_parquet_file(filename, list(columns.keys()) if num_rows else [], rows)
def generate_parquet_file ( name : str , columns : Mapping [ str , str ] , num_rows : int , custom_rows : Mapping [ int , Mapping [ str , Any ] ] = None ) -> str : filename = os . path . join ( tmp_folder ( ) , name + "." + filetype ) if os . path . exists ( filename ) : return filename types = list ( columns . values ( ) ) if num_rows else [ ] rows = [ _generate_row ( types ) for _ in range ( num_rows ) ] for n , custom_row in ( custom_rows or { } ) . items ( ) : rows [ n ] = custom_row return _save_parquet_file ( filename , list ( columns . keys ( ) ) if num_rows else [ ] , rows )
Generates  a random data and save it to a tmp file
Generates a random data and save it to a tmp file
"""Generates  a random data and save it to a tmp file"""
name
str
columns
Mapping[str, str]
num_rows
int
custom_rows
Mapping[int, Mapping[str, Any]]