Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get App Name using spark.app.name #653

Closed
uday1409 opened this issue Apr 17, 2023 · 2 comments · Fixed by #673
Closed

get App Name using spark.app.name #653

uday1409 opened this issue Apr 17, 2023 · 2 comments · Fixed by #673

Comments

@uday1409
Copy link
Contributor

uday1409 commented Apr 17, 2023

In databricks, a new SparkContext cannot be created. The spark application name extracted in harvester is done using sparkcontext (ctx.session.sparkContext.appName). With this approach, in Databricks, its always "Databricks Shell". This is limiting us to extract and persist the lineage if two different plans are extracted for same destination( file/table). We are using output of spline agent and have written a parser on top of it to store the lineage.

Instead of relying on ctx.session.sparkContext.appName, can you please make a change to extract Application Name using spark.conf.get("spark.app.name") which should work both for OpenSource as well as databricks spark , considering sparkContext is also bit of legacy the way properties are set now ?

image

Is there any other way to extract valid spark app Name or add additional config to the plan with codeless init if above proposed method does not work?

@wajda wajda added this to the 1.1.1 milestone Apr 17, 2023
@wajda wajda added the bug Something isn't working label Apr 17, 2023
@cerveada cerveada self-assigned this Apr 17, 2023
@freds72
Copy link

freds72 commented Apr 17, 2023

upvoted

@wajda wajda changed the title get App Name using spark.app.name get App Name using spark.app.name Apr 18, 2023
@wajda wajda modified the milestones: 1.1.1, 1.2.0 May 11, 2023
@wajda wajda added enhancement dependency: Databricks and removed bug Something isn't working labels May 11, 2023
@wajda
Copy link
Contributor

wajda commented May 12, 2023

thanks for contribution @uday1409

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants