Skip to Content
Author's profile photo Manuel Fernandez Melgar

Sap Data services using Python to Google Translate

Hi There I just did a Custom Python Transformation to Google Translate some text using Data Services

I downloaded the libraries from https://pypi.python.org/pypi/goslate#downloads

and dropped them in

C:\Program Files (x86)\SAP BusinessObjects\Data Services\DataQuality\python\Lib

 

then I created the job

here is the function

 

 

 

 

here is the code

import goslate
dct = locals()
gs = goslate.Goslate()
dct[u’Expresion’] = record.GetField(u’Expresion’)

dct[u’Expresion’] = gs.translate(dct[u’Expresion’],’de’)
record.SetField(u’TX’,dct[u’Expresion’] )

You can change ‘de’ (Deutsche) to other languages

 

 

 

Hope this will help “Someone Out there”

 

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Steven Dauw
      Steven Dauw

      Hi,

       

      How do we configure the jobserver so it has knowledge of the external python lib. 'goslate'?

       

      Regards,

      Steven