You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by Remilito <gi...@git.apache.org> on 2017/03/06 09:09:04 UTC

[GitHub] zeppelin pull request #2099: [ZEPPELIN-2106] providing paragraph config in c...

GitHub user Remilito opened a pull request:

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

    [ZEPPELIN-2106] providing paragraph config in create note/paragraph rest call

    ### What is this PR for?
    * Allow to provide graph info, colWidth, showTitle or even full paragraph config
    directly in the Create Paragraph and Create Note endpoint.
    * Save calls to [noteId]/paragraph/[paragraphId]/config
    * Updated doc.
    
    
    ### What type of PR is it?
    Improvement
    
    ### Todos
    
    ### What is the Jira issue?
    [ZEPPELIN-2106](https://issues.apache.org/jira/browse/ZEPPELIN-2106)
    
    ### How should this be tested?
    Outline the steps to test the PR here.
    
    1. Clone the first paragraph of 'Zeppelin Tutorial/Basic Features (Spark)' to get the bank data loaded in a new note.
    2.  curl -X POST -d @testAPI1.json http://localhost:8080/api/notebook/$YOURNOTEID/paragraph
    3.  curl -X POST -d @testAPI2.json http://localhost:8080/api/notebook/$YOURNOTEID/paragraph
    4. When running the paragraphes, the graphs will show up with the appropriate settings.
    
    testAPI1.json:
    `{
            "title":"Example providing Graph",
            "text":"%sql\nselect age, marital, count(1) cvalue from bank group by age, marital order by age",
            "showTitle":true,
            "colWidth":9.0,
            "graph": {
                    "mode": "pieChart",
                    "keys": [
                            {
                                    "name": "age",
                                    "index": 0.0,
                                    "aggr": "sum"
                            }
                    ],
                    "groups": [
                            {
                                    "name": "marital",
                                    "index": 1.0,
                                    "aggr": "sum"
                            }
                    ],
                    "values": [
                            {
                                    "name": "cvalue",
                                    "index": 2.0,
                                    "aggr": "sum"
                            }
                    ]
            }
    }
    `
    testAPI2.json:
    `{
            "title":"Example providing config",
            "text":"%sql\nselect age, marital, count(1) cvalue from bank group by age, marital order by age",
            "config": {
              "title":true,
              "colWidth":6.0,
              "results": [
                      {
                              "graph": {
                                      "mode": "scatterChart",
                                      "optionOpen": true
                              }
                      }
              ]
            },
            "colWidth":9.0
    }
    `
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No


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

    $ git pull https://github.com/Remilito/zeppelin ZEPPELIN-2106b

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

    https://github.com/apache/zeppelin/pull/2099.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 #2099
    
----
commit 76af44ab6c6b3edfd26bc1ffecd2db76d531dbbb
Author: Remilito <re...@gmail.com>
Date:   2017-03-03T17:23:56Z

    [ZEPPELIN-2106] providing paragraph config in create
    note/paragraph call
    * Allow to describe graph, colWidth, showTitle or full paragraph config
    directly in the Create Paragraph and Create Note endpoint.
    * Updated doc.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #2099: [ZEPPELIN-2106] providing paragraph config in c...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2099: [ZEPPELIN-2106] providing paragraph config in create n...

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

    https://github.com/apache/zeppelin/pull/2099
  
    @Leemoonsoo : the most common usages would be to set visual paramaters, i.e. graph options, paragraph width and paragraph title show, so the idea was to provide a more direct way to configure those rather than having to provide the whole config:{results:[{} .... to do so. Anyway, this is open to discussions


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2099: [ZEPPELIN-2106] providing paragraph config in create n...

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

    https://github.com/apache/zeppelin/pull/2099
  
    @Leemoonsoo thanks for the feedback, I think we should keep only B. I'll update the PR in a couple of days. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2099: [ZEPPELIN-2106] providing paragraph config in create n...

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

    https://github.com/apache/zeppelin/pull/2099
  
    Thanks @Remilito for the contribution!
    
    Could you elaborate why do you support two different forms of message?
    
    ```
        {
          ...
          "graph": {
            "mode": "pieChart"
          }
        }
    ```
    
    and
    ```
        {
          ...
          "config": {
            ...
            "results": [
              {
                "graph": {
                  "mode": "scatterChart",
                  "optionOpen": true
                }
              }
            ]
          }
        }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2099: [ZEPPELIN-2106] providing paragraph config in create n...

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

    https://github.com/apache/zeppelin/pull/2099
  
    @Leemoonsoo : updated!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2099: [ZEPPELIN-2106] providing paragraph config in create n...

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

    https://github.com/apache/zeppelin/pull/2099
  
    @Remilito Thanks for great work!
    
    LGTM and merge to master if no further discussions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2099: [ZEPPELIN-2106] providing paragraph config in create n...

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

    https://github.com/apache/zeppelin/pull/2099
  
    @Remilito Thanks for explain. 
    
    Let's say `graph: {mode: {...}}` is api A, and `config: {results: [{graph: mode: {...}}]}` is api B.
    
    When user use api A with multiple results, it can be ambiguous that config will be applied to which particular result. I think this should be defined and documented. Also it'll be better documentation explain what is difference between api A and api B.
    
    Alternative is just supporting api B, which i think superset of api A.
    
    @Remilito Which do you prefer?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---