Change database table in a workbook

未关闭
#116 7 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
databases

调研方向

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 内容生成。

描述

enhancement

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tableau/document-api-python 的其他 Issue

查看 tableau/document-api-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。