To query glue data catalog table from an AWS Glue job, you need the following requirements in your configuration.
Check this option :
and add the following param to the glue job :
--enable-glue-datacatalog true
Please let me know if these requirements address your problem