Duaer

Integrations

Common issues with MySQL in Duaer

Common MySQL node issues in Duaer: updating by composite key, Docker connections, and decimals as strings.

Update rows by composite key

Update matches on a single Column to Match On. When a row needs several columns to identify it, write the query with Execute SQL:

UPDATE orders SET quantity = 3 WHERE customer_id = 538 AND product_id = 800;

Cannot connect to a local MySQL server from Docker

Each Docker container has its own localhost. Set Host in the MySQL credential by setup:

  • Only MySQL in Docker: publish the port (-p 3306:3306) and use localhost.
  • Only Duaer in Docker: have MySQL listen on 0.0.0.0 and use host.docker.internal. On Linux, start the Duaer container with --add-host host.docker.internal:host-gateway.
  • Separate containers: put both on one Docker network and use the MySQL container name, such as my-mysql.
  • Same container: use localhost.

Decimal numbers returned as strings

DECIMAL values come back as strings by default to avoid losing precision. If you accept that risk, turn on Output Decimals as Numbers under Options, or convert them afterwards with Edit Fields (Set).

Questions

Why does the Duaer MySQL node return decimals as strings?

To avoid losing precision. Turn on Output Decimals as Numbers under Options on the Duaer MySQL node to get numbers.

In this section