Skip to content

Problem with onedrive connection embedd #1001

Description

@Cloudy17g35

Describe the bug

Hi!

I have a following problem:

I want to download workbook A from project A then publish the same workbook to project B as workbook B.

One catch here is that connections need to stay the same.

Type of connection which i'm using is onedrive.

So where's the problem?

After running code below everything seems to be good.
Workbook B has been created in Project B.
Problem occurs when i ll go to datasources and then to the connections on my server.
At first glance everything looks good, it's written in column Authentication that connections are embedded as on picture below:

connection_1

But when we ll click 'three dots' in actions then it shows that it's not embedded.

connection_2

I'm 99.99% sure than credentials are good 😁

Versions

Details of environment:

Tableau Server Version: 2021.4.2 (20214.21.1217.2252) 64-bit Linux
Python 3.9.7
tableauserverclient 0.17.0.

To Reproduce

Here's code:

# connecting to the server, imports etc...

# initializing names of the projects
test_a = 'test_a'
test_b = 'test_b'

# sign into server
with server.auth.sign_in(tableau_auth):
    
    request_options = TSC.RequestOptions(pagesize=1000)
    # listing projects
    all_projects = list(TSC.Pager(server.projects, request_options))
    
    # find project test_a
    test_a = [project for project in all_projects if project.name == test_a ][0]
    
    # find project test_b
    test_b = [project for project in all_projects if project.name == test_b][0]
    
    # get all workbooks
    workbooks, _ = server.workbooks.get()
    
    # get workbook from project test_a
    workbook_from_a = [workbook for workbook in workbooks if workbook.project_id == test_a.id][0]
    
    # downloading workbook from project test_a
    server.workbooks.download(workbook_from_a.id)
    
    # workbook is stored in my cwd so path to it will be workbook_name + extenstion which is twbx
    path_to_workbook = workbook_from_a.name + '.twbx'
    
    # make new instance of WorkbookItem
    workbook_from_b = TSC.WorkbookItem(test_b.id)
    
    # publishing
    server.workbooks.publish(workbook_from_b, 
                             path_to_workbook, 
                             mode='Overwrite', 
                         connection_credentials =TSC.ConnectionCredentials(my_username, 
                                                                           my_pass, 
                                                                           True),skip_connection_check=True)
    
    # information about publishing
    myloger.info(f'{workbook_from_b} has been published')

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