Skip to main content

taosc Reference

The TDengine client driver provides all the APIs needed for application programming and plays an important role in the distributed computing across the entire cluster. In addition to the API and its specific parameters, the behavior of the client driver can also be globally controlled through a configuration file. This section lists the configuration parameters that can be used by the TDengine client.

Configuration Parameters

Parameter NameSupported VersionDynamic ModificationDescription
firstEpSupported, effective immediatelyAt startup, the endpoint of the first dnode in the cluster to actively connect to, default value: hostname:6030, if the server's hostname cannot be obtained, it is assigned to localhost
secondEpSupported, effective immediatelyAt startup, if the firstEp cannot be connected, try to connect to the endpoint of the second dnode in the cluster, no default value
compressMsgSizeSupported, effective immediatelyWhether to compress RPC messages; -1: no messages are compressed; 0: all messages are compressed; N (N>0): only messages larger than N bytes are compressed; default value -1
shellActivityTimerNot supportedThe duration in seconds for the client to send heartbeats to mnode, range 1-120, default value 3
numOfRpcSessionsSupported, effective immediatelyMaximum number of connections supported by RPC, range 100-100000, default value 30000
numOfRpcThreadsNot supportedNumber of threads for RPC to send and receive data, range 1-50, default value is half of the CPU cores
numOfTaskQueueThreadsNot supportedNumber of threads for the client to handle RPC messages, range 4-16, default value is half of the CPU cores
timeToGetAvailableConnCancelled after 3.3.4.*Not supportedThe longest waiting time to get an available connection, range 10-50000000, in milliseconds, default value 500000
useAdapterSupported, effective immediatelyInternal parameter, whether to use taosadapter, affects CSV file import
shareConnLimitAdded in 3.3.4.0Not supportedInternal parameter, the number of queries a link can share, range 1-256, default value 10
readTimeoutAdded in 3.3.4.0Not supportedInternal parameter, minimum timeout, range 64-604800, in seconds, default value 900
Parameter NameSupported VersionDynamic ModificationDescription
countAlwaysReturnValueSupported, effective immediatelyWhether the count/hyperloglog function returns a value when the input data is empty or NULL; 0: returns an empty row, 1: returns; default value 1; when this parameter is set to 1, if the query contains an INTERVAL clause or the query uses TSMA, and the corresponding group or window has empty or NULL data, the corresponding group or window will not return a query result; note that this parameter should be consistent between client and server
keepColumnNameSupported, effective immediatelyAutomatically sets the alias to the column name (excluding the function name) when querying with Last, First, LastRow functions without specifying an alias, thus the order by clause will automatically refer to the column corresponding to the function; 1: automatically sets the alias to the column name (excluding the function name), 0: does not automatically set an alias; default value: 0
multiResultFunctionStarReturnTagsAfter 3.3.3.0Supported, effective immediatelyWhen querying a supertable, whether last(*)/last_row(*)/first(*) returns tag columns; when querying basic tables, subtables, it is not affected by this parameter; 0: does not return tag columns, 1: returns tag columns; default value: 0; when this parameter is set to 0, last(*)/last_row(*)/first(*) only returns the ordinary columns of the supertable; when set to 1, it returns both the ordinary columns and tag columns of the supertable
metaCacheMaxSizeSupported, effective immediatelySpecifies the maximum size of metadata cache for a single client, in MB; default value -1, meaning unlimited
maxTsmaCalcDelaySupported, effective immediatelyThe allowable delay for tsma calculation by the client during query, range 600s - 86400s, i.e., 10 minutes - 1 day; default value: 600 seconds
tsmaDataDeleteMarkSupported, effective immediatelyThe retention time for intermediate results of historical data calculated by TSMA, in milliseconds; range >= 3600000, i.e., at least 1h; default value: 86400000, i.e., 1d
queryPolicySupported, effective immediatelyExecution strategy for query statements, 1: only use vnode, do not use qnode; 2: subtasks without scan operators are executed on qnode, subtasks with scan operators are executed on vnode; 3: vnode only runs scan operators, all other operators are executed on qnode; default value: 1
queryTableNotExistAsEmptySupported, effective immediatelyWhether to return an empty result set when the queried table does not exist; false: returns an error; true: returns an empty result set; default value false
querySmaOptimizeSupported, effective immediatelyOptimization strategy for sma index, 0: do not use sma index, always query from original data; 1: use sma index, directly query from pre-calculated results for eligible statements; default value: 0
queryPlannerTraceSupported, effective immediatelyInternal parameter, whether the query plan outputs detailed logs
queryNodeChunkSizeSupported, effective immediatelyInternal parameter, chunk size of the query plan
queryUseNodeAllocatorSupported, effective immediatelyInternal parameter, allocation method of the query plan
queryMaxConcurrentTablesNot supportedInternal parameter, concurrency number of the query plan
enableQueryHbSupported, effective immediatelyInternal parameter, whether to send query heartbeat messages
minSlidingTimeSupported, effective immediatelyInternal parameter, minimum allowable value for sliding
minIntervalTimeSupported, effective immediatelyInternal parameter, minimum allowable value for interval
Parameter NameSupported VersionDynamic ModificationDescription
smlChildTableNameSupported, effective immediatelyKey for custom child table name in schemaless, no default value
smlAutoChildTableNameDelimiterSupported, effective immediatelyDelimiter between schemaless tags, concatenated as the child table name, no default value
smlTagNameSupported, effective immediatelyDefault tag name when schemaless tag is empty, default value "_tag_null"
smlTsDefaultNameSupported, effective immediatelyConfiguration for setting the time column name in schemaless auto table creation, default value "_ts"
smlDot2UnderlineSupported, effective immediatelyConverts dots in supertable names to underscores in schemaless
maxInsertBatchRowsSupported, effective immediatelyInternal parameter, maximum number of rows per batch insert
Parameter NameSupported VersionDynamic ModificationDescription
timezoneSupported, effective immediatelyTime zone; defaults to dynamically obtaining the current system time zone setting
localeSupported, effective immediatelySystem locale and encoding format, defaults to system settings
charsetSupported, effective immediatelyCharacter set encoding, defaults to system settings
Parameter NameSupported VersionDynamic ModificationDescription
tempDirSupported, effective immediatelySpecifies the directory for generating temporary files during operation, default on Linux platform is /tmp
minimalTmpDirGBSupported, effective immediatelyMinimum space required to be reserved in the directory specified by tempDir, in GB, default value: 1
Parameter NameSupported VersionDynamic ModificationDescription
logDirNot supportedLog file directory, operational logs will be written to this directory, default value: /var/log/taos
minimalLogDirGBSupported, effective immediatelyStops writing logs when the disk space available in the log directory is less than this value, in GB, default value: 1
numOfLogLinesSupported, effective immediatelyMaximum number of lines allowed in a single log file, default value: 10,000,000
asyncLogSupported, effective immediatelyLog writing mode, 0: synchronous, 1: asynchronous, default value: 1
logKeepDaysSupported, effective immediatelyMaximum retention time for log files, in days, default value: 0, meaning unlimited retention. Log files will not be renamed, nor will new log files be rolled out, but the content of the log files may continue to roll depending on the log file size setting; when set to a value greater than 0, the log file will be renamed to taoslogx.yyy, where yyy is the timestamp of the last modification of the log file, and a new log file will be rolled out
debugFlagSupported, effective immediatelyLog switch for running logs, 131 (output error and warning logs), 135 (output error, warning, and debug logs), 143 (output error, warning, debug, and trace logs); default value 131 or 135 (depending on the module)
tmrDebugFlagSupported, effective immediatelyLog switch for the timer module, value range as above
uDebugFlagSupported, effective immediatelyLog switch for the utility module, value range as above
rpcDebugFlagSupported, effective immediatelyLog switch for the rpc module, value range as above
jniDebugFlagSupported, effective immediatelyLog switch for the jni module, value range as above
qDebugFlagSupported, effective immediatelyLog switch for the query module, value range as above
cDebugFlagSupported, effective immediatelyLog switch for the client module, value range as above
simDebugFlagSupported, effective immediatelyInternal parameter, log switch for the test tool, value range as above
tqClientDebugFlagAfter 3.3.4.3Supported, effective immediatelyLog switch for the client module, value range as above
Parameter NameSupported VersionDynamic ModificationDescription
crashReportingSupported, effective immediatelyWhether to upload crash to telemetry, 0: do not upload, 1: upload; default value: 1
enableCoreFileSupported, effective immediatelyWhether to generate a core file when crashing, 0: do not generate, 1: generate; default value: 1
assertNot supportedAssertion control switch, default value: 0
configDirNot supportedDirectory for configuration files
scriptDirNot supportedInternal parameter, directory for test cases
randErrorChanceAfter 3.3.3.0Not supportedInternal parameter, used for random failure testing
randErrorDivisorAfter 3.3.3.0Not supportedInternal parameter, used for random failure testing
randErrorScopeAfter 3.3.3.0Not supportedInternal parameter, used for random failure testing
safetyCheckLevelAfter 3.3.3.0Not supportedInternal parameter, used for random failure testing
simdEnableAfter 3.3.4.3Not supportedInternal parameter, used for testing SIMD acceleration
AVX512EnableAfter 3.3.4.3Not supportedInternal parameter, used for testing AVX512 acceleration
bypassFlagAfter 3.3.4.5Supported, effective immediatelyInternal parameter, used for short-circuit testing
Parameter NameSupported VersionDynamic ModificationDescription
enableScienceNot supportedWhether to enable scientific notation for displaying floating numbers; 0: do not enable, 1: enable; default value: 1

API

Please refer to Connector