Source data in multiple languages

  • Hi,

    confusing myself with possible options for this scenario -

    Reporting from our DW must be in both English and French, therefore i maintain the standard dimension in english and clone it through a translation process to create the equivalent in French.

    I get separate data feeds coming from UK and French system to update this dimension. The UK data contains a text field containing 'Day', the french data says 'Jour'.

    The challenge for me is how i control this through SSIS. Current thinking is that for the french source data i could firstly pre-translate the field back into english, push that through the normal dimension update process, then re-translate and clone back into the french dimension.

    - should i re-stage the pre-translated data or try manage it all within a data flow?

    - whats the best method that will cope with potentially having 20+ translatable fields in a dimension. I don't really want to be performing 20+ individual lookups if i can avoid it.

    - I also need to consider the introduction of further languages down the line

    any help appreciated

  • What you usually do is creating an English column and a French column. For example English Product Description and French Product Description.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks, but that is impractical as each time i introduce a new language i have multiple db changes, ETL mods, reporting mods, ...etc

  • osmereqork (7/10/2013)


    Hi,

    confusing myself with possible options for this scenario -

    Reporting from our DW must be in both English and French, therefore i maintain the standard dimension in english and clone it through a translation process to create the equivalent in French.

    I get separate data feeds coming from UK and French system to update this dimension. The UK data contains a text field containing 'Day', the french data says 'Jour'.

    The challenge for me is how i control this through SSIS. Current thinking is that for the french source data i could firstly pre-translate the field back into english, push that through the normal dimension update process, then re-translate and clone back into the french dimension.

    - should i re-stage the pre-translated data or try manage it all within a data flow?

    - whats the best method that will cope with potentially having 20+ translatable fields in a dimension. I don't really want to be performing 20+ individual lookups if i can avoid it.

    - I also need to consider the introduction of further languages down the line

    any help appreciated

    If I understand correctly, you are receiving identical feeds - just one is French and the other is English?

    If that is correct, is there anything wrong with adding a new field to your "standard dimension" - something akin to LanguageTypeKey and creating a LanguageType table? This way you can just put any feed you receive (regardless of language) into the same table and use SSIS to populate the LanguageTypeKey field based on which feed it is processing. If a further language is introduced down the line you simply add it as a new record in your LanguageType table and modify your SSIS to map the LanguageTypeKey. I assume that the only time you really need to use "Day" vs. "Jour" etc. is as a label in reporting.

    Again use the LanguageTypeKey to programatically adjust the labels accordingly - maybe even have another table that stores the labels for every language absed in the same key?

    I tend to oversimplify things, so at the least hopefully this shakes an idea loose 🙂

    Good luck!

  • Im not clear on the requirement.

    Are you saying that you have two files one English and one French

    English:

    Day|PartNo|Price

    Monday|ABC|123.45

    Tuesday|ABC|124.78

    ...

    And in French

    Jour|PartNo|Combien

    Lundi|ABC|123.45

    Mardi|ABC|444.55

    If so, then firstly the files should not contain language specific data; the days should be 1,2,3,4,5,6,7 but if they do then I would set up a lookup table in the database to take those text values and translate them in the SSIS dataflow.

    Lang|Descr|TargetDesc

    EN|Monday|Monday

    FR|Lundi|Monday

    ES|Lunes|Monday

    etc...

  • aaron.reese (7/23/2013)


    Im not clear on the requirement.

    Are you saying that you have two files one English and one French

    English:

    Day|PartNo|Price

    Monday|ABC|123.45

    Tuesday|ABC|124.78

    ...

    And in French

    Jour|PartNo|Combien

    Lundi|ABC|123.45

    Mardi|ABC|444.55

    If so, then firstly the files should not contain language specific data; the days should be 1,2,3,4,5,6,7 but if they do then I would set up a lookup table in the database to take those text values and translate them in the SSIS dataflow.

    Lang|Descr|TargetDesc

    EN|Monday|Monday

    FR|Lundi|Monday

    ES|Lunes|Monday

    etc...

    Thanks.

    Yes it would be nice if the source data contained codes rather than text, but unfortunatly thats not the case. I've decided to do basically what you said. I will receive the files in their native language and translate any of these fields back into english via lookups at the staging phase.

    If i have 20 such fields in some source data is it practical to have 20 individual lookups within a dataflow? Is there a better approach?

  • osmereqork (7/24/2013)


    Thanks.

    Yes it would be nice if the source data contained codes rather than text, but unfortunatly thats not the case. I've decided to do basically what you said. I will receive the files in their native language and translate any of these fields back into english via lookups at the staging phase.

    If i have 20 such fields in some source data is it practical to have 20 individual lookups within a dataflow? Is there a better approach?

    You may find that translating by look-up is somewhat fraught. For example you may have a field called "temps" in one sort of record that needs to be "times" in English and another field called "temps" in a different sort of record that needs to be called "weather" in English. That suggests that the lookup has to be able to spot the case where which English word is to be used depends on which sort of record you are looking at - it's easy enough to do, but does add some overhead. Of course if you have only one record type you don't have this problem.

    An alternative, which might perform better or might not, would be to translate to a language independent field identifier which incorporates a record type identifier. This probably saves store compared with using strings throughout. It's flexible, adding a language is trivial, and if a field identifier can be an integer it probably speeds up translation on output. Again, if you have only one record type this can be simplified by not incorporating that in the field identifier.

    Tom

  • Thanks. I'll certainly look at this.

  • Lets expand on this a bit then...

    My original suggestion of

    Lang|Text|Translation was to clarity on the existing data. In reality the lookup table would be

    Context|Lang|Text|Result

    Day|FR|Lundi|1

    Day|EN|Monday|1

    Day|DR|Montag|1

    ...

    Month|FR|Janvier|1

    ...

    Month|EN|July7

    etc...

    The lookup would then specify the context, language and text and return the result.

    If your contexts are complicated (e.g. medical terms) then maintaining these files may be time consuming and expensive

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply