Replace Extract in Packaged Workbook
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with tableaudocumentapi.Workbook and its save_as method, then compare the existing .twb XML reference replacement with the packaging behavior of .twbx files. Investigate how the connection's .tde extract is represented in a packaged workbook. Done means replacing the extract while preserving the table definition and producing a self-contained new_workbook.twbx.
Written by the indexing model from the issue text.
Description
I'm trying to figure out how to replace an extract in a packaged workbook with a different extract that has the same table definition. I can use the Tableau SDK to create a new .tde, but it looks like there aren't python methods to replace an extract in a packaged workbook.
I'm imagining this would look something like this:
from tableaudocumentapi import Workbook
sourceWB = Workbook('workbook.twbx')
sourceWB.datasources[0].connections[0].extract = "MY-NEW-EXTRACT.tde"
#OR sourceWB.datasources[0].connections[0].extract.package('new-extract.tde')
sourceWB.save_as('new_workbook.twbx')
I can replace an extract in a .twb file by hacking the xml and changing references, but the "save_as" method doesn't actually package the workbook so that the connection is no longer dependent on a .tde file.
- Dominant language
- Python
- Stars
- 363
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tableau/document-api-python
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
tableau/document-api-python#270 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
tableau/document-api-python#260 ·
-
docs
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
tableau/document-api-python#258 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
tableau/document-api-python#251 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
tableau/document-api-python#250 · 2 comments ·
All issues in tableau/document-api-python
Similar issues
-
link-check link-check:sphinx-theme
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OpenHands/extensions#626 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
CSCfi/sd-search-api#39 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100