Skip to main content

Detector

Defined in: js-api/src/data.ts:453

Constructors​

Constructor​

new Detector(): Detector

Returns​

Detector

Methods​

sampleCategories()​

static sampleCategories(column, check, min?, max?, ratio?, minStringLength?): boolean

Defined in: js-api/src/data.ts:462

Calls [check] function against a random subset of the column values, returns true if all checks return true. Useful for the efficient auto-detection of the column semantic type.

Parameters​

ParameterTypeDefault valueDescription
columnColumnundefined-
checkStringPredicateundefined-
minnumber5minimum number of categories. Returns false if less than that.
maxnumber10number of checks to make
rationumber1[0-1] range: minimum allowed number of the success/total checks.
minStringLengthnumber1values shorter than that are not considered checks

Returns​

boolean