Skip to content

How to publish a workbook with different data sources #446

Closed as not planned

Description

@AmeyMankar

I am using TSC to publish a workbook to the Tableau server.
My sample workbook has two data sources, one to RedShift and one to MySQL. How shall I code these in the script so that the published workbook have both of them?
Here is my code just for Redshift datasource:

` wb_item = TSC.WorkbookItem(name=reportname, project_id=tableau_folder)

    if (server.workbooks.publish(wb_item, filepath, 'Overwrite',
                                 connection_credentials=ConnectionCredentials(name=rds_username,
                                                                              password=rds_password, embed=True))):
        print(reportname)
        print('Workbook has been published successfully.')`

Activity

  1. knguyen1794 commented on Dec 8, 2019

    @knguyen1794

    I'm having the same issue. It seems like we can only embed 1 connection into the workbook/datasource. What if we have more than 1 source?

  2. forzabarca88 commented on Jan 23, 2020

    @forzabarca88

    One workaround is to publish without embedding, and then after publishing just update credentials on each connection via

    datasource.update_connection(datasource_item, connection_item)
    
  3. knguyen1794 commented on Jan 23, 2020

    @knguyen1794

    One workaround is to publish without embedding, and then after publishing just update credentials on each connection via

    datasource.update_connection(datasource_item, connection_item)
    

    Yes. That's correct. I managed to achieve it with this way.

  4. github-actions commented on Aug 6, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.

  5. github-actions commented on Aug 21, 2026

    @github-actions

    Closing due to inactivity. If this is still relevant, please reopen or file a new issue.

  6. jacalata commented on Aug 21, 2026

    @jacalata
    Contributor

    For future readers: publish the workbook, then update each embedded connection with workbooks.update_connection(). See the update_connection sample and the Connections docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions