grafana / iot-sitewise-datasource

IoT Sitewise
Apache License 2.0
19 stars 9 forks source link

feat: implement support for sitewise sql #268

Open mitchlee-amzn opened 6 months ago

mitchlee-amzn commented 6 months ago

What this PR does / why we need it: This PR extends the capabilities of the datasource plugin to support the SiteWise ExecuteQuery API, which allows customers to leverage adhoc SQL queries against their assets and properties.

Which issue(s) this PR fixes: https://github.com/grafana/iot-sitewise-datasource/issues/267

Fixes #

Special notes for your reviewer:

mitchlee-amzn commented 6 months ago

Note this isn't working yet, but I am getting quite a few changes here, so saving state while it compiles.

fridgepoet commented 6 months ago

Quick summary of what I've mentioned on Slack:

  1. I would suggest that we bump the version of aws-sdk-go to v1.49.6 in a separate PR and you could put your ExecuteQuery changes on top of it. The reason is that there will be quite a few other changes along with that update, and it might be better if they didn’t take away from the focus of the ExecuteQuery PR. I’ve updated Sarah’s branch/PR with the changes needed for that update: https://github.com/grafana/iot-sitewise-datasource/pull/266 If you’re OK with that, we’ll complete the PR description and mark it as ready.

  2. As mentioned above, I was able to base your ExecuteQuery changes on top of the bump-aws-sdk branch, and the frontend query seems to be reaching the backend.

seb-koch commented 4 months ago

@mitchlee-amzn This looks very promising. We'd be happy to test the implementation as we're eager to use SQL within our ongoing customer projects with SiteWise. Thanks for your work, let us know if we can support in testing and even documenting the final use cases.

+1, please continue your great work.

vanPhilipp commented 4 months ago

This feature provides a lot of extra flexibility, please continue.

CFEazeti commented 4 months ago

This would really help us to go forward in a customer project. Looking forward to this PR being finished. :+1:

reinholdalex commented 4 months ago

+1

rastadrian commented 4 months ago

+1

tracy-french commented 4 months ago

Happy to see all of the interest in this feature! We are actively working on prioritizing the completion of this feature and hope to continue the work soon.