Skip to content

Commit

Permalink
[core] Missing alerts table creation during init
Browse files Browse the repository at this point in the history
  • Loading branch information
Chunyong Lin committed Mar 26, 2020
1 parent 19458d7 commit 7d48144
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions streamalert_cli/athena/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,6 @@ def create_table(table, bucket, config, schema_override=None):

athena_client = get_athena_client(config)

config_data_bucket = firehose_data_bucket(config)
if not config_data_bucket:
LOGGER.error('The \'firehose\' module is not enabled in global.json')
return False

# Check if the table exists
if athena_client.check_table_exists(sanitized_table_name):
LOGGER.info('The \'%s\' table already exists.', sanitized_table_name)
Expand All @@ -394,6 +389,11 @@ def create_table(table, bucket, config, schema_override=None):

else: # all other tables are log types

config_data_bucket = firehose_data_bucket(config)
if not config_data_bucket:
LOGGER.error('The \'firehose\' module is not enabled in global.json')
return False

# Use the bucket if supplied, otherwise use the default data bucket
bucket = bucket or config_data_bucket

Expand Down

0 comments on commit 7d48144

Please sign in to comment.