oeg-upm / morph-rdb

Virtual Knowledge Graph Creation from RDB with R2RML
https://morph.oeg.fi.upm.es/tool/morph-rdb
Other
42 stars 38 forks source link

Bad sql when column name is "id" #28

Open ZuoMatthew opened 8 years ago

ZuoMatthew commented 8 years ago

Hi, I tried morph-rdb and it was great until my column name is "id". When a column name is "id" in postgresql, the generated sql as below assigns a alias table prifix (like v_2063 )to this column without adding this alias to the table: SELECT v_2063."id" AS "x",'http://www.my.org/data#hasValue'::text AS "uri_hasValue350741132",v_2063."kpivalue" AS "y",31078738::integer AS "mappingid_x",31771827::integer AS "mappingid_y" FROM "public"."kpi71" WHERE "kpivalue" IS NOT NULL then database will failed to execute the sql, is this a bug?

fpriyatna commented 8 years ago

hi ZuoMatthew,

Thanks for your interest on using morph-RDB. There should not be a problem using a column name "id". Would you please send me the mapping document so that I can investigate this issue.

Regards Freddy

ZuoMatthew commented 8 years ago

Hi Freddy, I attached two files in the zip and the ttl file is generated by exporting ontop's mapping OBDA. Once I change the {id} to {kpi} or other terms, morph-RDB works correctly.

ODBA.txt R2RML.txt

dachafra commented 4 years ago

@jatoledo could you take a look to this issue?