Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2025 11:53 AM
I think the solution is in .addArtifact if I read this:
But have not gotten it to work just yet.
```
spark = DatabricksSession.builder.getOrCreate()
venv_pack.pack(output='pyspark_venv.tar.gz')
spark.addArtifact(
"pyspark_venv.tar.gz#environment",
archive=True)
spark.conf.set(
"spark.sql.execution.pyspark.python", "environment/bin/python")
spark.addArtifact("minimal_example_1/module/udf.py", pyfile=True)
```