Csv - large file

Hello.
Can anyone advise?
I have a UTF-8 csv file. It has 20,000 rows and 7 columns.
I just need to search through columns 6 and 7.
Can AppInventor handle such data?
From this csv can I create a letter, dictionary or try SQlite db?
Any advice good .....
Ondrej

Does the data have to be on your device, or could it be stored online (database/google sheets/etc) ?

This is personal data, so it must be on my device ....
Ondrej

Are you just writing a one off app for yourself, or will this be distributed to 10's, 100's or 1000's of users? Will the data/csv need to be regularly updated or changed?

The application will be distributed once a year to 4 users.

The user will only search for data, not update it.

Unless you require a blistering fast response from your queries, there should be no issue loading the csv to your app in the assets (assuming that for some reason, it is not a massive text file over 5mb - which it should not be), and then load in the data to a list using the file component. Having the file in assets keeps it read only and in a reasonably safe place on your devices.

Thanks.
Ondrej

Here are some filter procedures you can use ...

if you want to follow the sqlite direction, then you could convert the UTF-8 csv file into sqlite format using https://sqlitestudio.pl/ and import the database into your App Inventor app to do some queries...
my sqlite extension is able to import sqlite files App Inventor Extensions: SQlite | Pura Vida Apps

Taifun

Hello.
Is it to be understood that the SQlite database will become part of the application's assets?
Ondrej

If you upload the sqlite database file to Media/assets, before compiling your app, then, yes....
(your db will then be read only in your compiled app)

From the Q&A section at App Inventor Extensions: SQlite | Pura Vida Apps

Q6 : I'm not sure how you create the database in the 1st place. I know (think) it's a built in facility but the import seem to imply that you have a database built in the 1st place to your requirement?
A : There is no method to create a database, the database always is there (same like TinyDB). You have 2 possibilities:

  1. on first run of your app just create your tables (CREATE TABLE statements) and use some INSERT TABLE statements to add some data
  2. alternatively prepare your database (including data), upload it into the assets of your app and import the database on first run of the app, see also the example project.
    Let me suggest to follow the second option.
    There is a nice SQLite Manager extension available for the Firefox Browser, which makes it easy to manage the database. Thank you Sonny for the info. See also sqliteexpert.com for a tool to design your database.

Taifun

1 Like