← 输入框|github.com|刷新
Skip to content

Publishing large data sources in chunks throws error #334

Closed

Description

@aawiegel

I am trying to publish a data source as a .hyper extract to a tableau server (2018.1). When I create a new data source and try to publish it to the server, it throws an error when the file is large enough that it needs to be uploaded in chunks. When the file is small enough, it uploads to the server without any issue. Here is code I'm using to upload to the server:

data_source = TSC.DatasourceItem(project.id)
new_data_source = server.datasources.publish(data_source, file_path,
 TSC.Server.PublishMode.CreateNew) 

And the error with a large .hyper extract is:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-36-013c7545ba56> in <module>()
----> 1 new_data_source = server.datasources.publish(data_source, file_path, TSC.Server.PublishMode.CreateNew)

/Users/aaron.wiegel/anaconda3/envs/Fathom/lib/python3.4/site-packages/tableauserverclient/server/endpoint/endpoint.py in wrapper(self, *args, **kwargs)
    112         def wrapper(self, *args, **kwargs):
    113             self.parent_srv.assert_at_least_version(version)
--> 114             return func(self, *args, **kwargs)
    115         return wrapper
    116     return _decorator

/Users/aaron.wiegel/anaconda3/envs/Fathom/lib/python3.4/site-packages/tableauserverclient/server/endpoint/endpoint.py in wrapper(self, *args, **kwargs)
    150                     error = "{!r} not available in {}, it will be ignored. Added in {}".format(p, server_ver, min_ver)
    151                     warnings.warn(error)
--> 152             return func(self, *args, **kwargs)
    153         return wrapper
    154     return _decorator

/Users/aaron.wiegel/anaconda3/envs/Fathom/lib/python3.4/site-packages/tableauserverclient/server/endpoint/endpoint.py in wrapper(self, *args, **kwargs)
    150                     error = "{!r} not available in {}, it will be ignored. Added in {}".format(p, server_ver, min_ver)
    151                     warnings.warn(error)
--> 152             return func(self, *args, **kwargs)
    153         return wrapper
    154     return _decorator

/Users/aaron.wiegel/anaconda3/envs/Fathom/lib/python3.4/site-packages/tableauserverclient/server/endpoint/datasources_endpoint.py in publish(self, datasource_item, file_path, mode, connection_credentials, connections, as_job)
    187             xml_request, content_type = RequestFactory.Datasource.publish_req_chunked(datasource_item,
    188                                                                                       connection_credentials,
--> 189                                                                                       connections)
    190         else:
    191             logger.info('Publishing {0} to server'.format(filename))

TypeError: publish_req_chunked() takes from 2 to 3 positional arguments but 4 were given

Thanks in advance and let me know if you need more information.

Activity

  1. aawiegel commented on Aug 30, 2018

    @aawiegel
    Author

    Realized that this was already addressed in this commit, any chance of that being merged into the master branch soon?

  2. irwando commented on Jul 25, 2019

    @irwando

    #422 Should have hte fix for this.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions