- Getting Started
- Administration Guide
-
User Guide
- An Introduction to Wyn Enterprise
- Document Portal for End Users
-
Data Governance and Modeling
- Data Binding Concepts
-
Introduction to Data Sources
- Connect to Oracle
- Connect to SQL Server
- Connect to MySQL
- Connect to Postgres
- Connect to Snowflake
- Connect to SQLite
- Connect to DM
- Connect to TiDB
- Connect to AnalyticDB(MySQL)
- Connect to GreenPlum
- Connect to TimeScale
- Connect to Amazon Redshift
- Connect to MariaDB
- Connect to ClickHouseV2
- Connect to MonetDB
- Connect to Kingbase
- Connect to GBase8a
- Connect to GBase8s
- Connect to ClickHouse
- Connect to IBM DB2
- Connect to IBM DB2 iSeries/AS400
- Connect to Google BigQuery
- Connect to Hive (beta)
- Connect to ElasticSearch (beta)
- Connect to Hana
- Connect to Excel
- Connect to JSON
- Connect to CSV
- Connect to XML
- Connect to MongoDB
- Connect to ElasticSearchDSL
- Connect to InfluxDB
- Connect to ODBC
- Connect to OData
-
Connect to TDengine
- Introduction to Data Model
- Introduction to Direct Query Model
- Introduction to Cached Model
- Introduction to Datasets
- How To
- Secure Data Management
- Working with Resources
- Working with Reports
- Working with Dashboards
- View and Manage Documents
- Understanding Wyn Analytical Expressions
- Section 508 Compliance
- Subscribe to RSS Feed for Wyn Builds Site
- Developer Guide
Connect to TDengine
TDengine is a time series database used to read and write data at high speed in real-time. In this section, you will find information on the following topics:
To Create a TDengine
To create a TDengine in Wyn Enterprise, navigate to the Resource Portal and follow the below instructions.
Click the + icon and then, select the Create Data Source option.
Select the TDengine option from the data source list on the left or from the icon view under the RDBMS section on the right.
Fill in the database configuration information. The database configuration items are described in the table below. Click the Test Connection button to verify the data source connection. Once the connection is tested and validated, you will receive a notification of a successful connection. Click the Create button to finish.
Field
Description
Name*
The name of the data source that you want to specify.
Host*
A hostname or address.
Port*
A port number, the default is 6030.
UserName*
A user name to connect to the database.
Password*
A password of the user.
Database
Enter the database name or click the drop-down to select any.
Use Configuration String (Advanced)
Use this option to connect to the data provider through a connection string. The format of the connection string is:
Host=myHost;Port=myPort;Username=myUsername;Password=myPassword;Database=myDatabase
* Required fields
You can view the newly added data source in the Categories tab and Data Source Document Type tab of the Resource Portal.
Salient Points
Currently Wyn supports only TDengine 2. x version.
TDengine datasource is only supported in the Native Query Dataset.
It does not support Direct Model.
The connector does not support GetSchema method.
The following table lists the TDengine data type as compared to the C# data types.
TDengine Datatype
C# Datatype
Dataset Datatype
TIMESTAMP
DateTime
DateTime
INT
int
Number
BIGINT
long
Number
FLOAT
float
Number
DOUBLE
double
Number
BINARY
byte[]
String
TINYINT
sbyte
Number
BOOL
bool
Boolean
NCHAR
string
String
JSON
string
String
For more details on data types, refer to this article.
Connection configurations for TDengine:
"myHost;Port=myPort;Username=myUsername;Password=myPassword;Database=myDatabase;Charset=UTF-8;Timezone=UTC-8;"
Options supported in the connection string are listed and described in the following table,
Property Name
Mandatory
Description
Host
Yes
Host to be connected
Port
Yes
Port to be connected
Username
Yes
Username
Password
Yes
Password
Database
No
Database to be connected
Charset
No
Charset set in the system
Timezone
No
TimeZone configured in the host
Note: Timezone does not support setting decimals using UTC and GMT methods. It supports UTF-8, UTF--8.
If you need more configuration items, then you can modify the {WynInstallationDirectory}/Plugins/Dataset/TDengineDriver/taos.cfg file, where rpcForceTcp=1 is the default setting, which is more stable using TCP connections. See this help article for more information.
TDengine Connections
The GetSchema() method will return an empty table with the correct structure. The TDengine data source does not support the Preview and Table/Column mapping.
When you preview a TDengine data source, the preview will show Can not get the data source schema because the Schema information is not available. The behavior is consistent with InfluxDB, ElasticSearchDSL data sources.
The Use Table/Field Name Mapping option is not displayed on the Create Data Source page.
TDengineCommand Parameters
Since the Connector is using stmt to bind the parameters, the defined parameters need to be replaced in the query statement.
Parameter substitution rules are defined below in the table.
Parameter Type | Parameter Value | Replacement Value | Multi-value Parameter Values | Multi-value Replacement Values |
---|---|---|---|---|
Integer | -15 0 160 | -15 0 160 | -20,0,15 | -20,0,15 |
Float | -15.2 0.1 9.6 | -15.2 0.1 9.6 | -15.2,0.1,9.6 | -15.2,0.1,9.6 |
Guid | 00000000-0000-0000-0000- 000000000000 a3b324e2-7549-432a-a4e7-dc2faddaceaa | '00000000-0000-0000-0000- 000000000000' 'a3b324e2-7549-432a-a4e7-dc2faddaceaa' | 00000000-0000-0000-0000-000000000000,a3b324e2-7549-432a-a4e7-dc2faddaceaa | '00000000-0000-0000-0000-000000000000','a3b324e2-7549-432a-a4e7-dc2faddaceaa' |
DateTime | 2023-02-22 14:48:07 | '2023-02-22 14:48:07' | 2023-02-22 14:48:07,2023-02-22 14:48:08 | '2023-02-22 14:48:07','2023-02-22 14:48:08' |
Date | 2023-02-22 | '2023-02-22' | 2023-02-22,2023-02-23 | '2023-02-22','2023-02-23' |
Boolean | True False | true false | true,false | true,false |
String | hello | 'hello' | hello,tdengine | 'hello','tdengine' |
Listed below is the format of parameters in the query statement:
The parameter must be prefixed with "@".
The parameter must start with a letter or an underscore.
The parameter can only contain letters, numbers, and underscores.
If the query statement needs to use the "@" symbol to express a non-parameter statement, then you need to add "" before the "@" symbol.
Note: CommandTimeout is not supported.
TDengine Limitations
Listed below are the limitations of TDengine.
Since the. NET connector interface requires the taos.dll file, so before executing the application, you need to copy the taos.dll file in the Windows {client_install_directory}/driver directory to the folder where the .NET project finally generated the .exe executable file. After running the exe file, you can access the TDengine database and do operations such as insert and query(This step can be skipped if the client has been installed on your machine).
TDengine datasource provides the driver version 2.6.0.34, when your TDengine version is different, you need to replace the driver file manually.
TDengine uses FQDN (usually hostname)as the ID for a node. To make the system work, you need to configure the FQDN for the server running taosd, and configure the DNS service or hosts file on the machine where the application or TDengine CLI runs to ensure that the FQDN can be resolved. Refer to this article for more details.
The C# connector supports: Linux 64/Windows x64/Windows x86. Refer to this article for C# connector support.