Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope: Issue querying data by propertyAlias when the property is associated with an asset #169

Closed
diehbria opened this issue Mar 7, 2023 · 4 comments · Fixed by #179
Closed

Comments

@diehbria
Copy link

diehbria commented Mar 7, 2023

What happened:
Cannot construct query based on propertyAlias for a property which has a propertyAlias but is also associated with a SiteWise asset.

What you expected to happen:
Able to construct queries based on propertyAlias for any properties which contain a propertyAlias (which both modeled and unmodeled data supports)

@diehbria diehbria added datasource/Sitewise type/bug Something isn't working labels Mar 7, 2023
@iwysiu
Copy link
Contributor

iwysiu commented Mar 9, 2023

Hi @diehbria !

Thanks for reporting this issue! I think I've reproduced it, but I would appreciate if you could reply with an example of a query with this issue and what error you get returned to be sure.

@iwysiu
Copy link
Contributor

iwysiu commented Mar 9, 2023

Ah, while investigating the code, it seems like when the plugin was written the design decision was made not to support propertyAlias targets for property value queries:

// NOTES: We have decided to not support propertyAlias targets, as there is no good way to go from propertyAlias -> assetId/propertyId.
However it also has been 2 years since then, so I'll put this in the backlog for us to look into adding.

@sarahzinger
Copy link
Member

This is marked as a bug for now, but might be more of a feature request. Let's take a look this sprint and see what it would involve to support this, might require creating this into it's own epic with design doc?

@sarahzinger sarahzinger changed the title Issue querying data by propertyAlias when the property is associated with an asset Scope: Issue querying data by propertyAlias when the property is associated with an asset Apr 17, 2023
@diehbria
Copy link
Author

@iwysiu @sarahzinger

Regarding this comment:

// NOTES: We have decided to not support propertyAlias targets, as there is no good way to go from propertyAlias -> assetId/propertyId.

You can determine the assetId and propertyId associated with a property given an propertyAlias with the DescribeTimeSeries API.

You can learn more ahttps://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeTimeSeries.html

You will make a request /timeseries/describe/?alias=$PROPERTY_ALIAS and this will return a response that contains a assetId and propertyId field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
5 participants