I wonder which version of D2RQ is actually used in topbraid. There are
several versions around:

- Version 0.7 on sourceforge, which has not been updated since August
2009 (http://sourceforge.net/projects/d2rq-map/files/)
- The github version, which is actively maintained by Richard Cyganiak
and a few others: https://github.com/d2rq/d2rq. I hope that this
version is used by TopBraid since it contains many changes since
version 0.7 (see commit history here: 
https://github.com/d2rq/d2rq/commits/master)

I created a fork myself and just added two new command line options to
D2RQ: "-i" and "-e" that allow you to specify "include and exclude
patterns", regular expressions that can be used to filter the tables
while D2RQ is generating the mapping file. We had a 30000+ table
database where we "only" needed to generate a mapping for 300 tables,
so this feature was rather necessary. Here's the code:
https://github.com/jgeluk/d2rq/tree/feature_ignore_tables.

On Jan 11, 10:52 am, Scott Henninger <[email protected]>
wrote:
> Tim; This is something we've seen before.  The overall issue is that the D2RQ 
> wizard in TBC will read the entire schema when creating the mapping.  But not 
> everything in the relational model can be mapped correctly.  It's also common 
> that only a few table mappings are needed for the mapping.
> This overall issue will be addressed in a revamped D2RQ wizard that allows 
> the user to choose the table mappings you want.  This will be available in a 
> beta release in the next few weeks.
> In the meantime, there are a couple of ways you can remove unwanted 
> mappings.  One is to edit the -mapping file.  It's in RDF and you can open it 
> directly in Composer.  The class and property mappings are found in the 
> subclasses of d2rq:ResourceMap.  Classes correspond to tables and are mapped 
> via the d2rq:class property of a d2rq:ClassMap instance.  Property maps are 
> instances of d2rq:PropertyBridge and mapped to the relational table through 
> the d2rq:column (for columns) or d2rq:join (for foreign key relationships).  
> To see the effects of an edit, save your changes and close/open the DataView 
> file.
> Another way to do this is to use the attached service.  Copy the file into 
> your workspace and run Scripts > Refresh/Display SPARQLMotion functions... 
> Once that is done, the menu choice 'Resource > Get mappings for table column' 
> will appear.  The script takes a previous mapping (specifically the schema 
> and mapping files) and converts to a new set of mappings, retaining the old 
> one.  This way you can create a mapping with a dump of the entire schema then 
> build multiple mappings based on that.
> To fill in the wizard, you need the base URI for the mapping and schema files 
> from a previously executed D2RQ wizard.  Specify the new URIs for the four 
> files generated by the D2RQ wizard and the names of the tables you want to 
> include in the mapping.  The four files are created and you can view the data 
> in Composer using the file generated for the Target Database.
> Give those a try and let us know if that addresses the problems you are 
> having.
> -- Scott
> On 1/9/12 3:22 PM, Tim Smith wrote:Hi,
> This may be more of D2RQ issue that TBC so I apologize in advance if that is 
> the case.
> I've managed to connect to my database, create the mapping files, delete the 
> references to Blobs and indices, etc...
> I can open the DataView file and see instances in the Instance view for the 
> various classes.  However, when I try to view the instances, a D2RQ exception 
> is thrown that essentially displays an Oracle SQL error.
> In short, the query generated by D2RQ is not valid:
>  de.fuberlin.wiwiss.d2rq.D2RQException: ORA-01722: invalid number
> : SELECT 1 FROM "ATTRIBUTE" WHERE "ATTRIBUTE"."ATTRIBUTE_ID" = '_TYPE10' (E0)
> Of course this query will always return a value of "1" so I do not know what 
> D2RQ is attempting to do.  Regardless, this query is invalid since 
> Attribute.Attribute_ID is a number column - not a character.  The schema file 
> correctly indicates a range of xsd:decimal for this column.
> Has anyone seen this type of behavior from D2RQ before?
> Thanks,
> Tim
> --
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email [email protected]
> To unsubscribe from this group, send email 
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/topbraid-users?hl=en
>
>  ChooseTableMappings.sms.ttl
> 20KViewDownload

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to