Databricks SDK for JavaScript
    Preparing search index...

    Interface ApproxCountDistinctFunction

    Computes the approximate count of distinct values.

    interface ApproxCountDistinctFunction {
        input?: string;
        relativeError?: number;
        relativeSd?: number;
    }
    Index

    Properties

    input?: string

    The input column from which the approximate count of distinct values is computed.

    relativeError?: number

    The error the user accepts, as a fraction of the count, between 0.02 (by default) and 0.3. This is one standard error of the estimate, the same meaning as Spark's relativeSD: 0.02 means the result is within ±2% of the true count about 68% of the time (one standard deviation covers 68% of the region). Feature Store picks the sketch size that gives this relative error. If neither relative_error nor relative_sd is set, 0.02 is default chosen at feature creation.

    relativeSd?: number

    The maximum relative standard deviation allowed (default defined by Spark). Deprecated: use relative_error. When relative_error is set, reads return the same value here for clients that don't have relative_error, and a request may only send that value.