from typing import List


def create_copy_sql(table_name: str,
                    stage_name: str,
                    upload_key: str,
                    file_format_name: str,
                    columns: List):
    """Generate a CSV compatible snowflake COPY INTO command"""
    p_columns = ', '.join([c['name'] for c in columns])

    return f"COPY INTO {table_name} ({p_columns}) " \
           f"FROM '@{stage_name}/{upload_key}' " \
           f"FILE_FORMAT = (format_name='{file_format_name}')"