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 VersionDescription
firstEpAt 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
secondEpAt startup, if the firstEp cannot be connected, try to connect to the endpoint of the second dnode in the cluster, no default value
compressMsgSizeWhether 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
shellActivityTimerThe duration in seconds for the client to send heartbeats to mnode, range 1-120, default value 3
numOfRpcSessionsMaximum number of connections supported by RPC, range 100-100000, default value 30000
numOfRpcThreadsNumber of threads for RPC to send and receive data, range 1-50, default value is half of the CPU cores
numOfTaskQueueThreadsNumber 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.*The longest waiting time to get an available connection, range 10-50000000, in milliseconds, default value 500000
useAdapterInternal parameter, whether to use taosadapter, affects CSV file import
shareConnLimitAdded in 3.3.4.0Internal parameter, the number of queries a link can share, range 1-256, default value 10
readTimeoutAdded in 3.3.4.0Internal parameter, minimum timeout, range 64-604800, in seconds, default value 900
Parameter NameSupported VersionDescription
countAlwaysReturnValueWhether 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
keepColumnNameAutomatically 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.0When 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
metaCacheMaxSizeSpecifies the maximum size of metadata cache for a single client, in MB; default value -1, meaning unlimited
maxTsmaCalcDelayThe allowable delay for tsma calculation by the client during query, range 600s - 86400s, i.e., 10 minutes - 1 day; default value: 600 seconds
tsmaDataDeleteMarkThe 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
queryPolicyExecution 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
queryTableNotExistAsEmptyWhether 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
querySmaOptimizeOptimization 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
queryPlannerTraceInternal parameter, whether the query plan outputs detailed logs
queryNodeChunkSizeInternal parameter, chunk size of the query plan
queryUseNodeAllocatorInternal parameter, allocation method of the query plan
queryMaxConcurrentTablesInternal parameter, concurrency number of the query plan
enableQueryHbInternal parameter, whether to send query heartbeat messages
minSlidingTimeInternal parameter, minimum allowable value for sliding
minIntervalTimeInternal parameter, minimum allowable value for interval
Parameter NameSupported VersionDescription
smlChildTableNameKey for custom child table name in schemaless, no default value
smlAutoChildTableNameDelimiterDelimiter between schemaless tags, concatenated as the child table name, no default value
smlTagNameDefault tag name when schemaless tag is empty, default value "_tag_null"
smlTsDefaultNameConfiguration for setting the time column name in schemaless auto table creation, default value "_ts"
smlDot2UnderlineConverts dots in supertable names to underscores in schemaless
maxInsertBatchRowsInternal parameter, maximum number of rows per batch insert
Parameter NameSupported VersionDescription
timezoneTime zone; defaults to dynamically obtaining the current system time zone setting
localeSystem locale and encoding format, defaults to system settings
charsetCharacter set encoding, defaults to system settings
Parameter NameSupported VersionDescription
tempDirSpecifies the directory for generating temporary files during operation, default on Linux platform is /tmp
minimalTmpDirGBMinimum space required to be reserved in the directory specified by tempDir, in GB, default value: 1
Parameter NameSupported VersionDescription
logDirLog file directory, operational logs will be written to this directory, default value: /var/log/taos
minimalLogDirGBStops writing logs when the disk space available in the log directory is less than this value, in GB, default value: 1
numOfLogLinesMaximum number of lines allowed in a single log file, default value: 10,000,000
asyncLogLog writing mode, 0: synchronous, 1: asynchronous, default value: 1
logKeepDaysMaximum 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
debugFlagLog 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)
tmrDebugFlagLog switch for the timer module, value range as above
uDebugFlagLog switch for the utility module, value range as above
rpcDebugFlagLog switch for the rpc module, value range as above
jniDebugFlagLog switch for the jni module, value range as above
qDebugFlagLog switch for the query module, value range as above
cDebugFlagLog switch for the client module, value range as above
simDebugFlagInternal parameter, log switch for the test tool, value range as above
tqClientDebugFlagAfter 3.3.4.3Log switch for the client module, value range as above
Parameter NameSupported VersionDescription
crashReportingWhether to upload crash to telemetry, 0: do not upload, 1: upload; default value: 1
enableCoreFileWhether to generate a core file when crashing, 0: do not generate, 1: generate; default value: 1
assertAssertion control switch, default value: 0
configDirDirectory for configuration files
scriptDirInternal parameter, directory for test cases
randErrorChanceAfter 3.3.3.0Internal parameter, used for random failure testing
randErrorDivisorAfter 3.3.3.0Internal parameter, used for random failure testing
randErrorScopeAfter 3.3.3.0Internal parameter, used for random failure testing
safetyCheckLevelAfter 3.3.3.0Internal parameter, used for random failure testing
simdEnableAfter 3.3.4.3Internal parameter, used for testing SIMD acceleration
AVX512EnableAfter 3.3.4.3Internal parameter, used for testing AVX512 acceleration
Parameter NameSupported VersionDescription
enableScienceWhether to enable scientific notation for displaying floating numbers; 0: do not enable, 1: enable; default value: 1

API

Please refer to Connector