函数分类
DolphinDB 的函数按照功能可以分为以下类别:
数据操作
-
数据类型与转换:array, arrayVector, bigarray, bool, blob, cast, ceil, char, complex, date, datehour, datetime, decimal32, decimal64, decimal128, decimalFormat, decimalMultiply, deg2rad, dict, double, duration, enlist, fixedLengthArrayVector, floor, form, format, fromJson, parsejsonTable, hex, highDouble, highLong, int, int128, ipaddr, isOrderedDict, long, lowDouble,lowLong, makeKey, makeSortedKey, matrix, minute, month, nanotime, nanotimestamp, pair, point, rad2deg, round, second, seq, set, short, string, subtuple, symbol, syncDict, temporalFormat, temporalParse, time, timestamp, toJson, toStdJson, type, typestr, uuid, indexedSeries, isIndexedSeries, isIndexedMatrix, setIndexedMatrix!, setIndexedSeries!, reverse, transpose/flip, symbolCode, parseInteger, parseInt, fromStdJson
-
追加:append!/push!, appendTuple!
-
删除、清理:removeHead!, removeTail!, pop!, drop, dropna, clear!, erase!
-
查找:tail, head, subarray, first, firstNot, ifirstNot, firstNot, firstHit, ifirstNot, ifirstHit, last, lastNot, ilastNot, milastNot, lastNot, ilastNot, col, row, at, loc, eachAt(@), binsrch, find, searchK, slice, sliceByKey, cell, cells
-
排序:sort, sort!, sortBy!, isort, isort!, isortTop, rank, denseRank, isSorted
-
空值查找、填充:hasNull, isNothing, isNull, isValid, isVoid, isNanInf, ifNull, ifValid, fill, bfill!, ffill, ffill!, interpolate, nullFill, nullFill!, fill!, lfill, lfill!, nanInfFill
-
分割:cut
-
对齐:align
分组:bucket, groups, segment, cutPoints, bar, dailyAlignedBar, volumeBar,
digitize-
加载:loadNpy, loadNpz, loadRecord, loadTable, loadText, loadTextEx, ploadText
-
编码转换:compress, decompress, oneHot, base64Decode, base64Encode, encodeShortGenomeSeq, decodeShortGenomeSeq, genShortGenomeSeq, pack, unpack, rdp
-
累积窗口:cumavg, cumbeta, cumcorr, cumcount, cumcovar, cummax, cummed, cummin, cumpercentile, cumPositiveStreak, cumprod, cumrank, cumstd, cumstdp, cumsum, cumsum2, cumsum3, cumsum4, cumvar, cumvarp, cumwavg, cumwsum, cumfirstNot, cumlastNot, cumnunique, dynamicGroupCumsum, dynamicGroupCumcount
-
m 系列:mavg, mbeta, mcorr, mcount, mcovar, mfirst, mimax, mimin, mkurtosis, mlast, mmad, mmax, mmaxPositiveStreak, mmed, mmin, mmse, mpercentile, mprod, mrank, mskew, mslr, mstd, mstdp, msum, msum2, mvar, mvarp, mwavg, mwsum, mlastNot, mifirstNot, mifirstNot, milastNot, movingWindowIndex, movingTopNIndex, mfirstNot, mlastNot, mLowRange, mTopRange
-
tm 系列:tmavg, tmbeta, tmcorr, tmcount, tmcovar, tmfirst, tmkurtosis, tmlast, tmmax, tmmed, tmmin, tmpercentile, tmprod, tmrank, tmskew, tmstd, tmstdp, tmsum, tmsum2, tmvar, tmvarp, tmwavg, tmwsum, tmTopRange, tmLowRange
-
mTopN:msumTopN, mavgTopN, mstdpTopN, mstdTopN, mvarTopN, mvarpTopN, mcorrTopN, mbetaTopN, mcovarTopN, mpercentileTopN,mwsumTopN,
-
row 系列:rowSize, rowAnd, rowOr, rowXor, rowCount, rowMax, rowMin, rowSum, rowSum2, rowAvg, rowRank, rowDenseRank, rowProd, rowSkew, rowKurtosis, rowStd, rowStdp, rowVar, rowVarp, rowCorr, rowCovar, rowBeta, rowWsum, rowWavg, rowEuclidean, rowDot, rowTanimoto, rowImin, rowImax, rowAt, rowMove, rowNext, rowPrev, rowAlign
-
TA-lib 系列:ema, ma, wma, sma, trima, tema, dema, gema, kama, wilder, t3, linearTimeTrend
-
字符串:repeat, charAt, left, right, ilike, like, strpos, regexFind, regexFindStr, concat, lpad, rpad, trim, ltrim, rtrim, strip, substr, substru, split, toCharArray, strlen, strlenu, regexCount, regexReplace, strReplace, startsWith, endsWith, initcap, upper, lower, isLower, isUpper, isTitle, regexFind, isSpace, isAlNum, isAlpha, isNumeric, isDigit, toUTF8, fromUTF8, convertEncode, stringFormat, md5, crc32
-
时间处理:localtime, gmtime, convertTZ, now, today, daysInMonth, year, month, date, weekday, businessDay, hour, microsecond, millisecond, nanosecond, yearBegin, yearEnd, quarterBegin, quarterEnd, monthBegin, monthEnd, semiMonthBegin, semiMonthEnd, weekBegin, weekEnd, businessMonthBegin, businessMonthEnd, businessQuarterBegin, businessQuarterEnd, businessYearBegin, businessYearEnd, weekOfMonth, weekOfYear, monthOfYear, hourOfDay, minuteOfHour, secondOfMinute, lastWeekOfMonth, dayOfMonth, dayOfWeek, dayOfYear, fy5253, fy5253Quarter, concatDateTime, asFreq, transFreq, temporalSeq, temporalAdd, isLeapYear, isMonthStart, isMonthEnd, isQuarterStart, isQuarterEnd, isYearStart, isYearEnd, addMarketHoliday, updateMarketHoliday, getMarketCalendar
数据库/数据表
-
库表操作:existsDatabase, existsPartition, existsTable, database, dropDatabase, saveDatabase, setAtomicLevel, setOLAPCacheEngineSize, getOLAPCacheEngineSize, setTSDBCacheEngineSize, getTSDBCacheEngineSize, setMaxMemSize, setReservedMemSize, setMaxBlockSizeForReservedMemory, setMemLimitOfTaskGroupResult, getMemLimitOfTaskGroupResult, setMemLimitOfQueryResult, getMemLimitOfQueryResult, resetRecoveryWorkerNum, getRecoveryWorkerNum, getRecoveryTaskStatus, enableActivePartition, disableActivePartition, enableTSDBAsyncSorting, disableTSDBAsyncSorting, enableQueryMonitor, disableQueryMonitor, setMaxConnections, columnNames, rowNames, table, cachedTable, createTable, createDimensionTable, createPartitionedTable, createDistributedInMemoryTable, createIPCInMemoryTable, indexedTable, keyedTable, latestIndexedTable, latestKeyedTable, mvccTable, dropTable, dropDistributedInMemoryTable, dropIPCInMemoryTable, loadDistributedInMemoryTable, loadIPCInMemoryTable, loadTableBySQL, loadMvccTable, saveTable, savePartition, saveDualPartition, rename!, renameTable, rowNo, setColumnComment, replay, schema, getConfigure/getConfig, getAllDBs, getTables, getTablet, getTabletsMeta, getTSDBMetaData, getDFSDatabases, getClusterDFSDatabases, getDFSTablesByDatabase, getClusterDFSTables, getChunkPath, getChunksMeta, getClusterChunksStatus, getFunctionViews, getTSDBCompactionTaskStatus, getOLAPCachedSymbolBaseMemSize, getTSDBCachedSymbolBaseMemSize, getTransactionStatus, getUnresolvedTxn, getAllDBGranularity, triggerTSDBCompaction, flushTSDBCache, purgeCacheEngine / flushOLAPCache, getLevelFileIndexCacheStatus, getOLAPCacheEngineStat, getTSDBCacheEngineSize, getRedoLogGCStat, addFunctionView, dropFunctionView, addRangePartitions, addValuePartitions, dropPartition, extractTextSchema, tableInsert, addColumn, update!, upsert!, tableUpsert, reorderColumns!, replaceColumn!, dropColumns!, truncate, imr, mr, tupleSum, cacheDS!, cacheDSNow, clearDSCache!, clearDSCacheNow, multiTableRepartitionDS, textChunkDS, repartitionDS, replayDS, sqlDS, transDS!, backup, backupDB, backupTable, migrate, restore, restoreDB, restoreTable, loadBackup, getBackupList, getBackupMeta, getBackupStatus, checkBackup, setMemLimitOfTempResult
-
catalog相关操作:createCatalog, createSchema, dropCatalog, dropSchema, existsCatalog, getCurrentCatalog, getAllCatalogs, getSchemaByCatalog, renameCatalog, renameSchema, setDefaultCatalog
-
集群操作:addNode, addVolumes, startDataNode, stopDataNode, triggerNodeReport, suspendRecovery, resumeRecovery, cancelRecoveryTask, rebalanceChunksAmongDataNodes, ebalanceChunksWithinDataNode, restoreDislocatedTablet, copyReplicas, deleteReplicas, moveReplicas, startClusterReplication, stopClusterReplication, skipClusterReplicationTask, getMasterReplicationStatus, getSlaveReplicationStatus, getSlaveReplicationQueueStatus, setDatabaseForClusterReplication, getDatabaseClusterReplicationStatus, getRecentSlaveReplicationInfo, moveChunksAcrossVolume, resetDBDirMeta, pnodeRun, getActiveMaster, getConnections, getNodeAlias, getNodeHost, getNodePort, getNodeType, getActiveMaster, isControllerInitialized, isDataNodeInitialized, xdb, rpc, remoteRun, remoteRunWithCompression, setTimeoutTick
SQL
-
关键字:select, create, alter, any/all, case, exec, coalesce, where, having, nullIf, top, limit, sample, delete, distinct, insert into, update, drop, pivot by, context by, cgroup by, group by, order by, partition, unpivot, interval, map, union/union all, with, is null, between, exists, in, like/LIKE, [HINT_EXPLAIN], SQL Trace
-
表连接:cj, ej, sej, lj (left join), lsj (left semi join), fj (full join), right join, aj, wj, pwj, pj, inner join
-
状态查看:setTraceMode, getTraces, viewTraceInfo, getCompletedQueries, getRunningQueries, getQueryStatus
数学和统计
-
abs, neg, signum, add, div, mul, ratio, mod, square, pow, sqrt, cbrt, log, log2, log10, log1p, exp, exp2, expm1, reciprocal, derivative, integral, iterate, polynomial, cos, cosh, acos, acosh, sin, sinh, asin, asinh, tan, tanh, atan, atanh, linprog, qclp, scs, quadprog, solve, gramSchmidt, brentq, polyFit, poly1d, cubicSpline, cubicSplinePredict, osqp, socp, clip, clip!, signbit, kroghInterpolate
med, mmed, var, ewmVar, varp, covar, wcovar, ewmCov, covarMatrix, corrMatrix, std, ewmStd, stdp, percentChange, percentile, percentileRank, quantile, quantileSeries, max, maxIgnoreNull, imax, atImax, mimax, min, minIgnoreNull, imin, atImin, summary, isPeak, isValley, mean, ewmMean, demean, avg, wavg, dot, prod, sum, sum2, sum3, sum4, wsum, contextSum, contextSum2, corr, ewmCorr, acf, autocorr, sem, mad, kurtosis, skew, beta, mutualInfo, spearmanr, euclidean, rowEuclidean, tanimoto, rowTanimoto, cdfBeta, invBeta, randBeta, cdfBinomial, invBinomial, randBinomial, cdfChiSquare, invChiSquare, chiSquareTest, randChiSquare, cdfExp, invExp, randExp, cdfF, invF, fTest, randF, cdfGamma, invGamma, randGamma, cdfKolmogorov, cdfLogistic, invLogistic, randLogistic, norm/normal, cdfNormal, invNormal, zTest, randNormal, randMultivariateNormal, cdfPoisson, invPoisson, randPoisson, cdfStudent, invStudent, randStudent, tTest, cdfUniform, invUniform, rand, randDiscrete, randUniform, cdfWeibull, invWeibull, randWeibull, cdfZipf, mannWhitneyUTest, shapiroTest, ksTest, predict, adaBoostClassifier, adaBoostRegressor, randomForestClassifier, randomForestRegressor, gaussianNB, multinomialNB, logisticRegression, glm, gmm, kmeans, knn, elasticNet, lasso, lassoBasic, ridge, elasticNetCV, lassoCV, ridgeBasic, pca, ols, olsEx, wls, residual, mmse, msl, anova, manova, iterate, count, cols, rows, size, wc, nunique, cumnunique, shape, coevent, countNanInf, bucketCount, contextCount, topRange, lowRange, sumbars, stat, esd, seasonalEsd, dynamicGroupCumcount, dynamicGroupCumsum, lu, svd, qr, schur, imaxLast, iminLast, mimaxLast, miminLast, rowImaxLast, rowIminLast, kendall, lowerBound
fmin-
distinct, distance, difference, valueChanged, maxPositiveStreak, cumPositiveStreak, mmaxPositiveStreak, det, diag, eig, tril, triu, inverse, cholesky, gram, repmat, sub, intersection, symmetricDifference, keys, values, dictUpdate!,winsorize, winsorize!, resample, spline, neville, dividedDifference, splrep, splev, loess, talibNull, copy, asis, stl, trueRange, zigzag, zscore, crossStat, linearTimeTrend, deltas, ratios, tmove, asof, mode, ilike , all, any, iif, isDuplicated, isMonotonicIncreasing/isMonotonic, isMonotonicDecreasing, mask, convertExcelFormula, hashBucket, objectChecksum, sessionWindow
-
bondAccrInt, bondDuration, bondConvexity, bondDirtyPrice, adfuller, coint, VaR, CVaR, nss, nsspredict
运算符
流数据
-
streamTable, haStreamTable, keyedStreamTable, share, appendMsg, appendForJoin, subscribeTable, unsubscribeTable, existsSubscriptionTopic, addMetrics, dropStreamTable, clearTablePersistence, removeTopicOffset, enableTableShareAndPersistence, enableTablePersistence, disableTablePersistence, setStreamTableFilterColumn, getStreamTables, existsStreamTable, setStreamTableTimestamp
-
计算引擎:createTimeSeriesEngine, createAnomalyDetectionEngine, createAsofJoinEngine, createCrossSectionalEngine, createDailyTimeSeriesEngine, createEquiJoinEngine / createEqualJoinEngine, createLeftSemiJoinEngine, createReactiveStateEngine, createNarrowReactiveStateEngine, createDualOwnershipReactiveStateEngine, createSessionWindowEngine, createRuleEngine, createWindowJoinEngine, createLookupJoinEngine, streamEngineParser, dropStreamEngine / dropAggregator, registerSnapshotEngine, unregisterSnapshotEngine, warmupStreamEngine, createOrderBookSnapshotEngine
-
stateIterate, conditionalIterate, getLeftStream/getRightStream, getStreamEngine/getAggregator, getStreamEngineStat/getAggregatorStat, getPersistenceMeta, getSnapshotMsgId, getStreamingStat, getStreamingLeader, getStreamingRaftGroups, getStreamTableFilterColumn, getPersistenceMeta, getSnapshotMsgId, getSubscriptionTopic, getTopicProcessedOffset, addReactiveMetrics, getReactiveMetrics
元编程
高阶函数
accumulate (:A), aggrTopN, all, any, byColumn (:V), byRow (:H), call, contextby (:X), cross (:C)/pcross, each (:E), eachLeft (:L), eachPre (:P), eachRight (:R), eachPost (:O), groupby (:G), loop (:U) / ploop, moving, nullCompare, pivot, pcall, reduce (:T), rolling, segmentby, talib, tmoving, twindow, window, withNullFill, unifiedCall, rowGroupby
权限与安全
getGroupAccess, getGroupsByUserId, getUserAccess, getUserList, getUsersByGroupId, resetPwd, changePwd, login, logout, isLoggedIn, createGroup, deleteGroup, createUser, deleteUser, addGroupMember, deleteGroupMember, deny, grant, revoke, addAccessControl, getGroupAccess, getGroupsByUserId, getUserAccess, getUserList, getUsersByGroupId, getAuthenticatedUsers, getGroupList, backupSettings, restoreSettings
文件系统
file, files, fflush, mkdir, rm, rmdir, close, cleanOutdateLogFiles, exists, seek, read!, readBytes, readLine, readLines, readLines!, readObject, readRecord!, write, writeBytes, writeLine, writeLines, writeRecord, saveText, saveTextFile, saveAsNpy, writeLog, writeLogLevel, writeObject, loadModel, saveModel
系统管理
getSupportBundle, license, version, updateLicense, getLicenseExpiration, getMachineFingerprint, getLicenseServerResourceInfo, getRegisteredNodeInfo, pipeline, setRandomSeed, setRetentionPolicy, setSystem, setLogLevel, imtUpdateChunkVersionOnDataNode, imtForceGCRedolog, syntax, partial, defined, defs, undef, refCount, member, objs, objByName, closeSessions, getSessionMemoryStat, getCurrentSessionAndUser, loadPlugin, module, use, loadModule, saveModule, loadModuleFromScript, listRemotePlugins, installPlugin, timer, evalTimer, scheduleJob, submitJob, submitJobEx2, submitJobEx, cancelJob, cancelConsoleJob, deleteScheduledJob, setMaxJobParallelism, setMaxJobPriority, getConsoleJobs, getJobMessage, getJobReturn, getJobStat, getJobStatus, getRecentJobs, getScheduledJobs, getPerf, getClusterPerf, getTSDBDataStat, enableResourceTracking, disableResourceTracking, getUserHardwareUsage, getUserTableAccessRecords, setDatanodeRestartInterval, getDatanodeRestartInterval, getDynamicConfig, setDynamicConfig, getTSDBTableIndexCacheStatus