mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: GenericJDBCDataModel problem (getItems, getUsers)
Date Wed, 04 Nov 2009 17:27:53 GMT
If you are using some SPARQL-in-SQL system then you must be customizing a
lot, at least the SQL queries. It is hard to help since all that is not
project code.

Are you so sure the queries being executed work? Have you looked at log
output? What code version? No there should be no hidden exceptions - but
some are logged not thrown where not possible.

I would just debug, that will show the issue quickly.

On Nov 4, 2009 5:04 PM, "Mirko" <idonthaveenoughinformation@googlemail.com>
wrote:

Hi,
I have problems with the GenericJDBCDataModel. For me, the functions
getUsers() and getItems() return nothing, although the SQL queries used in
the functions definitely do return results. All other functions in the
DataModel work as expected.

The results of the queries used in getUsers() and getItems() look as
follows:

SQL result for GenericJDBCDataModel.GET_ITEMS_SQL_KEY:

item_id
------------
itemID_A
itemID_B
itemID_C
itemID_D
itemID_E
...

SQL result for GenericJDBCDataModel.GET_USERS_SQL_KEY

item_id         callret-1               user_id
----------------------------------------------
itemID_A        1               userID_X
itemID_B        1               userID_Y
itemID_C        1               userID_Z
...

I think these results should be correct (Preferences are always 1 in my
data). But the Iterables returned by both functions seem to be empty:

GenericJDBCDataModel dm = new GenericJDBCDataModel(props);
for ( Item item : dm.getItems()){
       System.out.println(item.getID()); //Never reached
}
for ( User user : dm.getUsers()){
       System.out.println(user.getID()); //Never reached
}


I should note that I query an OpenLink Virtuoso RDF store, which uses SPARQL
queries enclosed in SQL queries. That means that  'columns' and 'tables' ,
and thus the variables DEFAULT_PREFERENCE_TABLE, DEFAULT_USER_ID_COLUMN,
DEFAULT_ITEM_ID_COLUMN and DEFAULT_PREFERENCE_COLUMN of
AbstractJDBCDataModel don't have any meaning. But as I understand the code,
they are not required when using the GenericJDBCDataModel.

Is it possible that some exception is thrown 'silently' in the
AbstractJDBCDataModel?

I have no idea where to look for the prob, so thanks for any hints....

Regards,
Mirko

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message