tools/athena/loadtoathena.py
def create_athena_database(
    dryrun: bool, bucket_region: str, db_name: str, rslt_config: dict
) -> None:
    """
    Creates the database if it doesn't exists in Athena
    """

    logger.info("creating database: %s", db_name)
    # Construct create database string
    query_str = f"CREATE DATABASE IF NOT EXISTS `{db_name}` "
    query_str += "\n  COMMENT 'Database to store Athena query results'"

    query_exec_context = {"Catalog": "AwsDataCatalog"}
    execute_query(dryrun, bucket_region, query_str,
                  rslt_config, query_exec_context)

    Creates the database if it doesn't exists in Athena
    
Creates the database if it doesn't exists in Athena
Creates the database if it doesn ' t exists in Athena
def create_athena_database(
    dryrun: bool, bucket_region: str, db_name: str, rslt_config: dict
) -> None:
    logger.info("creating database: %s", db_name)
    query_str = f"CREATE DATABASE IF NOT EXISTS `{db_name}` "
    query_str += "\n  COMMENT 'Database to store Athena query results'"
    query_exec_context = {"Catalog": "AwsDataCatalog"}
    execute_query(dryrun, bucket_region, query_str,
                  rslt_config, query_exec_context)
def create_athena_database ( dryrun : bool , bucket_region : str , db_name : str , rslt_config : dict ) -> None : logger . info ( "creating database: %s" , db_name ) query_str = f"CREATE DATABASE IF NOT EXISTS `{db_name}` " query_str += "\n  COMMENT 'Database to store Athena query results'" query_exec_context = { "Catalog" : "AwsDataCatalog" } execute_query ( dryrun , bucket_region , query_str , rslt_config , query_exec_context )
Creates the database if it doesn't exists in Athena
Creates the database if it doesn ' t exists in Athena
"""
    Creates the database if it doesn't exists in Athena
    """ # Construct create database string
dryrun
bool
bucket_region
str
db_name
str
rslt_config
dict