4 Replies Latest reply on Sep 4, 2017 3:28 PM by 3526958

    Cannot Create RDF View in R2RML Conversion Example

    3526958

      Hi All,

       

      In a project I want to do a R2RML conversion. I folowed below steps according to 12c Release 2 tutorial.

       

      1. Create a stage table with below command.

       

      CREATE TABLE stage_table_name(  
                           RDF$STC_sub varchar2(4000) not null,  
                           RDF$STC_pred varchar2(4000) not null,  
                           RDF$STC_obj varchar2(4000) not null,  
                           RDF$STC_graph varchar2(4000)  
      );
      

       

      2. Grant select and insert this stage table for user MDSYS

       

      GRANT SELECT, INSERT ON STAGETAB TO MDSYS;  
      

       

      3. Load r2rml mapping to this stage table with running below java code.

       

      Oracle oracle = new Oracle (connectionUrl, user, password);         
      GraphOracleSem graph = new GraphOracleSem(oracle, modelName);  
      FileInputStream is = new FileInputStream(mappingFile);   
      graph.getBulkUpdateHandler().prepareBulk(is,//inputstream  
            "http://example.com", // base URI  
            "TTL", // data file type: can be RDF/XML, N-TRIPLE, etc.  
            "rdf_users", // tablespace  
            null, // flags  
            null, // listener  
            stageTableName// staging table name.  
            );  
      graph.close();  
      oracle.dispose();  
      

      4. Check Stage Table;

      By sqlplus, can check loaded perfect.

       

      5. Create RDF View with this stage table to execute below command.

       

      BEGIN  
      sem_apis.create_rdfview_model(  
      model_name => 'rdf_view_name',  
      tables => NULL,  
      r2rml_table_owner => 'user',  
      r2rml_table_name => 'stage_table_name'  
      );  
      END;  
      

       

      I performed first 4 steps successfully. Stage table has been created and r2rml mapping has been loaded to this stage table. But in the last step there is an error like this;

      [Error] at line 1:

      ORA-00942: table or view does not exist

      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL",  line 19205

      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL",  line 18798

      ORA-06512: at "MDSYS.SDO_RDF",  line 5926

      ORA-06512: at "MDSYS.RDF_APIS",  line 1372

      ORA-06512: at line1

      How can I solve this problem?

       

      Thanks