Skip to main content
Committed ⭐️
June 8, 2023
Solved

Error from replicating Transform RAW to events - Working With CDF: Integrate lesson

  • June 8, 2023
  • 5 replies
  • 90 views

Hi

while attempting to run 

SELECT
workpackage_desc AS description,
to_timestamp(completion_time/1000) AS endTime,
to_timestamp(start_time/1000) AS startTime,
type,
subtype,
concat('FirstnameBirthyear:',key) AS externalId,
 
1234567890 AS dataSetId
 
FROM IFSDB.maintenance
WHERE to_timestamp(completion_time/1000)>to_timestamp(start_time/1000)

 

I get this error 

Verify that the 'IFSDB.maintenance' relation exists | code: 400 | X-Request-ID: 019f535a-a30f-9184-b3d3-966184e9d36b

 

Note that:

  • I substituted my Name and birthyear
  • changed the dataset id

My assumption: sure I have a IFSDB.maintenance RAW (not sure if I skipped something in the lesson...)

    Best answer by Dilini Fernando

    Hi @CLP,

    I hope Sofie’s reply was helpful. As of now, I will close this thread. If you have any questions, please feel free to reply here.

    Best regards,
    Dilini 

    5 replies

    Sofie Haug
    Expert ⭐️⭐️⭐️⭐️
    Cognite Academy Instructor
    June 8, 2023

    Hi @CLP 

    Which CDF project are you working in?

     

    Sofie | Cognite Academy
    Sofie Haug
    Expert ⭐️⭐️⭐️⭐️
    Cognite Academy Instructor
    June 8, 2023

    As long as you use the “cdf-fundamentals” CDF project, this relation should exist.

     

    Sofie | Cognite Academy
    CLPAuthor
    Committed ⭐️
    June 9, 2023

    Hi,

    I am in the integral-sandbox (Aker Solutions account).

    SQL query used:

    SELECT

    workpackage_desc AS description,

    to_timestamp(completion_time/1000) AS endTime,

    to_timestamp(start_time/1000) AS startTime,

    type,

    subtype,

    concat('Claudio1989:',key) AS externalId,

    8093985164902606 AS dataSetId

    FROM IFSDB.maintenance

    WHERE to_timestamp(completion_time/1000)>to_timestamp(start_time/1000)

    Error that I get

    Verify that the 'IFSDB.maintenance' relation exists | code: 400 | X-Request-ID: 97949733-e8f7-91b5-aa3e-721f23926e90

     

    I am sure I am doing something stupid and naive here… :) 

    Sofie Haug
    Expert ⭐️⭐️⭐️⭐️
    Cognite Academy Instructor
    June 12, 2023

    Okay. Then this makes sense! The database and table we are reading from is pre-uploaded in the project used for the course. But what you can do if you want to continue using the Aker Solutions sandbox is to create a database called “IFSBD” and a table called “maintenance”. 

    This has to be done for time series and datapoints as well. You do the same as when you created your FirstnameBirthyear database and “assets” table. 

    Remember to use the correct names. 

    Database: IFSDB
    Table: maintenance 

    Under the same database you can create the table “sensors” for time series and “values” for datapoints. 

     

    Sofie | Cognite Academy
    Dilini Fernando
    Expert ⭐️⭐️⭐️⭐️
    Expert ⭐️⭐️⭐️⭐️
    June 27, 2023

    Hi @CLP,

    I hope Sofie’s reply was helpful. As of now, I will close this thread. If you have any questions, please feel free to reply here.

    Best regards,
    Dilini