Skip to main content
Solved

'...Expected string value for data point for time series..." while run numeric data point transformation

  • November 27, 2024
  • 4 replies
  • 30 views

Forum|alt.badge.img+4

I’m running a training (cdf-fundamentals) but having an error while try to run a Datapoint Transformation.

My query is

/* MAPPING_MODE_ENABLED: false */
/* {"version":1,"sourceType":"raw","mappings":[{"from":"","to":"id","asType":"BIGINT"},{"from":"","to":"externalId","asType":"STRING"},{"from":"","to":"timestamp","asType":"TIMESTAMP"},{"from":"","to":"value","asType":"DOUBLE"}]} */

SELECT 
concat('Milton1972:',dp.sensor) AS externalId,
cast(time_stamp/1000 as timestamp) AS timestamp,
cast(value AS double)
FROM IFSDB.values AS dp,
--selecting from _cdf.timeseries means we select from the timeseries we ingested to CDF earlier. We do this to make sure all the time series we try to add data points to actually exist
_cdf.timeseries AS ts WHERE CONCAT('Milton1972:',dp.sensor) = ts.externalId

 

When I try to run I receive the following message:

 

Request with id 59a5e9ab-c832-9d6d-8b0b-4562a0e8ddb3 to https://api.cognitedata.com/api/v1/projects/cdf-fundamentals/timeseries/data failed with status 400: Expected string value for data point for time series: (id: '8731588848856306', externalId: 'Milton1972:VAL_23-PT-92536:X.Value'). 

I´m sure I´ve created right the Time Series.

Best answer by Mithila Jayalath

@mbjoe I checked the timeseries(Milton1972:VAL_23-PT-92536:X.Value) that you have created. The Is string parameter is set to true. So the timeseries expects string datapoints. That is why you are observing the error.

 

View original
Did this topic help you find an answer to your question?

4 replies

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • 391 replies
  • Answer
  • November 28, 2024

@mbjoe I checked the timeseries(Milton1972:VAL_23-PT-92536:X.Value) that you have created. The Is string parameter is set to true. So the timeseries expects string datapoints. That is why you are observing the error.

 


Forum|alt.badge.img+4
  • Author
  • Active
  • 2 replies
  • November 28, 2024

Hi Mithila, thanks for the answer.

So, how may I fix it, once all data used is a standard data from public area used in this training ?

I did all steps described in the training, with no changes.

Att


Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img

@mbjoe you can update the timeseries via the API or SDK.


Forum|alt.badge.img+4
  • Author
  • Active
  • 2 replies
  • November 28, 2024

Thanks a lot


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings