Conversation
|
|
||
| DROP TABLE statements; | ||
| CREATE TABLE statements (stanza TEXT,subject TEXT,predicate TEXT,object TEXT,value TEXT,datatype TEXT,language TEXT); | ||
| CREATE TABLE statements ( |
There was a problem hiding this comment.
formatting this like the other declarations
| s1.datatype AS value | ||
| FROM statements AS s1, statements AS s2 ON (s1.predicate=s2.predicate) | ||
| FROM statements AS s1 | ||
| JOIN statements AS s2 ON (s1.predicate=s2.predicate) |
There was a problem hiding this comment.
MySQL doesn't understand , for JOINs so making it explicit
| -- patch statements table | ||
| ALTER TABLE statements ADD COLUMN graph TEXT; |
There was a problem hiding this comment.
This currently gets added in the build.Makefile. Is there a reason for not adding it to the schema?
There was a problem hiding this comment.
We wanted to avoid it going into the SQL models, because that would cause errors on older sqlite builds when using that version of semsql (e.g. in OAK). This has been out for some time so we should just put it into the schema for the next release in the minor series
There was a problem hiding this comment.
I remembered the reason. rdftab is hardwired for fewer columns, so this has to be done as postprocessing for now.
|
I'll merge this but it will get overridden next generation time, here is the upstream culprit: |
|
|
||
| DROP TABLE owl_axiom; | ||
| CREATE VIEW owl_axiom AS SELECT * FROM owl_reified_axiom UNION SELECT NULL AS id, * FROM statements; | ||
| CREATE VIEW owl_axiom AS SELECT * FROM owl_reified_axiom UNION SELECT NULL AS id, statements.* FROM statements; |
There was a problem hiding this comment.
semantic-sql/src/semsql/linkml/owl.yaml
Line 222 in 75988a3
KBase is currently using the semsql schema with a MySQL database and is likely to use it with other SQL db types in the future. This PR alters a couple of lines to use more generic syntax.
Not sure whether I need to propagate these changes to the various other SQL files and the linkml schema.
Turn off whitespace changes - I didn't realise there were so many trailing spaces in the original file!