Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 01:26 AM
Thanks for responding @Suteja Kanuri. in the example you provided the 2nd block has javascript code. I couldn't figure out how to use var in python cell.
Im getting invalid syntax error since var isnt expected keyword for python cell.
So i assumed, the second block is python code and changed it accordingly.
arg1 = "Hello";
arg2 = "World";
pythonCode = """
def my_python_function(arg1, arg2):
result = "{}" + "{}"
return result.format(arg1, arg2)
""".format(arg1, arg2);
result = dbutils.notebook.run(
"/Users/<user-id>/<notebook-name>",
0,
{pythonCode: pythonCode}
);
displayHTML(result);
Could you please tell how to proceed further?