So, I have ported the tabcmd application to Linux, from java to native ruby, thus it can work on any platform. If someone needs this for his own environment, here are the steps what I did:
Step 0: You must have ruby and rubygems installed on your system. No java is required.
Step 1. Copy tabcmd.jar from Windows to your linux/unix box
Step 2. Unzip contents of tabcmd.jar to a clean directory:
1 2 |
$ unzip ~/tabcmd.jar $ ~/tabcmd |
Step 3. Install all required gems:
1 |
$ gem install `for i in ../../gems/* ; do (echo `basename $i` | cut -f 1 -d '-') ; done ` |
Step 4. Remove tabutils references
1 2 |
rm ~/tabcmd/rb/tabcmd/common/ruby/lib/tabutil.rb vim ~/tabcmd/rb/tabcmd/common/ruby/lib/dump_reporter.rb |
Change contents to:
1 2 3 4 5 6 7 8 9 10 |
#require 'tabutil' class DumpReporter def initialize(app_name, log_dir, exit_on_exception) end def self.setup(app_name, log_dir, exit_on_exception) $dump_reporter = DumpReporter.new(app_name, log_dir, exit_on_exception) end def self.force_crash end end |
Step 5. Set APPDATA directory
1 |
$ export APPDATA=~ |
Step 6. Remove java specific relative path from relative_path.rb
1 |
$ vim ./common/ruby/lib/relative_path.rb |
Change the line 8 to:
1 2 |
# tableau_working_dir = java.lang.System.get_property("tableau.working.dir") tableau_working_dir = "." |
Step 7. Add execute flag to tabcmd.rb
1 |
$ chmod +x bin/tabcmd.rb |
How it works:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@gp-linux tabcmd]# bin/tabcmd.rb login -U admin -s http://192.168.8.162:8040 ===== Creating new session ===== Server: http://192.168.8.1:8040/ ===== Username: admin Password: ===== Connecting to server... ===== Logging in... ===== Login Succeeded. [root@gp-linux tabcmd]# ruby bin/tabcmd.rb get views/Sample/Dashboard/admin/View4.csv ===== Continuing previous session ===== Server: http://192.168.8.1:8040/ ===== Username: admin ===== Requesting views/Sample/Dashboard/admin/View4.csv from server... ===== Saved views/Sample/Dashboard/admin/View4.csv to /root/tabcmd/View4.csv. ===== Succeeded |
Enjoy ; )
This post was originally published on the Tableau Developer Community Forums.
There is also an alternate method available, you can check it out here.
- Tableau Extensions Addons Introduction: Synchronized Scrollbars - December 2, 2019
- Tableau External Services API: Adding Haskell Expressions as Calculations - November 20, 2019
- Scaling out Tableau Extracts – Building a distributed, multi-node MPP Hyper Cluster - August 11, 2019