Dynamic SQL - Field Name Changes


I have a table that has values in different languages,  I wondered if there is a way to pass the field name for the 'current'  language as part of a custom sql statement,  I am able to use a parameter as a value in a where clause but I am struggling with it as a field name.  


I can use a calculated column to achieve the result but I was interested in not querying all the languages initially. 


Thank you 

4 replies

    • Customer Solutions Architect
    • Moshe_Yossef
    • 4 mths ago
    • Reported - view

    Hi Stephen,

    Can you elaborate on the structure of your data?

    I would expect our support for translations in a model to be sufficient for what you're asking, are you familiar with this option?

      • Stephen_Murfitt
      • 4 mths ago
      • Reported - view

        Thank you,  for example,  I have a product table with the product names in different languages,   so product_en,  product_fr,  product_de for example and I was looking to understand if I could have a query that just selected the appropriate language for the user?  

      I do have a case statement that is using the Application Culture to select the correct column, but was interested in if a SQL solution would work. 

      • Customer Solutions Architect
      • Moshe_Yossef
      • 4 mths ago
      • Reported - view


      This is exactly what translations do.

      Suppose your model default language is English, your Product column will be Product_En.

      Then you add a translation to French, and assign the Product_Fr as the translation column of Product_En.

      Then, when you create a discover, you can choose the model language and set it to the application language:

      And so each user will see the translation based on their application language in Pyramid Analytics.

      Read more here

      Also see the links in my other reply to topic.

    • Customer Solutions Architect
    • Moshe_Yossef
    • 4 mths ago
    • Reported - view

    Here are links to translations in our help section:

    Translation panel in model definitions

    Translation attributes

    Let us know if this helps,



Content aside

  • Status Answered
  • 4 mths agoLast active
  • 4Replies
  • 30Views
  • 2 Following