Mailing List webobjects-dev@wocommunity.org Message #91
From: Ramsey Gurley <webobjects-dev@wocommunity.org>
Subject: Re: [WO-DEV] Athena JDBC
Date: Mon, 1 Mar 2021 01:06:32 +0000
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Looks like that's happening in com.webobjects.jdbcadaptor.JDBCChannel.describeTableNames(). It appears you can provide that sql statement in your JDBCPlugin subclass using sqlStatementForGettingTableNames(). If that returns a non-null string, it will attempt to use that first before going to DatabaseMetaData.

On Mar 1, 2021, at 6:45 AM, Don Lindsay <webobjects-dev@wocommunity.org> wrote:

I am not using the MYSQL plugin on Athena JDBC connections:

1.  I have data in an Athena instance in AWS.  
2.  I am able to connect to the database but not retrieve any Database Metadata of any kind in a webobjects application and EOModeler.    
3.  I have tried with Intellij DataGrip, which is a JDBC query IDE, and that application is able to get all metadata (databases, schemas, tables and views).  

Based on the above bullets, I am describing that no metadata is returned in EOModeler , or for that matter calling JDBC connection getMetaData method.

Conclusion:

Whatever queries the JDBC connector is using to pull metadata from the connection are not working for the Athena AWS JDBC driver.

What I have looked at to resolve the issue:

The query that is used with the Athena JDBC driver is “SHOW TABLES IN <DATABASE>” to retrieve table names from the JDBC connection.

My thought process:

Maybe a plugin can change the queries that are used to discover tables for EOF.  

My Action:
  1. Go into project wonder and look at some code there to see if anything like this has been done in the Wonder project
  2. Code that was found in Wonder that made the most sense to look at was plugins
  3. Opened the MySql plugin to see if there was any indication in there where I could change the schema and table discovery methods for EOF so it discovers the metadata.
Result:

I have not found a way, or any code in Wonder that already does it, to modify the metadata discovery for the Athena JDBC driver.  My question to the list is:

1.  Is there a way to modify the way EOF discovers metadata for a specific type of database
2.  If there is what class and methods would I need to implement, extend, override to be able to get the metadata into EOF for the Athena AWS database.


Don

I went into project wonder and looked at the MySQL plugin to see if there is a way to change the queries that are used to get database metadata in a plugin for EOF.

Is anyone else using Athena JDBC driver?  What was your experience if you are.

Any pointers on how to modify how the JDBC EOF framework discovers metadata.

For Athena the query is Show TABLES IN <DATABASE>

Any help that anyone can provide would be great.

On Feb 28, 2021, at 14:06, Ray Kiddy <webobjects-dev@wocommunity.org> wrote:

I am not sure that I understand your question.

If you want to connect to another kind of database and the MySQL plugin is not doing it, the obvious answer would be to write another plugin, one specifically for Athena. Does anyone have a plugin for Athena?

Is Athena supposed to be API compatible with MySQL? Glancing at some documentation, I am not seeing that it is or is supposed to be. Does the MySQL plugin "almost" work? If so, perhaps the MySQL plugin could be re-used and extended for Athena.

As to "how to modify how the JDBC EOF framework discovers metadata", the answer would be to use the methods available when writing a new plugin to get the information and return the information EOF needs.

Given this, are you asking how to write a plugin for Athena, or are you asking if one already exists, or if someone else would write it?

cheers - ray

On 2/27/21 7:20 PM, Don Lindsay wrote:
Hello;

I have data in an Athena instance in AWS.  I am able to connect to the database but not retrieve any Database Metadata of any kind.    I have tried with IntellijDataGrip and that application is able to get all metadata (databases, schemas, tables and views.  I went into project wonder and looked at the MySQL plugin to see if there is a way to change the queries that are used to get database metadata in a plugin for EOF.

Is anyone else using Athena JDBC driver?  What was your experience if you are.

Any pointers on how to modify how the JDBC EOF framework discovers metadata.

For Athena the query is Show TABLES IN <DATABASE>

Any help that anyone can provide would be great.

Thanks

Don

#############################################################
This message is sent to you because you are subscribed to
the mailing list <webobjects-dev@wocommunity.org>.
To unsubscribe, E-mail to: <webobjects-dev-off@wocommunity.org>
To switch to the DIGEST mode, E-mail to <webobjects-dev-digest@wocommunity.org>
To switch to the INDEX mode, E-mail to <webobjects-dev-index@wocommunity.org>
Send administrative queries to  <webobjects-dev-request@wocommunity.org>




Confidentiality Notice: This email, including all attachments and replies thereto, are covered by the Electronic Communications Privacy Act, 18 U.S.C. Sections 2510-2521 and are legally privileged. This information is confidential, and intended only for the use of the individuals or entities named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this transmitted information is strictly prohibited. Please notify us if you have received this transmission in error. Thank you.
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster