KNOWLEDGE BASE

"Remove Punctuation" Has No Effect In Final Output When Input Is A Hive DB


Published: 22 Mar 2023
Last Modified Date: 22 Mar 2023

Issue

The "Remove Punctuation" feature in a clean step does not actually remove "hyphen" in a final output when the input is a Hive DB.

Environment

  • Tableau Prep Builder

Resolution

As a workaround, use REPLACE([<target field name>], "-", "") or REGEXP_REPLACE([<target field name>], '\p{Punct}','') instead of "Remove Punctuation".

Cause

The cause of the issue is that Hive regex has a different expression for punctuations, "\p{Punct}" instead of the usual "[[:punct:]]". 
Did this article resolve the issue?