diff --git a/dlt/destinations/impl/athena/athena.py b/dlt/destinations/impl/athena/athena.py index a2e2566a76..c7e30aaf55 100644 --- a/dlt/destinations/impl/athena/athena.py +++ b/dlt/destinations/impl/athena/athena.py @@ -318,11 +318,12 @@ def __init__( # verify if staging layout is valid for Athena # this will raise if the table prefix is not properly defined # we actually that {table_name} is first, no {schema_name} is allowed - self.table_prefix_layout = path_utils.get_table_prefix_layout( - config.staging_config.layout, - supported_prefix_placeholders=[], - table_needs_own_folder=True, - ) + if config.staging_config: + self.table_prefix_layout = path_utils.get_table_prefix_layout( + config.staging_config.layout, + supported_prefix_placeholders=[], + table_needs_own_folder=True, + ) sql_client = AthenaSQLClient( config.normalize_dataset_name(schema),