CallLogical

The CallLogical function calls a warehouse function that returns a Logical datatype. This function if often applied to perform array comparison, creation, and manipulation for analysis.

Syntax

CallLogical(function name, argument1, argument2, ...)

Function arguments:

  • function name (required): The name of the warehouse function to call.
  • argument (required): The argument(s) to pass into the warehouse function. Multiple arguments are supported.Β 

Example

A table contains a Today SKU column that returns an array of top SKU Numbers for each store and a LW Today SKU column that returns an array of top SKU Numbers from the previous week. You can pass Snowflake's ARRAYS_OVERLAP function to the CallLogical function to compare whether each store has at least one high demand SKU Number from the previous week.Β 

CallLogical("ARRAYS\_OVERLAP", \[LW Today SKU\], \[Today SKU\])

  • Return True if Today SKU and LW Today SKU arrays have at least one SKU Number in common.
Screenshot_2023-04-25_at_10.27.58_AM.png