Inserting data into a graph using sparql is creating a combination of the column values

77 Views Asked by At

So I'm creating a graphmart in Anzo. Inserting data into a SPARQL graph is causing the columns of the dataset to create combinations.
Say if I have data from a SQL database and the columns are

ID File_Name File_Path
sameID name1 pathA
sameID name2 pathB

If I insert the data into graph and query this data I get

ID File_Name File_Path
sameID name1 pathA
sameID name1 pathB
sameID name2 pathA
sameID name2 pathB
PREFIX example: <example.com>
    
    INSERT {
    GRAPH $(targetGraph){
        ?instance a example:some_class
            example:p_file_name ? FILE_NAME;
            example:p_file_path ? FILE_PATH.
    }
}
$(usingSources)
WHERE {
    SERVICE <some URL>
    {
       #some code to query SQL database
       ?ID <http://www.w3.org/2001/XMLSchema#string> ;.
    }
    

BIND(URI(CONCAT("example.com#"), encode_for_URI(?ID)) as ?instance)
}

This is all in Anzo.
Could it be due to how the data model is defined?

Using the query builder, the data I get from the source and the data I get after the insert is different. With the data after the insert being a combination of the original data

0

There are 0 best solutions below