Change database table in a workbook
还没有人认领这个 Issue。
评估
调研方向
Start with the sample code that updates datasource connection fields, then inspect how connections and their tables are represented in the Python library. Trace the existing datasource and connection handling before determining where table names can be exposed for editing. Done means table names can be iterated and changed, including for multiple tables, without changing joins.
由索引模型根据 Issue 内容生成。
描述
I've run the sample code to change the database in a workbook. I can change the Server name, the Database name, the User name, and the Port, but there does not seem to be any way to change the database table. This is what I can do.
sourceWB.datasources[i].connections[0].server = 'myServer'
sourceWB.datasources[i].connections[0].dbname = 'myDbName'
sourceWB.datasources[i].connections[0].username = 'myUserName'
What I'd like to be able to do is specify a new database table as well. Of course this is a little more complicated if I'm joining multiple tables but all I need is to be able to iterate through the tables in each connection and change them. I don't need to be able to change the joins.
I want to do something like this:
for i in range(0, len(sourceWB.datasources[0].connections[0].tables)):
sourceWB.datasources[0].connections[0].tables[i] = 'tableName'
- 主要语言
- Python
- 星标
- 363
- 派生
- 183
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tableau/document-api-python 的其他 Issue
-
难度 5/5 一周以上 新手友好度 20/100
tableau/document-api-python#270 ·
-
难度 4/5 3-5 天 新手友好度 25/100
tableau/document-api-python#260 ·
-
docs
难度 2/5 1-3 小时 新手友好度 55/100
tableau/document-api-python#258 ·
-
难度 5/5 一周以上 新手友好度 30/100
tableau/document-api-python#251 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
tableau/document-api-python#250 · 2 条评论 ·
查看 tableau/document-api-python 的全部 Issue
相似的 Issue
-
🐛 Bug 🔔 Pending processing
难度 2/5 1-3 小时 新手友好度 84/100
jumpserver/jumpserver#17584 ·
-
link-check link-check:sphinx-theme
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 90/100
modelscope/DiffSynth-Studio#1702 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
难度 2/5 1-3 小时 新手友好度 88/100
OpenHands/extensions#626 · 1 条评论 ·