作者:zhang时代小窝 | 来源:互联网 | 2024-12-23 13:32
ThispullrequestintroducestheabilitytoprovidecomprehensiveparagraphconfigurationsdirectlywithintheCreateNoteandCreateParagraphRESTendpoints,reducingtheneedforadditionalconfigurationcalls.
Purpose of this PR
- Enable direct inclusion of full paragraph configurations during the creation of notes and paragraphs via the REST API.
- This enhancement minimizes the necessity for separate configuration calls to [noteId]/paragraph/[paragraphId]/config, streamlining the setup process.
- The documentation has been updated to reflect these changes.
Type of PR
Improvement
Todos
- Ensure all tests pass with the new configuration parameters.
- Update any related documentation as necessary.
Jira Issue
ZEPPELIN-2106
Testing Instructions
To validate this PR, follow these steps:
- Clone the first paragraph from 'Zeppelin Tutorial/Basic Features (Spark)' to load bank data into a new note.
- Use the following cURL command to create a new paragraph:
curl -X POST -d @testAPI.json http://localhost:8080/api/notebook/$YOURNOTEID/paragraph
- Run the newly created paragraph to ensure that the graphs display correctly with the specified settings.
Example JSON payload for testing (testAPI.json):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | { "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:
- Do the license files need updating? No
- Are there breaking changes for older versions? No
- Does this require additional documentation? No
Thanks for your contributions!
LGTM and merge to master if no further discussions.