# Tableau Export The `Export` job performs exports using either the Tableau Vizql API (PDF exports) or the Tableau REST API (CSV, XLSX exports), both of which support user impersonation. Beginning in 2.7.8, any new jobs that are created to generate and email reports should use the `Export` job. To avoid breaking existing jobs with the new release, the `Tableau Export` job remains in Zuar Runner, though it should be considered deprecated. The `Export` job is a single job that combines the functionality offered by the [Vizql Export](https://www.zuar.com/api/mitto/latest/jobs/job_vizql_export.html) and [REST Export](https://www.zuar.com/api/mitto/latest/jobs/job_rest_export.html) jobs. You can learn more from the technical documentation here: [Zuar Runner Export Job](https://www.zuar.com/api/mitto/latest/jobs/job_export.html) ## Create a Tableau Export Job To create a Tableau `Export` job: 1. Click the **+ADD JOB** button in Zuar Runner 2. Select **Generic Job** 3. Give the job a name like `[Tableau Export] Sales Data` 4. Choose `export` from the _TYPE_ dropdown menu 5. Paste the following configuration into the _CONFIG_ editor: **Example CSV Export** ```json { /* Tableau server credentials (named credentials supported) */ "credentials": { "username": "" "password": "" }, /* Tableau server configuration */ "server": { "server": "https://tableau.zuar.com", "site": "", "user_id_to_impersonate": "5cf3542a-0c46-42fb-b6a5-27a96e41054a", }, "export": { "full": true, "name": "example-csv", "type": "csv", "view_filters": { "State": ["Louisiana", "Texas"], "Category": ["Office Supplies", "Furniture"] }, "view": "Overview", "workbook": "Superstore" } } ``` The above configuration will export all views in the Superstore workbook as csv files and place all files in a single ZIP archive. The export will be saved in `/var/mitto/data/example-csv.zip`. To export just the Overview view, change `full` to `false`. The export will be saved as `/var/mitto/data/example-csv.csv`. For more examples, please visit the [technical documentation here!](https://www.zuar.com/api/mitto/latest/jobs/job_export.html) --- # Tableau Subscription A Tableau `subscriptions` job emulates the subscription functionality inside of Tableau. It allows user to configure custom subscriptions on a schedule that can send information from a dashboard to a data consumer via email. This is all configurable through a Zuar Runner job. You can learn more from the technical documentation here: [Zuar Runner Subscription Job](https://www.zuar.com/api/mitto/latest/jobs/job_subscriptions.html) ## Create a Tableau Subscription Job A Subscription Job’s configuration comprises three sections: `subscriptions`, `mail`, and `tableau`. The subscriptions and mail sections work the same, no matter the type of report being exported. The tableau section section contains Tableau server credentials as well as defaults that are used for export jobs. Values provided by subscriptions always override default values that may be present in the tableau section. To create a Tableau `Subscriptions` job: 1. Click the **+ADD JOB** button in Zuar Runner 2. Select **Generic Job** 3. Give the job a name like `[Tableau Subscription] Sales Data` 4. Choose `subscriptions` from the _TYPE_ dropdown menu 5. Paste the following configuration into the _CONFIG_ editor: ```json { "mail": { "server": "smtp.zuar.com", "port": 25, "require_tls": true, "credentials": "zuar-smtp-creds", "mail_from": "operations@zuar.com", "text": "email body text", "attachments": [] }, "subscriptions": { "subscriptions_input": { "dbo": "postgresql://localhost/analytics", "schema_name": "public", "table_name": "subscriptions" }, "subscription_status_input": { "dbo": "postgresql://localhost/mitto", "schema_name": "public", "table_name": "subscription_status" } }, "tableau": { "credentials": "zuar-tableau-creds", "server": { "server": "https://tableau.zuar.com", "site": "" } } } ``` ## Create a Tableau Export PAT Credential: To use a Personal Access Token in your credential, you will need to create a generic credential in the following format and reference it by name in the job: ```json { "token_name": "", "personal_access_token": "" } ``` For more information about how to create a subscription table, what the key value pairs mean, and more sophisticated configurations, please review the [technical documentation here!](https://www.zuar.com/api/mitto/latest/jobs/job_subscriptions.html)