CallLogical

View as Markdown

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.

CallLogical is a passthrough function.

The functions that can be used with a passthrough function depend on your connected data platform’s native SQL functions. For example, on Snowflake connections, browse the Snowflake SQL function reference to find functions that return a value that matches the datatype of the passthrough function.

With CallLogical, you can use a function that returns a boolean value.

This function isn’t compatible with all data platform connections. To check if your connection supports it, see Supported data platforms and feature compatibility.

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.