Projects an existing Spark table, aliases an optional response to label,
and assembles the supplied predictors into a dense features vector in
their supplied order. Identification columns are retained alongside the
vectors.
Arguments
- sc
A Spark connection created by
sparklyr::spark_connect().- chr_feat_merge_sptmpl
character(1). Name of a table already registered in Spark. It must contain
site_id,time,lon,lat, any supplied response, and the supplied numeric predictor columns.- chr_feat_merge_xvar
Character vector of numeric predictor names, selected by the caller. Their order determines the positions in the feature vector and must match the order used to train the model.
- yvar
Optional character(1) response column name, aliased to
label. UseNULLwhen assembling prediction data without a response.- config
Configuration list, such as that returned by
spark_environment(), containingint_maxrows. A value of 0 applies no row limit; a positive value applies SQLLIMITwithout an ordering clause.
Value
A registered Spark table with columns site_id, time, lon,
lat, and features, plus label when yvar is supplied. The features
column contains dense vectors with one entry per supplied predictor, in
the supplied order.