Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Publishing large data sources in chunks throws error #334

Copy link
Copy link
@aawiegel

Description

@aawiegel
Issue body actions

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.

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.