I have created JDBC connection(to PostgreSQL) and tested successfully. I can read the table using two approaches.(Step 2.1 and Step 2.2)
Step 1: Create JDBC connection(to PostgreSQL).
Step 2: Create a Crawler. On running this crawler, table gets created in Data Catalog. Use this table with glueContext.getSource.getDynamicFrame()
Step 3: Define JDBC properties like URL, dbtable, user, password. Use these directly in our code/script as parameters.
My doubt is about approach in Step 3. Can't we directly use connection_name in our code/script that was created in Step 1.
If I don't add connection from Step 1 while creating the job and if I define jdbc properties in code/script then I encounter exception(org.postgresql.util.PSQLException) and connection attempt fails.