Docker for the official Tableau REST API client.
cd rest-api-client-docker/src/main/docker/defailt/
docker build .Run the following command (That will mount the folder (LOCALFOLDER) containing the datasource (DATASOURCE) you wish to publish as a volume and start an interactive session with publishing script started):
docker run -v <LOCALFOLDER>:/Data \
-it -t image_tag_name \
/publish_datasource.py \
--server <SERVER> \
--project <TARGETPROJECT> \
--filepath /Data/<DATASOURCE>.tdsx \
--username <USERNAME> \
--password <PASSWORD> \
--logging-level errorNotice that TARGETPROJECT is a name of the project, not a full name and that due to the existing limitation of client package we are using it is not possible to correctly target the project if its name is not unique accross all top level and nested projects. So if you have the following projects Project1, Project2/Project1, Project1/Project3 then only Project2 and Project3 (Project1/Project3) could be used as a target project name. But when you specify Project1 as a target it could be resolved either as Project1 or as Project2/Project1.
You can target a specific site name using --siteid parameter.
Run the following command (That will mount the folder (LOCALFOLDER) containing the workbook (WORKBOOK) you wish to publish as a volume and start an interactive session with publishing script started):
docker run -v <LOCALFOLDER>:/Data \
-it -t image_tag_name \
/publish_workbook.py \
--server <SERVER> \
--project <TARGETPROJECT> \
--showtabs no \
--filepath /Data/<WORKBOOK>.twbx \
--username <USERNAME> \
--password <PASSWORD> \
--logging-level errorYou can target a specific site name using --siteid parameter.
- Create a new docker file that uses this image as a base (e.g.
FROM image_tag_name) - Embedd the content file (twb, twbx, tdsx, tds, tde, hyper) into the image (e.g.
ADD ./<CONTENTFILE> <CONTENTFILE>) - Add bash script to publish that file using either publish_workbook or publish_datasource script that accept server/site/project/username/password as parameters. (e.g.
ADD ./<BASHFILE> <BASHFILE>) - Grant execute permissions for it. (e.g.
RUN chmod +x <BASHFILE>) - Specify to use it as entrypoint (e.g.
ENTRYPOINT ["<bashfile>"])