From 644b43d25129ac7c9575697dd3cb180054da9aa8 Mon Sep 17 00:00:00 2001 From: Mahdi Rahbar <30546576+MahdiRahbar@users.noreply.github.com> Date: Tue, 14 May 2024 11:35:33 -0500 Subject: [PATCH] Update files.py - returning response values Signed-off-by: Mahdi Rahbar <30546576+MahdiRahbar@users.noreply.github.com> --- databricks/sdk/service/files.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/databricks/sdk/service/files.py b/databricks/sdk/service/files.py index 255e1c1a0..cc7f17a5f 100755 --- a/databricks/sdk/service/files.py +++ b/databricks/sdk/service/files.py @@ -965,8 +965,10 @@ def upload(self, file_path: str, contents: BinaryIO, *, overwrite: Optional[bool if overwrite is not None: query['overwrite'] = overwrite headers = {'Content-Type': 'application/octet-stream', } - self._api.do('PUT', + res = self._api.do('PUT', f'/api/2.0/fs/files{_escape_multi_segment_path_parameter(file_path)}', query=query, headers=headers, data=contents) + + return GetMetadataResponse.from_dict(res)