# Show data on ui-table coming from SQL database

**URL:** <https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573>\
**Category:** General\
**Created:** [9 March 2022 09:20 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573 "2022-03-09T09:20:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![QGIO](https://avatars.discourse-cdn.com/v4/letter/q/f17d59/32.png) [@QGIO](https://discourse.nodered.org/u/QGIO)\
**Post date:** [9 March 2022 09:20 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/1 "2022-03-09T09:20:21Z")

</div>

Hello, I'm new in node-red and javascript.  
I have created a flow able to make a connection to a SQL database and select the first row of a specific table.

\</\>

 ![immagine](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0e069fb89e81dfc563a28fdf9134b7d72105bdde.png)

I correctly see in the payload data of the first row of the database table.

\</\>  
 ![immagine](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/85909e1484351a6e10e7c5184d82a16dacb5ceb8.png)

My question is: how can I show this data in the UI table (I have created it by dashboard ui-table) ?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 March 2022 09:49 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/2 "2022-03-09T09:49:00Z")

</div>

Welcome to the forum Gio!

Have you read the 'README' for the node? ([node-red-node-ui-table (node) - Node-RED](https://flows.nodered.org/node/node-red-node-ui-table))

What problem are you having converting the data to the format the `ui-table` needs? Show us what you have tried.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 March 2022 10:10 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/3 "2022-03-09T10:10:57Z")

</div>

If you haven't already done so then I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot in about 1 hour. A small investment for a lot of gain.

Also then study in particular the node red docs Working with Messages

---

<div class="post-metadata">

**Author:** ![QGIO](https://avatars.discourse-cdn.com/v4/letter/q/f17d59/32.png) [@QGIO](https://discourse.nodered.org/u/QGIO)\
**Post date:** [9 March 2022 10:19 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/4 "2022-03-09T10:19:17Z")

</div>

Hi zenofmuf,

I don't know how to link the information get from SQL table (and reported in the payload image above) to the UI table

\</\>

 ![immagine](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/0418027eb8635bf0b6c545768f4961ffd7978439.png)

---

<div class="post-metadata">

**Author:** ![QGIO](https://avatars.discourse-cdn.com/v4/letter/q/f17d59/32.png) [@QGIO](https://discourse.nodered.org/u/QGIO)\
**Post date:** [9 March 2022 10:21 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/5 "2022-03-09T10:21:47Z")

</div>

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 March 2022 11:18 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/6 "2022-03-09T11:18:30Z")

</div>

Once you have worked through the videos and looked at the page I suggested then ask again if you still can't get it to work.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 March 2022 11:50 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/7 "2022-03-09T11:50:41Z")

</div>

Take a look at the examples that are provided by the node.  
1 - select the hamburger menu upper right of the editor  
2 - select the 'Import' option  
3 - select "Examples' and scroll to the 'node-red-node-ui-table'  
and import the examples so you can see how to cofigure your table.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 May 2022 11:51 UTC](https://discourse.nodered.org/t/show-data-on-ui-table-coming-from-sql-database/59573/8 "2022-05-08T11:51:29Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
