Skip to main content
Gathering Interest

Transformations: Asset External IDs instead of IDs for linking Events, Timeseries, Sequences to Assets

Related products:Data Staging (RAW)
  • March 1, 2023
  • 7 replies
  • 148 views

Pierre  Pernot
Expert ⭐️⭐️⭐️⭐️

Hello,
 

That would be nice to be able to use the asset external IDs (instead of the assetId field) in transformations, to link events (or timeseries, sequences) to existing assets.

 

7 replies

Gaetan  Helness
MVP ⭐️⭐️⭐️⭐️⭐️
Forum|alt.badge.img+2
  • MVP ⭐️⭐️⭐️⭐️⭐️
  • March 1, 2023

+1
 

or at least to extend the function

https://docs.cognite.com/cdf/integration/guides/transformation/write_sql_queries/#asset_ids

to be able to use externalId as well
Using names can lead to unexpected results since they are not unique


Gaetan  Helness
MVP ⭐️⭐️⭐️⭐️⭐️
Forum|alt.badge.img+2
  • MVP ⭐️⭐️⭐️⭐️⭐️
  • March 1, 2023

Gaetan  Helness
MVP ⭐️⭐️⭐️⭐️⭐️
Forum|alt.badge.img+2
  • MVP ⭐️⭐️⭐️⭐️⭐️
  • March 1, 2023

In general, we would also like to be able to create our own custom SQL function as well


Forum|alt.badge.img

FWIW, the reason we link by internal ID of the asset has to do with fact that we allow externalIds to be mutable in the current asset centric model.

That might not (shouldn’t) prevent a transformation from looking up on the externalId of the asset, and use it’s assetId (the internal ID) to create a link.


Gaetan  Helness
MVP ⭐️⭐️⭐️⭐️⭐️
Forum|alt.badge.img+2
  • MVP ⭐️⭐️⭐️⭐️⭐️
  • March 1, 2023

thanks @Thomas Sjølshagen , yes that makes sense. 
Yes as a data engineer, you will most likely know the external_id so having a way to find the id from external_id is necessary. It would be good to have either a custom function for that or allowed directly in transformations


Anita Hæhre
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img+3
  • Head of Community
  • March 3, 2023
NewGathering Interest

Forum|alt.badge.img
  • Seasoned ⭐️
  • May 13, 2024

Hello 

Any new development on this?