8000 Publishing large data sources in chunks throws error · Issue #334 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Publishing large data sources in chunks throws error #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aawiegel opened this issue Aug 30, 2018 · 2 comments
Closed

Publishing large data sources in chunks throws error #334

aawiegel opened this issue Aug 30, 2018 · 2 comments

Comments

@aawiegel
Copy link

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.

@aawiegel
Copy link
Author

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

@irwando
Copy link
Contributor
irwando commented Jul 25, 2019

#422 Should have hte fix for this.

@irwando irwando closed this as completed Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0