title: How to load partial data from a JDBC cataloged connection in AWS Glue?
body: <p>I understand that I can load an entire table from a JDBC Cataloged connection via the Glue context like so:</p>
  
  <pre><code>glueContext.create_dynamic_frame.from_catalog(
      database="jdbc_rds_postgresql",
      table_name="public_foo_table",
      transformation_ctx="datasource0"
  )
  </code></pre>
  
  <p>However, what I'd like to do is partially load a table using the cataloged connection as if I were using an uncataloged JDBC connection via the spark session like this:</p>
  
  <pre><code>query = "(select * from public.foo_table where date='%s') as data" % date_fm)
  spark.read.jdbc(url=DB_URL, table=query)
  </code></pre>
  
  <p>Is there a way I could use the Cataloged connection instead?</p>
  
  <p>Alternatively, when using an uncataloged connection I'm having a hard time understanding how to lock down access to the uncataloged connection such that only a Glue job can access it. What are my options?</p>