You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by padmacs <gi...@git.apache.org> on 2018/07/20 12:54:30 UTC

[GitHub] zeppelin pull request #3087: [ZEPPELIN-3644]: Adding SPARQL query language s...

GitHub user padmacs opened a pull request:

    https://github.com/apache/zeppelin/pull/3087

    [ZEPPELIN-3644]: Adding SPARQL query language support to the editor.

    ### What is this PR for?
    * Adding SPARQL query language support to zeppelin notebook editor
    
    ### What type of PR is it?
    * [Feature]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-3644
    
    ### How should this be tested?
    * First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
    * Strongly recommended: add automated unit tests for any new or changed behavior
    * Outline any manual steps to test the PR here.
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? Yes


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cambridge-semantics/zeppelin sparql-lang

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/3087.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3087
    
----
commit 0214f54c73974da0814a6edd09d57dfcf579da75
Author: Padmashree <pa...@...>
Date:   2018-07-20T12:33:18Z

    ZEPPELIN-3644:Adding SPARQL query language support to the editor.

----


---

[GitHub] zeppelin issue #3087: [ZEPPELIN-3644]: Adding SPARQL query language support ...

Posted by padmacs <gi...@git.apache.org>.
Github user padmacs commented on the issue:

    https://github.com/apache/zeppelin/pull/3087
  
    @felixcheung Yes. This PR will just make the support available for highlighting the SPARQL query syntax, so that any interpreter can use it as language of choice. The interpreter development is still in progress and  is bit specific to the SPARQL server implementation that we have, hence we are working on it to make it more generic so can be used for any SPARQL endpoint. 


---

[GitHub] zeppelin issue #3087: [ZEPPELIN-3644]: Adding SPARQL query language support ...

Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/3087
  
    this is just for syntax highlighting, there is no interpreter code here.
    also even for syntax the ACE editor should be set with the language of choice - this PR does not have either of those.


---

[GitHub] zeppelin issue #3087: [ZEPPELIN-3644]: Adding SPARQL query language support ...

Posted by padmacs <gi...@git.apache.org>.
Github user padmacs commented on the issue:

    https://github.com/apache/zeppelin/pull/3087
  
    @zjffdu  Actually we are working on an interpreter that submits SPARQL query to our system through GRPC calls currently. But we can work with community to make to more generalized, so that queries can be executed against any of the SPARQL Endpoints.
    
    This PR is specifically about getting an SPARQL query language support into Zeppelin-web module. So that the Notebook editor identifies and displays the SPARQL query with proper color codes for syntax and keywords.


---

[GitHub] zeppelin issue #3087: [ZEPPELIN-3644]: Adding SPARQL query language support ...

Posted by padmacs <gi...@git.apache.org>.
Github user padmacs commented on the issue:

    https://github.com/apache/zeppelin/pull/3087
  
    @felixcheung Can you elaborate on which type of hook up you mean?


---

[GitHub] zeppelin issue #3087: [ZEPPELIN-3644]: Adding SPARQL query language support ...

Posted by NicolasRouquette <gi...@git.apache.org>.
Github user NicolasRouquette commented on the issue:

    https://github.com/apache/zeppelin/pull/3087
  
    FYI: It is possible to use the R SPARQL package:
    
    https://cran.r-project.org/web/packages/SPARQL/index.html
    
    For example, here's the web interface to ACM's SPARQL endpoint:
    http://acm.rkbexplorer.com/sparql/
    
    With Zeppelin, we can do the same thing with two paragraphs:
    
    ```
    %spark.r
    library(SPARQL)
    
    endpoint <- "http://acm.rkbexplorer.com/sparql/"
     
    query <-
    '
    PREFIX id:   <http://acm.rkbexplorer.com/id/>
    PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX akt:  <http://www.aktors.org/ontology/portal#>
    PREFIX owl:  <http://www.w3.org/2002/07/owl#>
    PREFIX akt:  <http://www.aktors.org/ontology/portal#>
    PREFIX akts: <http://www.aktors.org/ontology/support#>
    
    SELECT * WHERE { ?s rdfs:label ?o }
    LIMIT 10
    '
    
    qd <- SPARQL(endpoint,query)
    r <- qd$results
    df <- as.DataFrame(r)
    registerTempTable(df, "ACM")
    ```
    
    and:
    
    ```
    %sql
    select * from ACM
    ```
    
    Obviously, this solution lacks SPARQL-language specific syntax highlighting or completion;
    however, it is very convenient for executing SPARQL queries.


---

[GitHub] zeppelin issue #3087: [ZEPPELIN-3644]: Adding SPARQL query language support ...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/3087
  
    @padmacs Can you describe more details about this PR ? What features does this PR provide ? Screenshot will be helpful. 


---