and serves two distinct purposes in Envision.
(boolean and boolean) 🡒 boolean
When found in an expression,
and is the logical AND operator.
table T = with [| as A, as B |] [| false, false |] [| false, true |] [| true, false |] [| true, true |] show table "" a1b4 with T.A T.B T.A and T.B
and, multi-table reads
When found at the end of a
and introduces a second
read statement. This allows to have the content of the same files injected into several tables.
table Variants = with [| as Product, as Color |] [| "shirt", "white" |] [| "shirt", "pink" |] [| "pants", "blue" |] [| "pants", "black" |] [| "hat", "red" |] show table "Variants" export: "/sample/variants.csv" with Variants.Product Variants.Color
The above script creates the flat file
read "/sample/variants.csv" as Products with Product : text and as Variants with Product : text Color : text show table "Variants" with Variants.Product Variants.Color
The above script injects
variants.csv into the tables