Class Index: jobs.job_tableau_export.TabcmdExportSection

TabcmdSection

Parameters used for each invocation of tabcmd export on each ReportSpecification.

type

object

properties

  • server

Server

Hostname or IP address of Tableau server.

type

string

  • site

Site

Tableau site.

type

string

  • user

User

Tableau user id.

type

string

  • password

Password

Password for Tableau user.

type

string

  • path

Path

Path to location of tabcmd on Mitto instance.

type

string

default

/opt/tableau/tabcmd/bin/tabcmd

  • timeout

Timeout

Maximum number of seconds to allow tabcmd to run before killing it.

type

integer

default

60

  • retries

Retries

Maximum number of times to retry a failed tabcmd.

type

integer

default

3

  • no_certcheck

No_Certcheck

If true, do not check TLS certificate validity of server.

type

boolean

default

True

  • port

Port

TCP/IP port tabcmd should use when contacting server.

type

integer

  • proxy

Proxy

Hostname or IP address of proxy to use when contacting server.

type

string

SmtpSection

Defines the characteristics of the SMTP server that will be used to deliver exported reports.

type

object

properties

  • port

Port

The TCP/IP port to use for SMTP. See comment at require_tls.

type

integer

default

25

  • require_tls

Require_Tls

Use STARTTLS to establish secure transport. Note that this requires use of a non-TLS port to first establish communication. Often, this means that port should be set to 25 or 2525. Do not use the standard SMTP TLS port (e.g., 465).

type

boolean

default

False

  • server

Server

Hostname or IP address of server.

type

string

  • username

Username

SMTP user name.

type

string

  • password

Password

Password for SMTP user name.

type

string

  • disabled

Disabled

If True, email is not sent and the contents of this section are ignored. Primarily intended for testing.

type

boolean

default

False

ReportSpecification

Defines the contents of a single report.

type

object

properties

  • view

View

The Tableau view to use when creating the report. Views may contain spaces.

Example: If the Tableau URL is https://tableau.zuar.com/#/views/Superstore/Overview?:iid=1 then view is "Superstore/Overview".

type

string

  • report_type

Report_Type

The report’s format.

Examples:

"pdf"
"fullpdf"
"csv"
"png"

type

string

enum

pdf, csv, png, fullpdf

default

pdf

  • refresh

Refresh

type

boolean

default

False

  • height

Height

Height of the report image in pixels. Only valid when report_type is png.

type

integer

  • width

Width

Height of the report image in pixels. Only valid when if report_type is png.

type

integer

  • pagelayout

Pagelayout

The page orientation of the report.

Examples:

"landscape"
"portrait"

type

string

enum

landscape, protrait

default

landscape

  • pagesize

Pagesize

Assumed paper size to use when creating the report.

Examples:

"letter"
"a4"

type

string

enum

unspecified, letter, legal, note, folio, tabloid, ledger, statement, executive, a3, a4, a5, b4, b5, quarto

default

letter

  • report_name

Report_Name

The name given to the exported report when it is attached to outgoing email. When the recipient saves the attachment, it will be saved using this name. Do not provide an extension (e.g., use "ceo_report" instead of "ceo_report.pdf"; the correct extension will be provided by tabcmd export.

type

string

default

default_report_name

  • mail_subject

Mail_Subject

The subject line of the outgoing email.

Example:

"Q4 Results"

type

string

default

default_mail_subject

  • mail_from

Mail_From

The email address that will appear in the From: field of the outgoing email.

Example:

"steve@zuar.com"

type

string

  • mail_to

Mail_To

One or more comma-separated email addresses. The report will be emailed to the address(es).

Example:

"alice@foo.com,bob@foo.com,ted@bar.com"

type

string

  • mail_cc

Mail_Cc

CC recipients. Otherwise, same as mail_to.

type

string

  • mail_bcc

Mail_Bcc

BCC recipients. Otherwise, same as mail_to.

type

string

  • mail_body

Mail_Body

HTML which will be used as the body of the email.

Example:

"<html><head>CEO Report</head><body>Report attached.</body></head></html>"

type

string

default

This is the default email body.

  • disabled

Disabled

If True, the report defined by this specification is skipped.

Primarily for use with CSV input from a spreadsheet; it allows individual report specifications to be enabled/disabled without adding/removing rows from the spreadsheet.

type

boolean

default

False

ReportSpecificationsSection

Defines a section of the job’s JSON config containing the specifications for one or more reports that are to be exported and emailed.

type

object

properties

  • type

Type

The format used in providing one or more report specifications.

"json": The report specifications will come from the job’s JSON config.

"csv": The report specifications will come from a CSV formatted file.

"sql": The report specifications will come from the results of an SQL query.

type

string

enum

json, csv, sql

  • source

Provides the detailed specification for each report to be created.

If type is "json", source is a list of ReportSpecification or a valid JSON string representing a list of ReportSpecification.

Example:

"report_specifications": {
    "type": "json",
    "source": [
        {
            "view": "Superstore/Overview",
            "report_name": "report_name01",
            "mail_to": "steve@zuar.com",
            "mail_subject": "Report 01 is ready",
            "mail_from": "bob@zuar.com",
            "parameter_01": "Category",
            "value_01": '"Office Supplies"',
            "parameter_02": "State",
            "value_02": '["Texas", "Louisiana"]',
        },
        {
            "view": "Superstore/Overview",
            "report_name": "report_name02",
            "mail_to": "steve@zuar.com",
            "mail_subject": "Report 02 is ready",
            "mail_from": "bob@zuar.com",
            "parameter_01": "Category",
            "value_01": '["Furniture", "Office Supplies"]',
            "parameter_02": "State",
            "value_02": '"Louisiana"',
        }
    ]
}

If type is "csv", source is a path to a CSV file containing one report specification per row. The first row of the CSV file must be a header with column names corresponding to ReportSpecification attributes.

Example:

"report_specifications": {
    "type": "csv",
    "source": "/var/mitto/data/reports_01-02.csv"
}

Example contents of reports_01-02.csv:

view,report_type,pagelayout,pagesize,report_name,mail_to,mail_subject,mail_from,mail_cc,mail_bcc,parameter_01,value_01,parameter_02,value_02
Superstore/Overview,pdf,landscape,letter,khe_report_name01,khe@east.fm,keh subject 01,ke@east.fm,"kheaustin@gmail.com,kenneth.east@zuar.com",ke@east.fm,Category,""Office Supplies"",State,"[""Texas"", ""Louisiana""]"
Superstore/Overview,fullpdf,landscape,letter,Louisiana Report,"khe@east.fm,KHEAustin@gmail.com",keh subject 02,ke@east.fm,ke@east.fm,"kheaustin@gmail.com,kenneth.east@zuar.com",Category,"[""Furniture"", ""Office Supplies""]",State,""Louisiana""

If type is "sql", source is a SQL query that, when executed, will return one or more ReportSpecification. The SQL query can be either a single string containing the query or a list of strings that are concatenated to create the query.

The dbo attribute must be present when type is "sql".

Example:

"report_specifications": {
    "type": "sql",
    "source": [
        "SELECT",
        "'Superstore/Overview' AS view,",
        "'report_name01' AS report_name,",
        "'steve@zuar.com' AS mail_to,",
        "'Report 01 is ready' AS mail_subject,",
        "'bob@zuar.com' AS mail_from,",
        "'Category' AS parameter_01,",
        "'"Office Supplies"' AS value_01,",
        "'State' AS parameter_02,",
        "'["Texas", "Louisiana"]' AS value_02",
        "UNION ALL",
        "SELECT",
        "'Superstore/Overview' AS view,",
        "'report_name02' AS report_name,",
        "'steve@zuar.com' AS mail_to,",
        "'Report 02 is ready' AS mail_subject,",
        "'bob@zuar.com' AS mail_from,",
        "'Category' AS parameter_01,",
        "'["Furniture", "Office Supplies"]' AS value_01,",
        "'State' AS parameter_02,",
        "'"Louisiana"' AS value_02"
    ],
    "dbo": "postgresql://localhost/analytics"
}

Example:

"report_specifications": {
    "type": "sql",
    "source": "SELECT * FROM report_secification",
    "dbo": "postgresql://localhost/analytics"
}

Source

anyOf

type

array

items

anyOf

ReportSpecification

type

string

type

string

  • dbo

Dbo

The database dbo to use when executing an SQL query to obtain report specificaitons.

Example:

"postgresql://localhost/analytics"

type

string

  • specifications

For internal use only. Results are undefined if a value is provided via the job’s JSON config.

Specifications