Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Filtering Tables in SQLBuilder Dialog Example
Filtering Tables in SQLBuilder Dialog Example [message #50044] Tue, 23 September 2008 06:56 Go to next message
Eclipse UserFriend
Originally posted by: philippeweber57.yahoo.fr

Hi DTP newsgroup,

I checked out from CVS the SQL Builder Dialog Example project
org.eclipse.datatools.sqltools.sqlbuilder.examples

I found it very promising but to fit my needs I should be able to filter
out the tables available for building the query.

I don't know if this could be done at the level of the SQLDomainModel
object used by the dialog or if I should extends ODA JDBC driver to add
specific filtering.

Does anyone have already tried this or could give me a clue ?

Thanks
Philippe
Re: Filtering Tables in SQLBuilder Dialog Example [message #50453 is a reply to message #50044] Tue, 30 September 2008 08:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: philippeweber57.yahoo.fr

I report some of my testing hoping to get help on the go.

I would like to use the SQL Builder as it is to create SQL-like query,
however the database structure is not what I want to query against (in
fact I need to read structure description from specific tables so I
though executing Select statement to replace connection.getMetatData calls).

So I though of creating a custom connection profile to override catalog
loading.
For testing I started with MySQL so,

I tried to copy and change catalog code in datatools.enablement.mysql
plugins
and also to use a brand new plugin with profileExtension and
overrideLoader extension point property set.

But it seems that my code for catalog loading is totally ignored by Data
Source Explorer and SQL Builder.

Could someone points me to a good start with extending existing
connectionProfile.

Thanks
Philippe




Philippe Weber wrote:
> Hi DTP newsgroup,
>
> I checked out from CVS the SQL Builder Dialog Example project
> org.eclipse.datatools.sqltools.sqlbuilder.examples
>
> I found it very promising but to fit my needs I should be able to filter
> out the tables available for building the query.
>
> I don't know if this could be done at the level of the SQLDomainModel
> object used by the dialog or if I should extends ODA JDBC driver to add
> specific filtering.
>
> Does anyone have already tried this or could give me a clue ?
>
> Thanks
> Philippe
Re: Filtering Tables in SQLBuilder Dialog Example [message #50480 is a reply to message #50453] Wed, 01 October 2008 13:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

Hi Philippe...

Can you provide a little more detail about what exactly it is you want to
do? I'm not sure this is a use case we currently support if you're trying to
do the following:

1) Extend the MySQL connection profile (basically have a MySQL2)
2) In that connection profile, provide some updated catalog loading to meet
your special table requirements.
3) Use the populated model for the SQL Query Builder

Is that about right?
--Fitz

"Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
news:gbsmoo$tk5$1@build.eclipse.org...
>I report some of my testing hoping to get help on the go.
>
> I would like to use the SQL Builder as it is to create SQL-like query,
> however the database structure is not what I want to query against (in
> fact I need to read structure description from specific tables so I though
> executing Select statement to replace connection.getMetatData calls).
>
> So I though of creating a custom connection profile to override catalog
> loading.
> For testing I started with MySQL so,
>
> I tried to copy and change catalog code in datatools.enablement.mysql
> plugins
> and also to use a brand new plugin with profileExtension and
> overrideLoader extension point property set.
>
> But it seems that my code for catalog loading is totally ignored by Data
> Source Explorer and SQL Builder.
>
> Could someone points me to a good start with extending existing
> connectionProfile.
>
> Thanks
> Philippe
>
>
>
>
> Philippe Weber wrote:
>> Hi DTP newsgroup,
>>
>> I checked out from CVS the SQL Builder Dialog Example project
>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>
>> I found it very promising but to fit my needs I should be able to filter
>> out the tables available for building the query.
>>
>> I don't know if this could be done at the level of the SQLDomainModel
>> object used by the dialog or if I should extends ODA JDBC driver to add
>> specific filtering.
>>
>> Does anyone have already tried this or could give me a clue ?
>>
>> Thanks
>> Philippe
Re: Filtering Tables in SQLBuilder Dialog Example [message #50536 is a reply to message #50453] Wed, 01 October 2008 14:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

I'd also be interested in getting some information about what kind of
structure information you're reading from specific tables. Is this
particular to your database? If so, could you come up with a generic
example that I could use to play with?

--Fitz

"Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
news:gbsmoo$tk5$1@build.eclipse.org...
>I report some of my testing hoping to get help on the go.
>
> I would like to use the SQL Builder as it is to create SQL-like query,
> however the database structure is not what I want to query against (in
> fact I need to read structure description from specific tables so I though
> executing Select statement to replace connection.getMetatData calls).
>
> So I though of creating a custom connection profile to override catalog
> loading.
> For testing I started with MySQL so,
>
> I tried to copy and change catalog code in datatools.enablement.mysql
> plugins
> and also to use a brand new plugin with profileExtension and
> overrideLoader extension point property set.
>
> But it seems that my code for catalog loading is totally ignored by Data
> Source Explorer and SQL Builder.
>
> Could someone points me to a good start with extending existing
> connectionProfile.
>
> Thanks
> Philippe
>
>
>
>
> Philippe Weber wrote:
>> Hi DTP newsgroup,
>>
>> I checked out from CVS the SQL Builder Dialog Example project
>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>
>> I found it very promising but to fit my needs I should be able to filter
>> out the tables available for building the query.
>>
>> I don't know if this could be done at the level of the SQLDomainModel
>> object used by the dialog or if I should extends ODA JDBC driver to add
>> specific filtering.
>>
>> Does anyone have already tried this or could give me a clue ?
>>
>> Thanks
>> Philippe
Re: Filtering Tables in SQLBuilder Dialog Example [message #50592 is a reply to message #50536] Fri, 03 October 2008 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: philippeweber57.yahoo.fr

Hi Brian,

To illustrate my usecase,
I'm involved in prototyping the migration of a rather old app that used
flat file data support to a a database support. The prototype is now
based on Eclipse RCP.

The application use the terms of dataset and dataset description
So one file was used to describe dataset structure + pointer to file(s)
containing the real data for a dataset.
Then SQL-like query will be run on datasets data (Join , Order by...)

In the new application general dataset structure type edition will be
available using JPA and stored in database (not my part of the job). And
a dataset will reference the correct structure type.
Then the creation of standard SQL query on dataset reading their
structure should be made using GUI similar to SQL Query Builder.

So I though of finding how to plug into the SQL Builder with my custom
model.
Thanks to the article on your blog, I understood the structure of an
enablement project, and starting with a copy of mysql enablement
projects and changing to custom name from Vendor up to Connection
Profile, I created my custom "ExtendedMySQL" driver to be able to manage
the DB catalog as I want.
For testing I simply changed the code in loadTables() and loadColumns()
method to push up static data to SQL Builder
(As I started from MySQL I'm not using overrideLoader in
org.eclipse.datatools.connectivity.sqm.core.Catalog extension point but
directly catalog)

From there I'm waiting for a decision of the architect on the project
to know if I should use JDBC connection and then create similar project
for each DB we should support (Oracle and Postgres), or generalize this
project to be only a facade to call JPA DAO that could be shared with
other part of the project (not yet created).

Sorry it's a little early for me to provide an example. But if I found
out interesting use of DTP SQL Tools from my investigation, I'll gladly
share it with the newsgroup.

Generally I would like to know if there is work in progress for
Navigating a JPA "Repository". Because I'm more interested in being able
to visualize my business object than fetching Database.
Also I think that it could be helpful to create complex JPQL query.

From how I understand it, having the same for JPA "Repository" as what
was done for Databases would need hard work on a "JPA Modelbase"
project, right ?

Also is there some reference on how SQLtools make use of Ecore models
for DBdefinitions to satisfy my curiosity.

Thanks,
Philippe






Brian Fitzpatrick wrote:
> I'd also be interested in getting some information about what kind of
> structure information you're reading from specific tables. Is this
> particular to your database? If so, could you come up with a generic
> example that I could use to play with?
>
> --Fitz
>
> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
> news:gbsmoo$tk5$1@build.eclipse.org...
>> I report some of my testing hoping to get help on the go.
>>
>> I would like to use the SQL Builder as it is to create SQL-like query,
>> however the database structure is not what I want to query against (in
>> fact I need to read structure description from specific tables so I though
>> executing Select statement to replace connection.getMetatData calls).
>>
>> So I though of creating a custom connection profile to override catalog
>> loading.
>> For testing I started with MySQL so,
>>
>> I tried to copy and change catalog code in datatools.enablement.mysql
>> plugins
>> and also to use a brand new plugin with profileExtension and
>> overrideLoader extension point property set.
>>
>> But it seems that my code for catalog loading is totally ignored by Data
>> Source Explorer and SQL Builder.
>>
>> Could someone points me to a good start with extending existing
>> connectionProfile.
>>
>> Thanks
>> Philippe
>>
>>
>>
>>
>> Philippe Weber wrote:
>>> Hi DTP newsgroup,
>>>
>>> I checked out from CVS the SQL Builder Dialog Example project
>>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>>
>>> I found it very promising but to fit my needs I should be able to filter
>>> out the tables available for building the query.
>>>
>>> I don't know if this could be done at the level of the SQLDomainModel
>>> object used by the dialog or if I should extends ODA JDBC driver to add
>>> specific filtering.
>>>
>>> Does anyone have already tried this or could give me a clue ?
>>>
>>> Thanks
>>> Philippe
>
>
Re: Filtering Tables in SQLBuilder Dialog Example [message #50620 is a reply to message #50592] Fri, 03 October 2008 14:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianf.sybase.com

If you're looking at going at this from the JPA side of things, the JPA
tooling in WTP uses DTP. :)

You might pose your question on the eclipse.technology.dali newsgroup (which
is very active) to ask about JPA.

As for the SQL Editor/SQL Query Builder questions, I've asked one of the
guys working on the SQL Query Builder to chime in here, so hopefully he'll
have a chance to do so today.

It certainly sounds like an interesting project. :)

--Fitz

"Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
news:gc4u04$sap$1@build.eclipse.org...
> Hi Brian,
>
> To illustrate my usecase,
> I'm involved in prototyping the migration of a rather old app that used
> flat file data support to a a database support. The prototype is now based
> on Eclipse RCP.
>
> The application use the terms of dataset and dataset description
> So one file was used to describe dataset structure + pointer to file(s)
> containing the real data for a dataset.
> Then SQL-like query will be run on datasets data (Join , Order by...)
>
> In the new application general dataset structure type edition will be
> available using JPA and stored in database (not my part of the job). And a
> dataset will reference the correct structure type.
> Then the creation of standard SQL query on dataset reading their structure
> should be made using GUI similar to SQL Query Builder.
>
> So I though of finding how to plug into the SQL Builder with my custom
> model.
> Thanks to the article on your blog, I understood the structure of an
> enablement project, and starting with a copy of mysql enablement projects
> and changing to custom name from Vendor up to Connection Profile, I
> created my custom "ExtendedMySQL" driver to be able to manage the DB
> catalog as I want.
> For testing I simply changed the code in loadTables() and loadColumns()
> method to push up static data to SQL Builder
> (As I started from MySQL I'm not using overrideLoader in
> org.eclipse.datatools.connectivity.sqm.core.Catalog extension point but
> directly catalog)
>
> From there I'm waiting for a decision of the architect on the project to
> know if I should use JDBC connection and then create similar project for
> each DB we should support (Oracle and Postgres), or generalize this
> project to be only a facade to call JPA DAO that could be shared with
> other part of the project (not yet created).
>
> Sorry it's a little early for me to provide an example. But if I found out
> interesting use of DTP SQL Tools from my investigation, I'll gladly share
> it with the newsgroup.
>
> Generally I would like to know if there is work in progress for Navigating
> a JPA "Repository". Because I'm more interested in being able to visualize
> my business object than fetching Database.
> Also I think that it could be helpful to create complex JPQL query.
>
> From how I understand it, having the same for JPA "Repository" as what was
> done for Databases would need hard work on a "JPA Modelbase" project,
> right ?
>
> Also is there some reference on how SQLtools make use of Ecore models for
> DBdefinitions to satisfy my curiosity.
>
> Thanks,
> Philippe
>
>
>
>
>
>
> Brian Fitzpatrick wrote:
>> I'd also be interested in getting some information about what kind of
>> structure information you're reading from specific tables. Is this
>> particular to your database? If so, could you come up with a generic
>> example that I could use to play with?
>>
>> --Fitz
>>
>> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
>> news:gbsmoo$tk5$1@build.eclipse.org...
>>> I report some of my testing hoping to get help on the go.
>>>
>>> I would like to use the SQL Builder as it is to create SQL-like query,
>>> however the database structure is not what I want to query against (in
>>> fact I need to read structure description from specific tables so I
>>> though executing Select statement to replace connection.getMetatData
>>> calls).
>>>
>>> So I though of creating a custom connection profile to override catalog
>>> loading.
>>> For testing I started with MySQL so,
>>>
>>> I tried to copy and change catalog code in datatools.enablement.mysql
>>> plugins
>>> and also to use a brand new plugin with profileExtension and
>>> overrideLoader extension point property set.
>>>
>>> But it seems that my code for catalog loading is totally ignored by Data
>>> Source Explorer and SQL Builder.
>>>
>>> Could someone points me to a good start with extending existing
>>> connectionProfile.
>>>
>>> Thanks
>>> Philippe
>>>
>>>
>>>
>>>
>>> Philippe Weber wrote:
>>>> Hi DTP newsgroup,
>>>>
>>>> I checked out from CVS the SQL Builder Dialog Example project
>>>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>>>
>>>> I found it very promising but to fit my needs I should be able to
>>>> filter out the tables available for building the query.
>>>>
>>>> I don't know if this could be done at the level of the SQLDomainModel
>>>> object used by the dialog or if I should extends ODA JDBC driver to add
>>>> specific filtering.
>>>>
>>>> Does anyone have already tried this or could give me a clue ?
>>>>
>>>> Thanks
>>>> Philippe
>>
Re: Filtering Tables in SQLBuilder Dialog Example [message #50759 is a reply to message #50620] Wed, 08 October 2008 13:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: philippeweber57.yahoo.fr

Hi Brian,

I started another thread for discussing what I think could be done for
JPA/JPQL.

In the meanwhile, I have one more question on defining my custom sql
parser for my "phantom" db vendor. As I defined my own vendor, generic
parser is used and I need to customize it a little.
I found this extension-point :

org.eclipse.datatools.sqltools.parsers.sql.query.vendorExten sion

but it doesn't seem used anywhere. Could you please point me to the
correct way to extends SQL parser and maybe where to look to see it
implemented for another database.

Thanks
Philippe

Brian Fitzpatrick wrote:
> If you're looking at going at this from the JPA side of things, the JPA
> tooling in WTP uses DTP. :)
>
> You might pose your question on the eclipse.technology.dali newsgroup (which
> is very active) to ask about JPA.
>
> As for the SQL Editor/SQL Query Builder questions, I've asked one of the
> guys working on the SQL Query Builder to chime in here, so hopefully he'll
> have a chance to do so today.
>
> It certainly sounds like an interesting project. :)
>
> --Fitz
>
> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
> news:gc4u04$sap$1@build.eclipse.org...
>> Hi Brian,
>>
>> To illustrate my usecase,
>> I'm involved in prototyping the migration of a rather old app that used
>> flat file data support to a a database support. The prototype is now based
>> on Eclipse RCP.
>>
>> The application use the terms of dataset and dataset description
>> So one file was used to describe dataset structure + pointer to file(s)
>> containing the real data for a dataset.
>> Then SQL-like query will be run on datasets data (Join , Order by...)
>>
>> In the new application general dataset structure type edition will be
>> available using JPA and stored in database (not my part of the job). And a
>> dataset will reference the correct structure type.
>> Then the creation of standard SQL query on dataset reading their structure
>> should be made using GUI similar to SQL Query Builder.
>>
>> So I though of finding how to plug into the SQL Builder with my custom
>> model.
>> Thanks to the article on your blog, I understood the structure of an
>> enablement project, and starting with a copy of mysql enablement projects
>> and changing to custom name from Vendor up to Connection Profile, I
>> created my custom "ExtendedMySQL" driver to be able to manage the DB
>> catalog as I want.
>> For testing I simply changed the code in loadTables() and loadColumns()
>> method to push up static data to SQL Builder
>> (As I started from MySQL I'm not using overrideLoader in
>> org.eclipse.datatools.connectivity.sqm.core.Catalog extension point but
>> directly catalog)
>>
>> From there I'm waiting for a decision of the architect on the project to
>> know if I should use JDBC connection and then create similar project for
>> each DB we should support (Oracle and Postgres), or generalize this
>> project to be only a facade to call JPA DAO that could be shared with
>> other part of the project (not yet created).
>>
>> Sorry it's a little early for me to provide an example. But if I found out
>> interesting use of DTP SQL Tools from my investigation, I'll gladly share
>> it with the newsgroup.
>>
>> Generally I would like to know if there is work in progress for Navigating
>> a JPA "Repository". Because I'm more interested in being able to visualize
>> my business object than fetching Database.
>> Also I think that it could be helpful to create complex JPQL query.
>>
>> From how I understand it, having the same for JPA "Repository" as what was
>> done for Databases would need hard work on a "JPA Modelbase" project,
>> right ?
>>
>> Also is there some reference on how SQLtools make use of Ecore models for
>> DBdefinitions to satisfy my curiosity.
>>
>> Thanks,
>> Philippe
>>
>>
>>
>>
>>
>>
>> Brian Fitzpatrick wrote:
>>> I'd also be interested in getting some information about what kind of
>>> structure information you're reading from specific tables. Is this
>>> particular to your database? If so, could you come up with a generic
>>> example that I could use to play with?
>>>
>>> --Fitz
>>>
>>> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
>>> news:gbsmoo$tk5$1@build.eclipse.org...
>>>> I report some of my testing hoping to get help on the go.
>>>>
>>>> I would like to use the SQL Builder as it is to create SQL-like query,
>>>> however the database structure is not what I want to query against (in
>>>> fact I need to read structure description from specific tables so I
>>>> though executing Select statement to replace connection.getMetatData
>>>> calls).
>>>>
>>>> So I though of creating a custom connection profile to override catalog
>>>> loading.
>>>> For testing I started with MySQL so,
>>>>
>>>> I tried to copy and change catalog code in datatools.enablement.mysql
>>>> plugins
>>>> and also to use a brand new plugin with profileExtension and
>>>> overrideLoader extension point property set.
>>>>
>>>> But it seems that my code for catalog loading is totally ignored by Data
>>>> Source Explorer and SQL Builder.
>>>>
>>>> Could someone points me to a good start with extending existing
>>>> connectionProfile.
>>>>
>>>> Thanks
>>>> Philippe
>>>>
>>>>
>>>>
>>>>
>>>> Philippe Weber wrote:
>>>>> Hi DTP newsgroup,
>>>>>
>>>>> I checked out from CVS the SQL Builder Dialog Example project
>>>>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>>>>
>>>>> I found it very promising but to fit my needs I should be able to
>>>>> filter out the tables available for building the query.
>>>>>
>>>>> I don't know if this could be done at the level of the SQLDomainModel
>>>>> object used by the dialog or if I should extends ODA JDBC driver to add
>>>>> specific filtering.
>>>>>
>>>>> Does anyone have already tried this or could give me a clue ?
>>>>>
>>>>> Thanks
>>>>> Philippe
>
Re: Filtering Tables in SQLBuilder Dialog Example [message #50815 is a reply to message #50592] Tue, 14 October 2008 22:06 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Philippe,

You'd mentioned ODA earlier in the thread. If you are interested in
exploring from the angle of JPA and JPQL query, you might want to take a
look at the ODA JPA data source project:
http://wiki.eclipse.org/About_:_BIRT_JPA_or_JDO_Connector

Linda
Re: Filtering Tables in SQLBuilder Dialog Example [message #593312 is a reply to message #50044] Tue, 30 September 2008 08:07 Go to previous message
Philippe Weber is currently offline Philippe WeberFriend
Messages: 10
Registered: July 2009
Junior Member
I report some of my testing hoping to get help on the go.

I would like to use the SQL Builder as it is to create SQL-like query,
however the database structure is not what I want to query against (in
fact I need to read structure description from specific tables so I
though executing Select statement to replace connection.getMetatData calls).

So I though of creating a custom connection profile to override catalog
loading.
For testing I started with MySQL so,

I tried to copy and change catalog code in datatools.enablement.mysql
plugins
and also to use a brand new plugin with profileExtension and
overrideLoader extension point property set.

But it seems that my code for catalog loading is totally ignored by Data
Source Explorer and SQL Builder.

Could someone points me to a good start with extending existing
connectionProfile.

Thanks
Philippe




Philippe Weber wrote:
> Hi DTP newsgroup,
>
> I checked out from CVS the SQL Builder Dialog Example project
> org.eclipse.datatools.sqltools.sqlbuilder.examples
>
> I found it very promising but to fit my needs I should be able to filter
> out the tables available for building the query.
>
> I don't know if this could be done at the level of the SQLDomainModel
> object used by the dialog or if I should extends ODA JDBC driver to add
> specific filtering.
>
> Does anyone have already tried this or could give me a clue ?
>
> Thanks
> Philippe
Re: Filtering Tables in SQLBuilder Dialog Example [message #593327 is a reply to message #50453] Wed, 01 October 2008 13:23 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 495
Registered: July 2009
Senior Member
Hi Philippe...

Can you provide a little more detail about what exactly it is you want to
do? I'm not sure this is a use case we currently support if you're trying to
do the following:

1) Extend the MySQL connection profile (basically have a MySQL2)
2) In that connection profile, provide some updated catalog loading to meet
your special table requirements.
3) Use the populated model for the SQL Query Builder

Is that about right?
--Fitz

"Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
news:gbsmoo$tk5$1@build.eclipse.org...
>I report some of my testing hoping to get help on the go.
>
> I would like to use the SQL Builder as it is to create SQL-like query,
> however the database structure is not what I want to query against (in
> fact I need to read structure description from specific tables so I though
> executing Select statement to replace connection.getMetatData calls).
>
> So I though of creating a custom connection profile to override catalog
> loading.
> For testing I started with MySQL so,
>
> I tried to copy and change catalog code in datatools.enablement.mysql
> plugins
> and also to use a brand new plugin with profileExtension and
> overrideLoader extension point property set.
>
> But it seems that my code for catalog loading is totally ignored by Data
> Source Explorer and SQL Builder.
>
> Could someone points me to a good start with extending existing
> connectionProfile.
>
> Thanks
> Philippe
>
>
>
>
> Philippe Weber wrote:
>> Hi DTP newsgroup,
>>
>> I checked out from CVS the SQL Builder Dialog Example project
>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>
>> I found it very promising but to fit my needs I should be able to filter
>> out the tables available for building the query.
>>
>> I don't know if this could be done at the level of the SQLDomainModel
>> object used by the dialog or if I should extends ODA JDBC driver to add
>> specific filtering.
>>
>> Does anyone have already tried this or could give me a clue ?
>>
>> Thanks
>> Philippe
Re: Filtering Tables in SQLBuilder Dialog Example [message #593356 is a reply to message #50453] Wed, 01 October 2008 14:07 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 495
Registered: July 2009
Senior Member
I'd also be interested in getting some information about what kind of
structure information you're reading from specific tables. Is this
particular to your database? If so, could you come up with a generic
example that I could use to play with?

--Fitz

"Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
news:gbsmoo$tk5$1@build.eclipse.org...
>I report some of my testing hoping to get help on the go.
>
> I would like to use the SQL Builder as it is to create SQL-like query,
> however the database structure is not what I want to query against (in
> fact I need to read structure description from specific tables so I though
> executing Select statement to replace connection.getMetatData calls).
>
> So I though of creating a custom connection profile to override catalog
> loading.
> For testing I started with MySQL so,
>
> I tried to copy and change catalog code in datatools.enablement.mysql
> plugins
> and also to use a brand new plugin with profileExtension and
> overrideLoader extension point property set.
>
> But it seems that my code for catalog loading is totally ignored by Data
> Source Explorer and SQL Builder.
>
> Could someone points me to a good start with extending existing
> connectionProfile.
>
> Thanks
> Philippe
>
>
>
>
> Philippe Weber wrote:
>> Hi DTP newsgroup,
>>
>> I checked out from CVS the SQL Builder Dialog Example project
>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>
>> I found it very promising but to fit my needs I should be able to filter
>> out the tables available for building the query.
>>
>> I don't know if this could be done at the level of the SQLDomainModel
>> object used by the dialog or if I should extends ODA JDBC driver to add
>> specific filtering.
>>
>> Does anyone have already tried this or could give me a clue ?
>>
>> Thanks
>> Philippe
Re: Filtering Tables in SQLBuilder Dialog Example [message #593384 is a reply to message #50536] Fri, 03 October 2008 11:00 Go to previous message
Philippe Weber is currently offline Philippe WeberFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Brian,

To illustrate my usecase,
I'm involved in prototyping the migration of a rather old app that used
flat file data support to a a database support. The prototype is now
based on Eclipse RCP.

The application use the terms of dataset and dataset description
So one file was used to describe dataset structure + pointer to file(s)
containing the real data for a dataset.
Then SQL-like query will be run on datasets data (Join , Order by...)

In the new application general dataset structure type edition will be
available using JPA and stored in database (not my part of the job). And
a dataset will reference the correct structure type.
Then the creation of standard SQL query on dataset reading their
structure should be made using GUI similar to SQL Query Builder.

So I though of finding how to plug into the SQL Builder with my custom
model.
Thanks to the article on your blog, I understood the structure of an
enablement project, and starting with a copy of mysql enablement
projects and changing to custom name from Vendor up to Connection
Profile, I created my custom "ExtendedMySQL" driver to be able to manage
the DB catalog as I want.
For testing I simply changed the code in loadTables() and loadColumns()
method to push up static data to SQL Builder
(As I started from MySQL I'm not using overrideLoader in
org.eclipse.datatools.connectivity.sqm.core.Catalog extension point but
directly catalog)

From there I'm waiting for a decision of the architect on the project
to know if I should use JDBC connection and then create similar project
for each DB we should support (Oracle and Postgres), or generalize this
project to be only a facade to call JPA DAO that could be shared with
other part of the project (not yet created).

Sorry it's a little early for me to provide an example. But if I found
out interesting use of DTP SQL Tools from my investigation, I'll gladly
share it with the newsgroup.

Generally I would like to know if there is work in progress for
Navigating a JPA "Repository". Because I'm more interested in being able
to visualize my business object than fetching Database.
Also I think that it could be helpful to create complex JPQL query.

From how I understand it, having the same for JPA "Repository" as what
was done for Databases would need hard work on a "JPA Modelbase"
project, right ?

Also is there some reference on how SQLtools make use of Ecore models
for DBdefinitions to satisfy my curiosity.

Thanks,
Philippe






Brian Fitzpatrick wrote:
> I'd also be interested in getting some information about what kind of
> structure information you're reading from specific tables. Is this
> particular to your database? If so, could you come up with a generic
> example that I could use to play with?
>
> --Fitz
>
> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
> news:gbsmoo$tk5$1@build.eclipse.org...
>> I report some of my testing hoping to get help on the go.
>>
>> I would like to use the SQL Builder as it is to create SQL-like query,
>> however the database structure is not what I want to query against (in
>> fact I need to read structure description from specific tables so I though
>> executing Select statement to replace connection.getMetatData calls).
>>
>> So I though of creating a custom connection profile to override catalog
>> loading.
>> For testing I started with MySQL so,
>>
>> I tried to copy and change catalog code in datatools.enablement.mysql
>> plugins
>> and also to use a brand new plugin with profileExtension and
>> overrideLoader extension point property set.
>>
>> But it seems that my code for catalog loading is totally ignored by Data
>> Source Explorer and SQL Builder.
>>
>> Could someone points me to a good start with extending existing
>> connectionProfile.
>>
>> Thanks
>> Philippe
>>
>>
>>
>>
>> Philippe Weber wrote:
>>> Hi DTP newsgroup,
>>>
>>> I checked out from CVS the SQL Builder Dialog Example project
>>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>>
>>> I found it very promising but to fit my needs I should be able to filter
>>> out the tables available for building the query.
>>>
>>> I don't know if this could be done at the level of the SQLDomainModel
>>> object used by the dialog or if I should extends ODA JDBC driver to add
>>> specific filtering.
>>>
>>> Does anyone have already tried this or could give me a clue ?
>>>
>>> Thanks
>>> Philippe
>
>
Re: Filtering Tables in SQLBuilder Dialog Example [message #593409 is a reply to message #50592] Fri, 03 October 2008 14:57 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 495
Registered: July 2009
Senior Member
If you're looking at going at this from the JPA side of things, the JPA
tooling in WTP uses DTP. :)

You might pose your question on the eclipse.technology.dali newsgroup (which
is very active) to ask about JPA.

As for the SQL Editor/SQL Query Builder questions, I've asked one of the
guys working on the SQL Query Builder to chime in here, so hopefully he'll
have a chance to do so today.

It certainly sounds like an interesting project. :)

--Fitz

"Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
news:gc4u04$sap$1@build.eclipse.org...
> Hi Brian,
>
> To illustrate my usecase,
> I'm involved in prototyping the migration of a rather old app that used
> flat file data support to a a database support. The prototype is now based
> on Eclipse RCP.
>
> The application use the terms of dataset and dataset description
> So one file was used to describe dataset structure + pointer to file(s)
> containing the real data for a dataset.
> Then SQL-like query will be run on datasets data (Join , Order by...)
>
> In the new application general dataset structure type edition will be
> available using JPA and stored in database (not my part of the job). And a
> dataset will reference the correct structure type.
> Then the creation of standard SQL query on dataset reading their structure
> should be made using GUI similar to SQL Query Builder.
>
> So I though of finding how to plug into the SQL Builder with my custom
> model.
> Thanks to the article on your blog, I understood the structure of an
> enablement project, and starting with a copy of mysql enablement projects
> and changing to custom name from Vendor up to Connection Profile, I
> created my custom "ExtendedMySQL" driver to be able to manage the DB
> catalog as I want.
> For testing I simply changed the code in loadTables() and loadColumns()
> method to push up static data to SQL Builder
> (As I started from MySQL I'm not using overrideLoader in
> org.eclipse.datatools.connectivity.sqm.core.Catalog extension point but
> directly catalog)
>
> From there I'm waiting for a decision of the architect on the project to
> know if I should use JDBC connection and then create similar project for
> each DB we should support (Oracle and Postgres), or generalize this
> project to be only a facade to call JPA DAO that could be shared with
> other part of the project (not yet created).
>
> Sorry it's a little early for me to provide an example. But if I found out
> interesting use of DTP SQL Tools from my investigation, I'll gladly share
> it with the newsgroup.
>
> Generally I would like to know if there is work in progress for Navigating
> a JPA "Repository". Because I'm more interested in being able to visualize
> my business object than fetching Database.
> Also I think that it could be helpful to create complex JPQL query.
>
> From how I understand it, having the same for JPA "Repository" as what was
> done for Databases would need hard work on a "JPA Modelbase" project,
> right ?
>
> Also is there some reference on how SQLtools make use of Ecore models for
> DBdefinitions to satisfy my curiosity.
>
> Thanks,
> Philippe
>
>
>
>
>
>
> Brian Fitzpatrick wrote:
>> I'd also be interested in getting some information about what kind of
>> structure information you're reading from specific tables. Is this
>> particular to your database? If so, could you come up with a generic
>> example that I could use to play with?
>>
>> --Fitz
>>
>> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
>> news:gbsmoo$tk5$1@build.eclipse.org...
>>> I report some of my testing hoping to get help on the go.
>>>
>>> I would like to use the SQL Builder as it is to create SQL-like query,
>>> however the database structure is not what I want to query against (in
>>> fact I need to read structure description from specific tables so I
>>> though executing Select statement to replace connection.getMetatData
>>> calls).
>>>
>>> So I though of creating a custom connection profile to override catalog
>>> loading.
>>> For testing I started with MySQL so,
>>>
>>> I tried to copy and change catalog code in datatools.enablement.mysql
>>> plugins
>>> and also to use a brand new plugin with profileExtension and
>>> overrideLoader extension point property set.
>>>
>>> But it seems that my code for catalog loading is totally ignored by Data
>>> Source Explorer and SQL Builder.
>>>
>>> Could someone points me to a good start with extending existing
>>> connectionProfile.
>>>
>>> Thanks
>>> Philippe
>>>
>>>
>>>
>>>
>>> Philippe Weber wrote:
>>>> Hi DTP newsgroup,
>>>>
>>>> I checked out from CVS the SQL Builder Dialog Example project
>>>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>>>
>>>> I found it very promising but to fit my needs I should be able to
>>>> filter out the tables available for building the query.
>>>>
>>>> I don't know if this could be done at the level of the SQLDomainModel
>>>> object used by the dialog or if I should extends ODA JDBC driver to add
>>>> specific filtering.
>>>>
>>>> Does anyone have already tried this or could give me a clue ?
>>>>
>>>> Thanks
>>>> Philippe
>>
Re: Filtering Tables in SQLBuilder Dialog Example [message #593473 is a reply to message #50620] Wed, 08 October 2008 13:02 Go to previous message
Philippe Weber is currently offline Philippe WeberFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Brian,

I started another thread for discussing what I think could be done for
JPA/JPQL.

In the meanwhile, I have one more question on defining my custom sql
parser for my "phantom" db vendor. As I defined my own vendor, generic
parser is used and I need to customize it a little.
I found this extension-point :

org.eclipse.datatools.sqltools.parsers.sql.query.vendorExten sion

but it doesn't seem used anywhere. Could you please point me to the
correct way to extends SQL parser and maybe where to look to see it
implemented for another database.

Thanks
Philippe

Brian Fitzpatrick wrote:
> If you're looking at going at this from the JPA side of things, the JPA
> tooling in WTP uses DTP. :)
>
> You might pose your question on the eclipse.technology.dali newsgroup (which
> is very active) to ask about JPA.
>
> As for the SQL Editor/SQL Query Builder questions, I've asked one of the
> guys working on the SQL Query Builder to chime in here, so hopefully he'll
> have a chance to do so today.
>
> It certainly sounds like an interesting project. :)
>
> --Fitz
>
> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
> news:gc4u04$sap$1@build.eclipse.org...
>> Hi Brian,
>>
>> To illustrate my usecase,
>> I'm involved in prototyping the migration of a rather old app that used
>> flat file data support to a a database support. The prototype is now based
>> on Eclipse RCP.
>>
>> The application use the terms of dataset and dataset description
>> So one file was used to describe dataset structure + pointer to file(s)
>> containing the real data for a dataset.
>> Then SQL-like query will be run on datasets data (Join , Order by...)
>>
>> In the new application general dataset structure type edition will be
>> available using JPA and stored in database (not my part of the job). And a
>> dataset will reference the correct structure type.
>> Then the creation of standard SQL query on dataset reading their structure
>> should be made using GUI similar to SQL Query Builder.
>>
>> So I though of finding how to plug into the SQL Builder with my custom
>> model.
>> Thanks to the article on your blog, I understood the structure of an
>> enablement project, and starting with a copy of mysql enablement projects
>> and changing to custom name from Vendor up to Connection Profile, I
>> created my custom "ExtendedMySQL" driver to be able to manage the DB
>> catalog as I want.
>> For testing I simply changed the code in loadTables() and loadColumns()
>> method to push up static data to SQL Builder
>> (As I started from MySQL I'm not using overrideLoader in
>> org.eclipse.datatools.connectivity.sqm.core.Catalog extension point but
>> directly catalog)
>>
>> From there I'm waiting for a decision of the architect on the project to
>> know if I should use JDBC connection and then create similar project for
>> each DB we should support (Oracle and Postgres), or generalize this
>> project to be only a facade to call JPA DAO that could be shared with
>> other part of the project (not yet created).
>>
>> Sorry it's a little early for me to provide an example. But if I found out
>> interesting use of DTP SQL Tools from my investigation, I'll gladly share
>> it with the newsgroup.
>>
>> Generally I would like to know if there is work in progress for Navigating
>> a JPA "Repository". Because I'm more interested in being able to visualize
>> my business object than fetching Database.
>> Also I think that it could be helpful to create complex JPQL query.
>>
>> From how I understand it, having the same for JPA "Repository" as what was
>> done for Databases would need hard work on a "JPA Modelbase" project,
>> right ?
>>
>> Also is there some reference on how SQLtools make use of Ecore models for
>> DBdefinitions to satisfy my curiosity.
>>
>> Thanks,
>> Philippe
>>
>>
>>
>>
>>
>>
>> Brian Fitzpatrick wrote:
>>> I'd also be interested in getting some information about what kind of
>>> structure information you're reading from specific tables. Is this
>>> particular to your database? If so, could you come up with a generic
>>> example that I could use to play with?
>>>
>>> --Fitz
>>>
>>> "Philippe Weber" <philippeweber57@yahoo.fr> wrote in message
>>> news:gbsmoo$tk5$1@build.eclipse.org...
>>>> I report some of my testing hoping to get help on the go.
>>>>
>>>> I would like to use the SQL Builder as it is to create SQL-like query,
>>>> however the database structure is not what I want to query against (in
>>>> fact I need to read structure description from specific tables so I
>>>> though executing Select statement to replace connection.getMetatData
>>>> calls).
>>>>
>>>> So I though of creating a custom connection profile to override catalog
>>>> loading.
>>>> For testing I started with MySQL so,
>>>>
>>>> I tried to copy and change catalog code in datatools.enablement.mysql
>>>> plugins
>>>> and also to use a brand new plugin with profileExtension and
>>>> overrideLoader extension point property set.
>>>>
>>>> But it seems that my code for catalog loading is totally ignored by Data
>>>> Source Explorer and SQL Builder.
>>>>
>>>> Could someone points me to a good start with extending existing
>>>> connectionProfile.
>>>>
>>>> Thanks
>>>> Philippe
>>>>
>>>>
>>>>
>>>>
>>>> Philippe Weber wrote:
>>>>> Hi DTP newsgroup,
>>>>>
>>>>> I checked out from CVS the SQL Builder Dialog Example project
>>>>> org.eclipse.datatools.sqltools.sqlbuilder.examples
>>>>>
>>>>> I found it very promising but to fit my needs I should be able to
>>>>> filter out the tables available for building the query.
>>>>>
>>>>> I don't know if this could be done at the level of the SQLDomainModel
>>>>> object used by the dialog or if I should extends ODA JDBC driver to add
>>>>> specific filtering.
>>>>>
>>>>> Does anyone have already tried this or could give me a clue ?
>>>>>
>>>>> Thanks
>>>>> Philippe
>
Re: Filtering Tables in SQLBuilder Dialog Example [message #593505 is a reply to message #50592] Tue, 14 October 2008 22:06 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Philippe,

You'd mentioned ODA earlier in the thread. If you are interested in
exploring from the angle of JPA and JPQL query, you might want to take a
look at the ODA JPA data source project:
http://wiki.eclipse.org/About_:_BIRT_JPA_or_JDO_Connector

Linda
Previous Topic:Is org.eclipse.datatools.sqltools.parsers.sql.query.vendorExtension used ?
Next Topic:How to add team support to a custom ViewPart
Goto Forum:
  


Current Time: Thu Nov 27 04:33:12 GMT 2014

Powered by FUDForum. Page generated in 0.04169 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software