title: Selecting data from 100 tables in AWS Glue/PySpark
body: <p>I have a catalog of 100 tables in the AWS Glue catalog of the format:</p>
  
  <pre><code>user_1
  user_2
  ...
  user_100
  </code></pre>
  
  <p>Each table has this format:</p>
  
  <pre><code>| id | user_id | date     | expense |
  |----|---------|----------|---------|
  | 1  | 1       | 20200521 | 200     |
  | 2  | 2       | 20200601 | 100     |
  | 3  | 1       | 20200603 | 90      |
  </code></pre>
  
  <p>Every table has the same schema where one column is expense (int type).
  Each users rows get randomly inserted in to one these 100 tables.</p>
  
  <p>What I want do is to check the sum of the expense column of each of the tables for a given user.</p>
  
  <p>What is the most efficient way of doing this rather than creating 100 Dynamic frames and joining them. I suppose I need to create 100 datasources for each table, but is there an easier way to select the rows for a given user from all 100 tables and get the sum?</p>
  
  <p>Thank you.</p>