# Sql query node on edge agent

**URL:** <https://forums.losant.com/t/sql-query-node-on-edge-agent/3181>\
**Category:** Help\
**Tags:** workflow\
**Created:** [August 7, 2020, 7:56pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181 "2020-08-07T19:56:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 7, 2020, 7:56pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/1 "2020-08-07T19:56:52Z")

</div>

When querying a Mysql database, I only get some of the data back.  
The debug node shows the correct number of result rows, but only the first 9 shows data.  
Is this the intended funcionality ?

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 7, 2020, 7:56pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/3 "2020-08-07T19:56:59Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/4/42867e0dcd7d7756b6f0dd05f4b762f870c790d7.png)

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 7, 2020, 9:29pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/4 "2020-08-07T21:29:26Z")

</div>

@Lars_Andersson,

Would you be able to share a screenshot of your SQL Node configuration, SQL Query, and workflow? Having this will help me contextualize your problem, and help me help you better!

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 10, 2020, 12:54pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/6 "2020-08-10T12:54:30Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/e/eef553cc0a9acc7d2974de4f2ef4fc849c2ced7f.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/4/4ce7d88ede11ff459776cac2c36348642a89c686.png)

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 10, 2020, 1:20pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/8 "2020-08-10T13:20:12Z")

</div>

@Lars_Andersson,

Thanks for those screenshots! I don’t see anything that would cause this to happen in your SQL Node configuration.

Would you be able to share a screenshot of your workflow that’s making this SQL query?

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 10, 2020, 3:08pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/13 "2020-08-10T15:08:33Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/f/f3ee3be6fac4a5811ffcf62c3b1e64936c5817af.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/f/fe52b2b212f6217b4395930e9213ff2153fd0c32.png)

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 10, 2020, 3:09pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/15 "2020-08-10T15:09:17Z")

</div>

This workflow runs on a edge device

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 10, 2020, 4:16pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/16 "2020-08-10T16:16:58Z")

</div>

@Lars_Andersson,

I would recommend downloading [MySQL Workbench](https://www.mysql.com/products/workbench/), connect to your database, and run the same query in it. Do you get the same response when doing this?

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 10, 2020, 5:00pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/18 "2020-08-10T17:00:23Z")

</div>

Already tested that. I get all rows from the result there.

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 10, 2020, 5:15pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/20 "2020-08-10T17:15:46Z")

</div>

I just found something interesting.  
If I select 2 columns by name and not “\*” , I get 2 resul trows back, and the rest showing “success”.  
If I select 3, I get 3 back and so on.

So when I select “\*” for all columns, I only receive result data from as many records as number of columns in the select statement.

That doesn’t sound right to me.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/3/34ecee79d1ee30be92dc17ba7e108c465d679f5c.png)

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 10, 2020, 9:57pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/21 "2020-08-10T21:57:02Z")

</div>

@Lars_Andersson,

We dug into this on our end and found a bug. We’re issuing a fix right now, and I’ll be sure to update you when it’s rolled out.

I also wanted to thank you for pointing this out. You are helping us make Losant better!

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 11, 2020, 5:33pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/23 "2020-08-11T17:33:19Z")

</div>

How far away is the fix?  
Was this problem only for MySQL connections?

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 11, 2020, 6:14pm UTC](https://forums.losant.com/t/sql-query-node-on-edge-agent/3181/25 "2020-08-11T18:14:17Z")

</div>

@Lars_Andersson,

The fix is out now. We rolled out a new version of the Edge Agent to fix this, you can read more in [the Edge Agent Changelog](https://docs.losant.com/edge-compute/edge-agent-changelog/#1182---2020-08-10). You will need to pull down the newest version of the [Losant Edge Agent](https://hub.docker.com/r/losant/edge-agent) to implement this fix.

As far as we know, this problem was only for MySQL connections. If you run into this same issue with another database node, please don’t hesitate to reach out.

Thank you,  
Heath
