Skip to Content

Can a Table Function consume Calculation Views in the logic?

Good day,

Scenario- Right now we have a conditional join situation which is very complex. This requires its use only in Scripted Calculation view, as if the joins were to be done graphically the run times would be atrocious due to our data set and tables.

Right now the join condition is a scripted calculation view which calls a Graphical Calculation view in the FROM logic.

I am attempting to mitigate the situation with adding the complex join logic to a table function, and use that as a development object, that way I can build the rest of the model graphically and not have numerous scripted calculation views, all because of this one join.

Will a table function be able to use the output of a graphical calculation view in the FROM logic? Similar to dragging and dropping a model/table into an SQL Query? Or can table functions only use Tables?

I thank you in advance for your knowledge!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 24, 2017 at 05:21 AM

    Yes, in a table function you can consume the result of a graphical calculation view by doing a select on the view.

    What have you tried so far, what issues you get, because you are asking?


    PS: It would be of interest why in your original implementation the joins in a scripted calculation view performs better than in a graphical calculation view. Maybe it is worth to invest some time to figure out if there is an issue in your graphical view definition, instead of doing a (maybe) workaround using scripted logic.

    Add comment
    10|10000 characters needed characters exceeded

    • Thank you for your reply, Florian. I asked originally because when I was writing the table function, I grabbed a calculation view and moved it into the body of the table function, however, it would not allow me to do this. First time writing a table function so I have much learning ahead of me!