We want to upload an internal csv file and use it as the historic data in our app. Is it possible to link it to the global data model?
Hi! Would you like to store the CSV file or the data from the CSV file?
If it’s just the file, you can simply upload it under Resources
/ Files
and make it accessible for download inside your app.
If you want to store the data from the CSV file in your database, you can run a one-off CSV import and map the data to the relevant object classes (assuming that your data model corresponds with the archive data). You cannot override built-in properties like Created Date
so you’d need a custom property to store the creation date of an object if it’s relevant.
Does it answer your question?
I would like to store the data from the CSV file and map the data to the relevant object classes. My data model corresponds with the archive data. How would i go forward achieving this, as I can’t find where to run a "one-off CSV import?
You can either create a separate app in Config and Admin Apps
section or add this simple functionality to your existing app (e.g. a button that triggers an action using the Import Data
action node).
Regardless of where you decide to implement it, this would work more or less the same. The only thing that would be different from a periodically run import is that you’d only use it once in Prod, and after confirming that all the data has been imported correctly the functionality could be hidden/removed.
You can find the documentation for CSV import here, and a Showroom example here.