Change database table in a workbook

Abierto
#116 7 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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'
Lenguaje dominante
Python
Estrellas
363
Forks
183
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tableau/document-api-python

Todos los issues de tableau/document-api-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.