0

Session Variables

What is the difference between external and internal? I have used internal based on guidance from my consultant, but need to understand the difference and why I would use an external vs. an internal. 

7replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Internal session variables are those which are built using the built in variables/ functions of incorta like currentdate , currentmonth etc. They do not need a datasource to connect. Since the internal session variables use the latest data present in the schemas built, they are independent of DB status(active/down).

    External session variables are based on SQL commands like : select currentdate() from dual etc.

    This variable is further used in other calculations/filters. Since this variable hits the DB when retrieving the value for select statement, it is database dependent. This may hit the performance of visualization sometimes.

    An internal session variable is depicted by ! symbol inside the oval shapped image while external is with a #.

     

    Let me know if you need further info,

    Reply Like
    • soumya b Thank you. Do you know of more practical examples of using external? I am also assuming that the SQL commands are limited to the defined data sources, but I am not sure about that.

      Reply Like
  • External session variables are needed in two cases:

    1. The data behind them is not in Incorta, for whatever reason

    2. The data behind them is changing at a much faster rate than the refresh rate in Incorta, and you want the session variable to be real time.  For example, you are using for security, and security privileges are changing at a very high pace in your source application.

    But in general, as mentioned by Soumy, internal session variables will give you better performance because they don't depend on the external database.

    Reply Like
    • Hichem Sellami Thank you for the extra information. Both answers combined have given me a much more through understanding.

      Reply Like
  • Like Columbo of old...just one more thing. "The data behind them is not in Incorta, for whatever reason." Does this mean that the data source for the query does not have to be a platform know data source? If so, how do I provide the connection information?

    Reply Like
    • Marc Paige 

      Data is not in Incorta means the data is not updated in Incorta as frequently as in the source.

      For instance, your incorta schema may be scheduled to refresh 30min once, while the data in the source data base may keep changing each minute. So the latest data can be available in DB anytime. 

      Example of external variable could be similar to the case discussed now. 

      A variable to select sum(sales) from SALES_FACT; from DB where the data keeps updating every second. Extrnal variables help you to get real/near real time data at the cost of performance:)

      Reply Like
    • soumya b Thank you. That clears it up. Stated plainly, the external variable gets data from a defined data source directly. It bypasses the normal data ingestion path of full or incremental load.

      Reply Like
Like Follow
  • Status Answered
  • 7 mths agoLast active
  • 7Replies
  • 279Views
  • 3 Following