Scala File-1
Object CDM_main{
def main(args:Array[String]){
var res=0
var test ="true"
val othTheard=new Theard{
override def run(): Unit={
res=cli_CDM.cdm_prd(test)
}
}
}
}
Scala File-2
Object cli_CDM extends Theard{
def cdm_prd(test:String){
return 0
}
}
Here I have created a two scala file in the first file I have created a Thread named "othTheard" in that, I am calling a cdm_prd method which is file 2, and returning back to CDM_main.
How can I implement the above scenario in Azure Databricks? I have tried using two different notebooks for different scala files.
Is there any way to implement the above scenario?
CodePudding user response:
I was able to call method in python notebook. Library Libify makes it easy to import notebooks in Databricks. Notebook imports can also be nested to create complex workflows easily.
Function from this notebook is going to be imported.
In below given screenshot, function is imported.
Refer - https://pypi.org/project/libify/


