Tableau - Auto Archiving Historic Data - tableau-api

I have a live data source connected to Tableau Desktop. This source overwrites as it is updated. Is there a way to automatically save off monthly data from Tableau? Preferably, save the charts I have built.

There are a few options to consider if you are using Tableau Server:
REST API Export View: If you don't need interactivity, then you can automate exporting the image using the REST API. This is analogous to using the Worksheet -> Export -> Image feature in the front-end. There are other export options such as PDF and CSV. I would recommend using the Python client library over the raw REST API, but both are valid methods to export content.
If you need interactivity, then you will need to use an extract instead of a live data source. With this, you can automate exporting the workbook using the REST API. If you want a live query for normal use, then you can duplicate the workbook, covert the data source to extract, schedule the extract refresh, and download the workbook.
Scheduled Subscription: If you don't want to code, then you can schedule emailing an image of the view and manually save the images as needed. You could setup a dedicated shared resource mailbox and subscribe a user, typically a service account, to the schedule. This would allow you to consolidate all the subscriptions to a dedicated mailbox for future use.
TabCmd: If you are comfortable with tabcmd, you can automate exporting to CSV, Image, and PDF.
If you are only using Tableau Desktop, then the best option may be to convert the data source to an extract, automate refreshing the extract locally with tabcmd, and save a copy of the workbook to a folder while renaming the file to include a YYYY_MM_DD in the name. This will give you a fully functional copy of the workbook.

Related

Getting filtered/aggregated data from Tableau Server via REST API from custom page

I have existing Tableu Server workbook with diagrams and own datasources(mysql).
Is it possible to fetch data from Tableau Server via Rest Api, e.g. if I build a custom web dashboard and need only data from Tableau?
I am interested in Tableaus ability to filter/aggregate data, thats what it does for its diagrams, would be great to harvest it from custom Python web page for my custom diagrams (e.g. for D3 or Highcharts).
Is "Extracts API" the right direction for this?
Or the path with "Query View Data" is the solution?
If you want to specify the filter values and get the exact set of data that your diagrams/workbooks are using, go with the Query View Data solution.
If you pull the data from the extract, you will get it exactly as it is out of the extract. This means if you have filters or aggregation done in your visualization (which is processed after the extract), it won't apply to the extracted data.

Creating automated Tableau packaged workbooks (for Tableau Reader) using Alteryx TDE output

I am running an Alteryx workflow on a dedicated PC, 4X a day. The Alteryx workflow creates a TDE output file that is the data source for a dashboard I would like to save as a packaged workbook (openable in Tableau Reader) and distribute 4X a day.
I have a Tableau online account and tried publishing an extract of the TDE file created by Alteryx to Tableau online, setting up a refresh schedule for that extract using Tableau online sync, and then linking my workbook to this Tableau online data source.
While that solution has worked well in terms of having 4X a day updated Tableau workbooks online, when I try to download the TWBX file, it does not contain the data extract (as the Tableau workbook has a "live" connection to the published Tableau data extract online) and thus cannot be opened in Tableau reader.
My main goal is to be able to automate production of Tableau packaged worbooks (a macro that opens Tableau and hits save would do the job), and would appreciate any creative suggestions / ideas.
This can't be accomplished. You would need to leverage on-premise Tableau Server.
FWIW...Although many companies use Reader (due to the cost of server), it was never intended to be used in a production environment. Data is not governed or secure.

How edit the content of a data extract in Tableau?

I'm creating an extract from a table hosted on MS SQL Server in Tableau.
After I create the data extract, is there any way I can enable the end users to edit the data extract content? Something like an interface?
Thanks in advance
The Tableau Data Extract API (and publicly released products) do not allow you to modify the contents of an extract.
You can append new data rows to an extract, or refresh (i.e. regenerate) an extract.
Think of extracts like datamarts -- read-only snapshots of a portion of some other data store, designed to allow efficient analysis and reporting. They aren't intended to replace databases.
If you want users to make live updates, consider using a database and some sort of tech stack to allow form based updates.
This is called web-authoring in Tableau.
you can publish the extract to server and allow the users to connect to this data source for creating their own reports
using the server version of Tableau this can also be referred as Adhoc Reporting
More Info

custom export/Import for alfresco

the obvious question is that is there any solution to export some alfresco contents which have a custom condition, for example export files which their create date is between a given date range?
the goal of this solution is:
1- to have a minimum mount of data volume in export/import action
2- in my weekly or monthly export/import action on backup alfresco server, I shouldn't have duplicate records for import action
thanks a lot for any kind of help
One idea is to use a library like OpenCMIS (Java) or cmislib (Python), both available from the Apache Chemistry project. Then use a CMIS query to restrict the data you want to export to a certain date range. If you want examples of CMIS queries, including ones that use date ranges, take a look at this Java example.
Another idea would be to use CMIS change tokens. Using this approach, you ask Alfresco what has changed since the last time your code ran. Alfresco responds back with a set of changes. You can then iterate over those changes and process them accordingly. The CMIS & Apache Chemistry in Action book has a change token example that uses Python to run a polling sync server between to CMIS repositories. The source code lives here.
Both of these options use CMIS. If you would rather have a native Alfresco option you could write a custom action that runs on a schedule to call the export. Or, you could use the File Transfer Service to write files to a file system on a schedule.
If what you are really trying to do is back up your repository, don't use any of these options. Instead you should be following standard practice for backup up the repo which is to dump the database and backup the content store.
Maybe you can use the Alfresco Replication Jobs to export your contents into a different repository.
In addition, you can export the contents to a file system using the FSTR feature.
Replication jobs use Alfresco Transfer Services that can be customised to only transfer some kind of content.

automating downloads of facebook insight data

I'm looking for a tool or process for exporting facebook insights data for a facebook page and a facebook app. Currently I am just manually downloading csv files from their Insights interface but ideally I want to automate this process and load the data into Pentaho Kettle, so I can perform some operations on the data.
Is there some way to automate the downloading and input of csv files? Or will I have to use the facebook graph api explorer? I am currently looking at a set-up where I use NetBeans and RestFB to pull the data I want, and then access that data using Pentaho Kettle. I am not sure if this will work, or if it is the best approach.
As Codek says, a Kettle plugin is a very good idea, and would be very helpful to the Kettle project. However, it's also a serious effort.
If you don't want to put in that kind of effort, you can certainly download files with a Kettle Job as long as the files are available through a standard transfer method (FTP, SFTP, SSH, etc). I've never used RestFB, so I don't know what's available. You might be able to get directly from a web service with the REST Client transform step.
After downloading the files, you can send them to a transform to be loaded. You can do this with either the Execute for every input row? option on the Transformation job step, or you can get the filenames from the job's result set in the transform with Get files from result.
Then you can archive the files after loading with Copy or Move result filenames. In one job, I find only files that are not in my archive using a Get File Names and Merge Join, and then a Set files in result step in a transform, so that can be done if need too.
To automate it, you can run your job from a scheduler using Kitchen.bat/Kitchen.sh. Since I use PostgreSQL a lot, I use PGAgent as my scheduler, but the Windows scheduler or cron work too.
Hope that helps.