Solved

How can we know the data-type of RAW table column using APIs

  • 3 October 2023
  • 2 replies
  • 55 views

Userlevel 1

As Cognite provides APIs to access RAW tables from database, is there any way to get the actual datatype (text/bool/timestamp etc.) of the table’s column.

icon

Best answer by Håkon V. Treider 3 October 2023, 09:33

View original

2 replies

Userlevel 2

In RAW, all columns are stored as a string.

Userlevel 4
Badge

In RAW, all columns are stored as a string.

The documentation says:

The columns object is a key value object, where the key corresponds to the column name while the value is the column value. It supports all the valid types of values in JSON, so number, string, array, and even nested JSON structure (see payload example to the right).

I think the correct answer to the question is that there is no enforced schema, so you can write data with different types to the same column.

Reply