Skip to content

Commit 504d9d4

Browse files
authored
add option to pass specific datasources (#1150)
* add option to pass specific datasources * mypy no-implicit-optional
1 parent 0bb9dd5 commit 504d9d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tableauserverclient/server/endpoint/workbooks_endpoint.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ def create_extract(
117117

118118
# delete all the extracts on 1 workbook
119119
@api(version="3.3")
120-
def delete_extract(self, workbook_item: WorkbookItem, includeAll: bool = True) -> None:
120+
def delete_extract(self, workbook_item: WorkbookItem, includeAll: bool = True, datasources=None) -> JobItem:
121121
id_ = getattr(workbook_item, "id", workbook_item)
122122
url = "{0}/{1}/deleteExtract".format(self.baseurl, id_)
123-
datasource_req = RequestFactory.Workbook.embedded_extract_req(includeAll, None)
123+
datasource_req = RequestFactory.Workbook.embedded_extract_req(includeAll, datasources)
124124
server_response = self.post_request(url, datasource_req)
125125
new_job = JobItem.from_response(server_response.content, self.parent_srv.namespace)[0]
126+
return new_job
126127

127128
# Delete 1 workbook by id
128129
@api(version="2.0")

0 commit comments

Comments
 (0)