KNOWLEDGE BASE

Unable to Use Special Characters When Exporting via tabcmd


Published: 12 Sep 2016
Last Modified Date: 05 Sep 2017

Issue

When using tabcmd, special characters in URLs such as comma (,) need to be escaped. If these characters are in a filter, and are not escaped; the filter will not be applied.

Environment

  • Tableau Server
  • Windows

Resolution

Update the URL so that it contains the proper format for special characters (such as a backslash code then a comma code for a comma). For example "Smith, John" would be "Smith%5C%2C%20John". The following codes correspond to their relevant special characters:
  • %5C = \
  • %2C = ,
  • %20 = single space character

Cause

When tabcmd is run from a Windows batch file, % characters will need to be "double" escaped. 

Additional Information

More examples can be found below: 
  • This url is not formatted:
    • URL_Parameters/SalesbyCustomer?Customer Name2=Smith, John
  • This command will work in a command prompt, but not a batch file:
    • tabcmd export "URL_Parameters/SalesbyCustomer?Customer%20Name2=Smith%5C%2C%20John" --pdf -f "SalesbyCustomer2.pdf" 
  • When run in a batch file, it will need to have an extra % before each %:
    • tabcmd export "URL_Parameters/SalesbyCustomer?Customer%%20Name2=Smith%%5C%%2C%%20John" --pdf -f "SalesbyCustomer2.pdf" 
Did this article resolve the issue?