Skip to main content
Solved

DQS - camel case

  • September 12, 2023
  • 4 replies
  • 36 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
Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+2
  • Ataccamer
  • 149 replies
  • September 13, 2023

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
  • 36 replies
  • September 13, 2023

Thank you.


Forum|alt.badge.img+1
  • Author
  • Data Pioneer
  • 36 replies
  • September 13, 2023

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
  • 149 replies
  • Answer
  • October 1, 2023

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')


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings