Is there a way to mass generate users profiles for developing purpose?

Let’s say my typical user profile has sex, age, native language (limited list of supported languages), hobbies interests, etc. And for developing purpose I need to have like 1000 user profiles with all the different combinations of these parameters. Is there a way to automatically do that?

There are several ways to do it:

  1. Create a CSV document with user profiles and import into Backendless

  2. Write a script creating and registering users using the registration API.

Regards,
Mark

I tried to import generated users.csv but it says table users doesn’t exist. When I try to create it before - it says table users were already taken. And in Users Tab I don’t see an option to import any file. So how do I do that?

CSV import process is documented here:
https://backendless.com/docs/rest/mgmt_import.html

Did exactly that.

16:29:19 IMPORT_DATA Importing Started.
2 16:29:19 IMPORT_DATA Preparing files to import
3 16:29:19 IMPORT_DATA Creating temporary tables
4 16:29:19 IMPORT_DATA Creating user’s tables
5 16:29:19 IMPORT_DATA Checking for existing views with the same names as in imported tables
6 16:29:19 IMPORT_DATA Checking denied, duplicate and dataSize for columns.
7 16:29:19 IMPORT_DATA Preparing users table: initializing columns.
8 16:29:19 IMPORT_DATA Import of tables failed: java.sql.SQLSyntaxErrorException: Table ‘8F82FCC2-DD0D-C00D-FF42-5CB5C0507F00.udt.users’ doesn’t exist
9 16:29:19 IMPORT_DATA Importing failed. Exception:java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Table ‘8F82FCC2-DD0D-C00D-FF42-5CB5C0507F00.udt.users’ doesn’t exist

Ok. I should have use Users.csv instead of users.csv. Imported table labels but no user data in the table.

Any errors in the import log?

No

Backendless finished import your data successfully for application: CoolEvening.
The Import log located in File Service’s “import” directory.

See Import log bellow:

1 17:26:41 IMPORT_DATA Importing Started.
2 17:26:41 IMPORT_DATA Preparing files to import
3 17:26:41 IMPORT_DATA Creating temporary tables
4 17:26:41 IMPORT_DATA Creating user’s tables
5 17:26:41 IMPORT_DATA Checking for existing views with the same names as in imported tables
6 17:26:41 IMPORT_DATA Checking denied, duplicate and dataSize for columns.
7 17:26:41 IMPORT_DATA Preparing Users table: initializing columns.
8 17:26:42 IMPORT_DATA Preparing Users table: updating column related IDs.
9 17:26:42 IMPORT_DATA Preparing Users table: initializing relations.
10 17:26:42 IMPORT_DATA Resolving related table.
11 17:26:42 IMPORT_DATA Getting meta-info about insetable tables.
12 17:26:42 IMPORT_DATA Start import table: Users
13 17:26:42 IMPORT_DATA Skip importing data for table Users because missed required column/s: [password]
14 17:26:42 IMPORT_DATA Finish import table: Users
15 17:26:42 IMPORT_DATA Started restoring relations.
16 17:26:42 IMPORT_DATA Counting relations.
17 17:26:42 IMPORT_DATA Checking for existing tables with the same names as in imported views
18 17:26:42 IMPORT_DATA Clearing user data table cache.
19 17:26:43 IMPORT_DATA Deleting temporary tables.
20 17:26:43 IMPORT_DATA Finishing pointers export.
21 17:26:43 IMPORT_DATA Restoring expiration tasks for DeviceRegistrations.
22 17:26:43 IMPORT_DATA Import finished.

Looks like the records you’re importing are missing the password column:

Yes, finally. But I created csv for 1000 users and only 30 users were imported into the database. Do I have some limits?

Sorry. It’s ok. All 1000 now.

1 Like

Now, how to delete all users? I can delete only 15 at a time.

This should do it:
Data Browser - ConsoleDemo - Backendless 2024-04-25 14-23-55

2 Likes