1 2 Previous Next 18 Replies Latest reply on Apr 7, 2018 3:16 PM by Mathieu Rampant

    Environment variable in view model transformation

    Mathieu Rampant Newbie

      I am trying to use an environment variable in the transform procedure of my view model, but without luck.

      this is what I am doing:

       

      BEGIN

        DECLARE STRING VARIABLES.token = ENV('SPM_TOKEN');

        SELECT ...

      headers => CONCAT(CONCAT('{"Authorization":"', VARIABLES.token), '"}'

       

      I have enable env function in the teiid subsystem configuration, and if I switch "ENV('SPM_TOKEN')" with the actual value of the env variable, it does work.

      so the problem is definitely coming from the VARIABLES.token = ENV('SPM_TOKEN') part

       

      any suggestions? I am using Teiid 9.0.6

        1 2 Previous Next