title: AWS Glue Crawler Creates Partition and File Tables
body: <p>I have a pretty basic s3 setup that I would like to query against using Athena. The data is all stored in one bucket, organized into year/month/day/hour folders. </p>
  
  <pre><code>|--data
  |   |--2018
  |   |   |--01
  |   |   |   |--01
  |   |   |   |   |--01
  |   |   |   |   |   |--file1.json
  |   |   |   |   |   |--file2.json
  |   |   |   |   |--02
  |   |   |   |   |   |--file3.json
  |   |   |   |   |   |--file4.json
  ...
  </code></pre>
  
  <p>I then setup an AWS Glue Crawler to crawl <code>s3://bucket/data</code>. The schema in all files is identical. I would expect that I would get one database table, with partitions on the year, month, day, etc. </p>
  
  <p>What I get instead are tens of thousands of tables. There is a table for each file, and a table for each parent partition as well. So far as I can tell, separate tables were created for each file/folder, without a single overarching one where I can query across a large date range.</p>
  
  <p>I followed instructions <a href="https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html" rel="noreferrer">https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html</a> to the best of my ability, but cannot figure out how to structure my partitions/scanning such that I don't get this huge, mostly worthless dump of data. </p>