Set filter and publish with Python - Is this possible? - tableau-api

Is it possible to set filters then publish workbook with tableau server client in Python ?
Basically I want to update what the end user will be shown by default when they get to the view. I am talking about these filters.
So I would need my script to access the workbook and select another item on the drop down list of the filters, then publish the workbook.
I have run through the API doc but didn't succeed in finding a way to do it.
In my case, I would like yesterday's date to be shown by default : but I still want people to be able to choose other dates if they want to.

Related

Is there any way to modify the SourceSheets object in Reports

I have a script which periodically creates a new Smartsheet from a template, then imports data into that newly created sheet. I have a series of reports which looks at all of sheets this script creates so that I can present and graph each sheet as well as summarize elements from them and chart them over time.
I've automated most of the process (in PowerShell), except for modifying the reports to include the newly created sheets. I'm wondering if there is some undocumented way I can edit the SourceSheets array in a Report object. I'd like to add the newly created SheetID via an automation so that I can cut out the last step of importing this data.
As far as I know there is no support in the API to modify reports, not even to copy directly (unless is inside a folder or a workspace and you copy the container), you can only share the report, export and other random things, this is one of the less supported features.

How to show an excel button that allows the users to download the results in tableau

I want to show an excel button that allows the users to download the results.
I want the users to download the table data shown in the workbook. The user should be able to download the filtered data.
For example if he selects regions as 'America', then in the excel sheet he must get only the data having 'America' as the region.
Please help me in achieving this!
The short answer is that you can't.
Unfortunately, there's not Excel download button like download PDF for the moment.
The long answer is about two workarounds that you can follow:
if you're using Tableau Server you can simply add .csv to your view's URL to make it downloadable in CSV. For example http://tableauservercompany/#/myview will become http://tableauservercompany/#/myview.csv. You can also apply filters as described in this tutorial.
another workaround is to include in your workbook a worksheet (not a dashboard) with the table you want to let users download to Excel. In this way users can go to Download and select Excel file.
Once your dashboard is complete, just drag the download component (lower left corner in Object section), and set it for cross-tab (default is PDF).
This feature will be available if your dashboard is published on Tableau Server/Online and it will download the current data depending of what users see when they click on the download button.

Auto update data source in Tableau Desktop

I am trying to automatically update a .txt file-based data source in Tableau Desktop but can't find how to do it. What I want is to see a "live" chart on a worksheet not having to push F5 every time. Is there a way to do this?
No there's not.
Tableau Desktop is the editor you can use to create visualizations and it's not build to shove "live" data even though you can refresh data via F5.
You can achieve something like you want, publishing your dashboard to a Tableau Server/Online and then using some tricks.
Please check this related S.O. post:
Auto refresh Tableau online dashboard using "Auto refresh" Chrome extension

Download reports from the Microstrategy with filtering

http://xx.xx.xxx.xx/servlet/mstrWeb?evt=4001&src=mstrWeb.4001&reportID=48C05A5F4CCF82CC07F4A1BE2D023FE5&visMode=0&reportViewMode=1&messageID=9850FBA54B678E5B6B66A4B1E527B7B5&stateID=0
This sample URL displays the report executed and saved in the archive. Before downloading, I need to specify an additional condition on one of the columns. For example, City = Samplesity How can this be implemented with the help of Microstrategy url api?
You could use a view filter (with a prompt) in the report and answer the prompt via MicroStrategy URLAPI. The problem would be that the prompt will be showed also to the users (if the report is executed with a subscription, then no problem).
Using a report in this way doesn't make much sense to me, better in this case to use a cube and create a report with a prompted view filter on top of it.
If by "saved in the archive" you mean stored in the History List then there is not much to do here. The History List contains an execution of a report, you cannot really modify it.
If you are looking for a way to filter on old version of your data you have to find another solution, like keeping historical version of the data.

Exporting in Netsuite

One of our customer's uses Netsuite ERP. We would like to be able accept pick tickets(orders) from them in a format that would allow us to import the pick tickets into our custom built ERP system. Naturally, I asked them if they could export the pick tickets as CSV to us.
They are attempting to build a custom report with all the fields we need and export it into csv. Aside from them having issues exporting the report only to HTML... Im curious as to why they cant just export the pick ticket they have been sending us, which is in pdf format.
On top of that. Ive noticed via SuitesScript you could modify the on click event to generate a csv of the data. So when they click generate print ticket, why could it not easily generate a csv at that time?
Basically, due to me not havign hands on to their NetSuite system - or any insight to the inner working of NetSuite, im looking to the community to explain to me, what they are doing wrong - or what the best solution is to attain the goal of: exporting a pick ticket(im assuming this is based from the sales order in netsuite...) in a friendly format, allowing me to automate the order entry into my company's system.
I am sure Netsuite provides CSV option for exporting Reports. Please refer to this doc.
To export a report:
On the Reports page, click the name of the report you want to see.
In the footer of the report, select Export-CSV, Export-Microsoft® Word, Export-Microsoft® Excel, or Export-PDF.
One possible problem may be the Role Permissions. Please refer to this.
If your search results pages do not include an Export button, your account administrator may not have assigned you the Full level for the Perform Search permission. This level is required for exporting search results. The Export Lists permission also is required. See Permissions for Searches.
you should be able to export pdf. Please refer to https://github.com/eliseobeltran/NSProject/blob/314c5a03c4251cd06d451527103b7b85bb63f130/GOP/Innov.GOP.GeneratePDF.js
Once you create the saved search, NetSuite has the option to export the saved search as the CSV, MS EXCEL, or PDF. But it's a manual approach. You can do it automatically by writing a JavaScript script in the Suite Script.