title: AWS Glue Crawler creates a table for every file
body: <p>I created a test Redshift cluster and enabled audit logging on the database. This creates connection logs, user logs and user activity logs (details about the logs are available <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-logs" rel="nofollow noreferrer">here</a>). This creates the logs in S3 bucket in the following location:</p>
  
  <pre><code>s3://bucket_name/AWSLogs/123456789012/redshift/&lt;region&gt;/&lt;year&gt;/&lt;month&gt;/&lt;date&gt;/*_&lt;log_type&gt;_&lt;timestamp&gt;.gz
  </code></pre>
  
  <p>Next I created a Glue Crawler and pointed the data store to <code>s3://bucket_name/AWSLogs/123456789012/redshift</code> and left the remaining options as the default values.</p>
  
  <p>When I run the Crawler, it creates a separate table for every log item. Instead, I expect it to create 3 tables (one each for user log, user activity log and connection log).</p>
  
  <p>Following are some things I tried with no success:</p>
  
  <ul>
  <li>Updated the data store to point to prefix further inside the bucket like <code>s3://bucket_name/AWSLogs/123456789012/redshift/&lt;region&gt;</code>.</li>
  <li>Grouping behavior: create a single schema for each S3 path</li>
  <li>Configuration options: add new columns only</li>
  </ul>
  
  <p>Am I missing something here? Thank you.</p>