trext.extract¶
The Extract package deals with creating, filling up and puslishing a .tde extract.
trext.extract.build¶
-
class
trext.extract.build.
ExtractBuilder
[source]¶ Bases:
object
Builds the tableau Extract by creating a Tableau Extract, defines the table skeleton, adds the table to the extract and fills this table with the relevant data for the TDE.
-
connect_to_db
(view_or_table_name, conn_string, dbtype=None)[source]¶ Connect to the view or table that needs to be turned into a .tde extract
Parameters: - view_or_table_name – View or Table that needs to be an extract
- conn_string – connection string to the database where the view or table exists
- dbtype – type of db so the right pyodbc wrapper is used to connect
-
trext.extract.exceptions¶
trext.extract.server¶
connection for tableau
-
class
trext.extract.server.
Tableau
[source]¶ Bases:
object
Tableau server connection class
-
connect
(host, username, password, site_content_url='Default')[source]¶ Connect to the Tableau server
Parameters: - host – address of the Tableau server
- username – Tableau Server username
- password – Tableau Server password
- site_content_url – Site to publish to
-
publish
(tde_path, project_name='Default', datasource_name=None, overwrite=True)[source]¶ Publishes an extract to the Tableau Server
Parameters: - tde_path – path of tde to publish
- project_name – name of project on the Tableau site to publish to
- datasource_name – the name of the .tde to publish as
- overwrite – boolean to flag if the .tde needs an overwrite when publishing
-