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

@iot-app-kit/source-iotsitewise tries to aggregate string data using AVERAGE #258

Closed
NorbertNader opened this issue Sep 29, 2022 · 1 comment
Labels
bug Something isn't working IoT App Kit Core team Triaged When the ticket has been correctly triaged, add this label

Comments

@NorbertNader
Copy link
Contributor

NorbertNader commented Sep 29, 2022

Describe the bug
When requesting aggregated data and panning an error is thrown to the console and datapoints are missing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to testing ground and add a line chart with a query for a string property
            <iot-line-chart
              widgetId="line-chart"
              viewport={{ duration: '10m' }}
              queries={[
                this.query.timeSeriesData({
                  assets: [
                    {
                      assetId: DEMO_ASSET,
                      properties: [
                        {
                          propertyId: DEMO_STRING_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET2,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET3,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                    {
                      assetId: DEMO_ASSET4,
                      properties: [
                        {
                          propertyId: DEMO_PROPERTY,
                        },
                      ],
                    },
                  ],
                }),
              ]}
            />
  1. Zoom in on the line chart
  2. Errors are thrown as shown in the recording and screenshots

Expected behavior
String data is should not be aggregated and always be raw.

Screenshots

Screen.Recording.2022-09-29.at.12.37.20.PM.mov

Screen Shot 2022-09-29 at 12 38 00 PM

@NorbertNader NorbertNader added the bug Something isn't working label Sep 29, 2022
@NorbertNader NorbertNader changed the title Aggregated data failing to render when too many requests Aggregated data failing when requesting a string stream Sep 29, 2022
@NorbertNader NorbertNader changed the title Aggregated data failing when requesting a string stream @iot-app-kit/source-iotsitewise tries to aggregate string data Sep 29, 2022
@boweihan
Copy link
Contributor

boweihan commented Oct 6, 2022

String data can be aggregated (as COUNT) but we don't currently have great support for string data in time-series charts. This is because [1] in most cases it doesn't make sense to display the string data (e.g. as a series on a line chart) and [2] we don't currently have support for specifying different aggregation types in source-iotsitewise.

I think displaying an error for an unsupported use-case makes sense, although I do agree that there could be a better user experience when specifying asset properties that have data types that aren't supported by certain charts. Short term, this could take the form of better documentation and more descriptive error messages. Long term, we could add some form of asset type discovery and adjust behaviour accordingly (e.g. automatically select COUNT aggregation for string asset properties).

@NorbertNader NorbertNader changed the title @iot-app-kit/source-iotsitewise tries to aggregate string data @iot-app-kit/source-iotsitewise tries to aggregate string data using AVERAGE Oct 17, 2022
@diehbria diehbria added Triaged When the ticket has been correctly triaged, add this label IoT App Kit Core team labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working IoT App Kit Core team Triaged When the ticket has been correctly triaged, add this label
Projects
None yet
Development

No branches or pull requests

3 participants