def METHOD_NAME(
    operation: str,
    s3_staging_dir: str,
    format_: str = AthenaFileFormat.FILE_FORMAT_PARQUET,
    compression: str = AthenaCompression.COMPRESSION_SNAPPY,
):
    if not operation or not operation.strip():
        raise ProgrammingError("Query is none or empty.")
    operation_upper = operation.strip().upper()
    if operation_upper.startswith("SELECT") or operation_upper.startswith("WITH"):
        now = datetime.utcnow().strftime("%Y%m%d")
        location = f"{s3_staging_dir}unload/{now}/{str(uuid.uuid4())}/"
        operation = textwrap.dedent(
            f"""
            UNLOAD (
            \t{operation.strip()}
            )
            TO '{location}'
            WITH (
            \tformat = '{format_}',
            \tcompression = '{compression}'
            )
            """
        )
    else:
        location = None
    return operation, location