tableau / hyper-api-samples

Sample code to get started with the Hyper API.
https://help.tableau.com/current/api/hyper_api/en-us/index.html
MIT License
134 stars 72 forks source link

Publish hyper file does not work #67

Open mcdowellalex opened 2 years ago

mcdowellalex commented 2 years ago

https://github.com/tableau/hyper-api-samples/blob/main/Community-Supported/publish-hyper/publish-hyper-file.py

This example does not seem to publish the data source.

I don't get any errors and I get the full print statements:

Creating single table for publishing.
Tables available in customer.hyper are: [TableName('Extract', 'Extract')]
The number of rows in table "Extract"."Extract" is 2.
The connection to the Hyper file has been closed.
The Hyper process has been shut down.
Signing into ... at https://10ax.online.tableau.com/
Publishing customer.hyper to Group A Reports...
Datasource published. Datasource ID:...

However, when I go into the Tableau Server, there is no data source. I have even tried the following code after publishing to see if I could find it anywhere and no luck

all_datasources, pagination_item = server.datasources.get()
print("\nThere are {} datasources on site: ".format(pagination_item.total_available))
print([datasource.name for datasource in all_datasources])

Is there an updated version or way to publish data sources (specifically hyper files)?

jonas-eckhardt commented 2 years ago

I just tried it and it works on my side.

Can you please double-check by manually logging into Tableau Server, click on "Explore" on the left side, select "All Datasources", on the right side, there is a filter option and select your name as owner, and then it should show up in there.