Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2024 07:39 PM
@Avinash_Narala @renancy Check out the databricks sdk documentation on `databricks.sdk.WorkspaceClient.workspace`: https://databricks-sdk-py.readthedocs.io/en/latest/workspace/workspace/workspace.html
Something like the following may be helpful:
w.workspace.import_(
path="<path to file>",
format=workspace.ImportFormat.SOURCE,
content=base64.b64encode(f.read()).decode()
)