small

small, contextual keyword

The small keyword declares that a table is expected to fit within one page. If the table exceeds the specified thresholds, a warning or error is raised.

Example (read)

read "/sample/products.csv" as Products small 2 .. 10 with
  Product : text

show table "My Products" with
  Products.Product

Example (table and expect)

table T small 2 .. 10 = with
  [| as A |]
  [| "b" |]
  [| "c" |]
  [| "a" |]

expect table T small 100

show table "Values" with
  T.A

Remarks

The lower bound is the warning threshold, the upper bound is the error threshold. The shorthand small 10 means small 1 .. 10. The upper bound cannot exceed small 100m; larger values are rejected.

Small tables can:

Line limits for small tables

The compiler enforces limits based on the most restrictive vector type:

If a small table contains… The line limit is…
only scalar-friendly types 100 million
at least one text vector 2.75 million
at least one ranvar/zedfunc/embedding vector 1 million

Tables with fewer than 1 million lines automatically qualify as small, including Scalar, Day, Week, Month, Slices, and Files.

See also

User Contributed Notes
0 notes + add a note