Skip to main content
Solved

DQS - camel case

  • Sep 12, 2023 10:54 AM UTC
  • 4 replies
  • 131 views

Forum|alt.badge.img+1

Is there a function or custom ways to convert strings into camel case on DQS - Data Quality services?

Best answer by AKislyakov

Hi @sgilla,

for such case there is an optional parameter leaveExcsAsTheyAre in capitalizeWithException(string srcStr [, boolean leaveExcsAsTheyAre=false] [, string exc]...)
 

If the parameter leaveExcsAsTheyAre is set to true, the transformation leaves words from exc as they are in the string srcStr, i.e. without any change.

 

So, you want something like 
capitalizeWithException(upper(pur_city), true, 'BLVD')

View original

4 replies

Forum|alt.badge.img+2
  • Ataccamer
  • Sep 13, 2023 12:19 AM UTC

There is capitilize function with following description
 

Transforms all words in the string srcStr in the following manner: The first character of each word to upper case and all following characters to lower case. A word consists of alphabetic characters (letters). All other characters are considered separators.

 

 


Forum|alt.badge.img+1
  • Author
  • Data Pioneer
  • Sep 13, 2023 1:30 AM UTC

Thank you.


Forum|alt.badge.img+1
  • Author
  • Data Pioneer
  • Sep 13, 2023 1:38 AM UTC

The CapitalizewithException() does the same but convers exceptions into lower case 

example: 

capitalizeWithException(upper(out_name),'BLVD')

out_name:’123 capital BLVD’

returns: ’123 Capital blvd’

Is there a function I can use along with this, which would keep ‘BLVD’ as is @AKislyakov ?


Forum|alt.badge.img+2
  • Ataccamer
  • Answer
  • Oct 1, 2023 3:01 PM UTC

Hi @sgilla,

for such case there is an optional parameter leaveExcsAsTheyAre in capitalizeWithException(string srcStr [, boolean leaveExcsAsTheyAre=false] [, string exc]...)
 

If the parameter leaveExcsAsTheyAre is set to true, the transformation leaves words from exc as they are in the string srcStr, i.e. without any change.

 

So, you want something like 
capitalizeWithException(upper(pur_city), true, 'BLVD')