Error message: SAP Cloud Application Programming

SQLITE_ERROR: table sap_capire_bookshop_books has no column named currency

In my schema definition, Books entity does have a field called currency, but its data type is currency, from @SAP/CDS /common, instead of a built-in data type like Integer, String, Decimal, and so on.

However, when importing data from a CSV file into the SQLite in Memory database, we encountered the error message described in the title of this article.

Here’s a trick to visiting the URL:

http://localhost:4004/browse/…

Found the currency field of the Books entity, the corresponding database field name should be currency_code, not currency:

Change the field name to currency_code in the CSV file and the error disappears:

More of Jerry’s original articles can be found on “Wang Zixi “: