Skip to content

battmanux/rtableau

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtableau

This package uses Rcpp to connect R to the Tableau SDK.

The Tableau SDK functionalities are implemented in this package as two R functions:

  • write_tde: Take a R data.frame and output it as a Tableau Data Extract (.tde) file
  • write_twbx: Take a R data.frame and update a Tableau Data Workbook (.twbx) file
  • publish_tde: Publish a .tde file to a Tableau Server

Set-up

I am still working on the configure file so you may run into issues during installation. You may need to create your own Makevars if you installed in a different location than I did. Install the Tableau SDK before trying to install this package.
I've only tested this on Mac and Linux, here's where my SDK files are installed.

Linux

Shared object files: /usr/lib64/tableausdk/
Binary executable: /usr/local/bin/tdeserver64 You may need to link ln -s libpcre16.so libpcre16.so.0 in /usr/lib/x86_64-linux-gnu (I have to do it in ubuntu 16.04)

Mac

/Library/Frameworks

Known Issues

  • There are some issues with the 9.3 SDK on Linux when using large datasets, I recommend using the 9.2 version of the SDK which is more stable.
  • The Tableau SDK does not support SSL on Linux for publishing

Data Type Mapping

The main challenge of implementing this is that a R data.frame can have arbitrary data structures and types, while C++ is strongly typed. I try to map types but keep in mind you will run into issues if you try and output anything other than a matrix of scalar values.

R vector type Rcpp vector type Tableau scalar type
character CharacterVector CharString
factor CharacterVector CharString
double NumericVector Double
integer IntegerVector Integer
logical LogicalVector Boolean
Date NumericVector Date
POSIXct NumericVector DateTime
POSIXlt NumericVector DateTime

We convert factors to character in R, as well as POSIXlt to POSIXct.

character and factor levels are converted to UTF-8 with protection for brocken characters

About

Rcpp bindings for the Tableau SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C++ 61.0%
  • C 21.4%
  • R 12.0%
  • Objective-C 4.4%
  • M4 1.2%