SQL Client / Configuring SQL Client
In this video of our N3uron Academy, we’ll explore how to configure the N3uron SQL Client module to connect to an SQL database. Let’s get started!
[04:54] Configuring SQL Client
[00:00] Hello everyone! In this video, we’ll explore how to configure the N3uron SQL Client module to connect to an SQL database. For this example, we’ll use a connection to a PostgreSQL database. We’ll focus on setting up the connection and configuring SQL Client to establish communication with the database. In upcoming videos, we’ll move on to executing SQL queries like SELECT, INSERT, UPDATE, or DELETE. If you’re looking for more in-depth technical details, be sure to check out the N3uron Knowledge Base. To begin, let’s create a new instance of the SQL Client module. Navigate to the “Config” tab under the “System” section, click on “Modules”, and then select “New module”. Let’s name this instance “SqlClient”, and set the Module type to “SqlClient”. Once that’s done, we’ll leave the rest of the parameters at their default values and click Save.
[01:04] Now that the module has been created, you’ll find it listed in the Explorer panel. Click on it, and from the Model header, open the menu and select “New Channel”. This channel defines the connection to the database. Let’s name it “db_connector”. Let’s move on to the configuration. First, make sure “Enable data collection” is set to Yes, which is enabled by default. This ensures that the SQL Client will actively communicate with the database. Under the Timing section, we have three parameters. “Query timeout” is set to 3000 milliseconds, which defines the maximum amount of time the client will wait for a valid response. “Retry attempts” is set to 3, meaning the client will retry up to three times if a query fails. And “Inter-request delay” is set to 0, so there will be no delay between retry attempts. Now, in the Connector section, set the “Type” to “PostgreSQL”. Within the Config section, you’ll find the Connection settings
[02:01] One useful feature here is the Connection String Helper, represented by the icon next to the “Config” label. Clicking this icon allows you to paste a pre-built connection string, which can auto-fill the connection settings. This is especially helpful when copying parameters directly from an external database client or documentation. If you prefer to configure the connection manually, start by setting the “Host” to 127.0.0.1, which indicates that the database is running locally. The “Port” is set to 5434, which is the port used by our PostgreSQL instance in this case. The “Default database” is set to “postgres”. Just below that, you’ll see the “Parameters” field. This allows you to define additional connection parameters as a single string. These can include settings like SSL modes, application names, or time zone preferences—depending on what your database setup requires. If you don’t need any custom options, you can leave this field blank.
[03:00] Following that, we have three timeout settings. “Connection timeout” is set to 15000 milliseconds, which defines how long the client will wait when trying to establish a connection. “Idle timeout” is set to 30000 milliseconds, after which inactive connections will automatically be closed to reduce server load. “Reconnect delay” is set to 60000 milliseconds, meaning the client will wait one minute before trying to reconnect after a failure. Next, we’ll go into the Authentication section. Enter the username and password. Now, let’s take a look at the SSL section. While SSL isn’t used in this example, it’s available for secure connections if needed. You can choose between Embedded, to upload certificate files through the WebUI, or File path, to reference them directly from the file system. The “Reject unauthorized” option is set to No, meaning the client will accept self-signed or unverified certificates, suitable for testing environments. For production, it’s recommended to set this to Yes and provide a valid CA certificate.
[04:03] At the bottom, you’ll find fields for the CA certificate, private key, and client certificate—used only if your database requires SSL authentication. Once all the required fields have been completed, go ahead and click Save to apply the configuration. To verify that everything is working correctly, navigate to the “Diagnostics” tab, open the “Modules” dropdown, and look for the SQL Client module. If everything has been configured properly, you’ll see a “PostgreSQL connection OK” message, which confirms that the channel “db_connector” has successfully connected to the PostgreSQL database. And that’s it for the configuration of the SQL Client module. You now have a working connection to your PostgreSQL database. Thanks for watching, and see you in the next video!
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
DLMS® UA MEMBER
N3uron is a member of the DLMS® User Association, the global community that drives standardization in the energy and water industry. Being part of the DLMS UA represents N3uron's commitment to advancing smart metering and energy management solutions.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
DLMS® UA MEMBER
N3uron is a member of the DLMS® User Association, the global community that drives standardization in the energy and water industry. Being part of the DLMS UA represents N3uron's commitment to advancing smart metering and energy management solutions.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]