Get Random Rows
Get a specified number of random rows from a database.
This block is an iterator. Learn more about iterators.
If you are unsure how to use Databases, we have a tutorial that goes over them here.
If there are less than the specified number of rows (e.g. you request 50 rows but there are only 27 rows in the database), Inventor will return all of the rows (in this example, 27 rows)
What does it do?
The Get Random Rows allows you to retrieve a specified number of rows from a database and iterate over them
Inputs
Database Required
Provide the name of the database to use for this block.
The database must exist on the current bot.
Example: my_database
Number of Rows Required
The number of rows to get from the database.
Example: 5
Outputs
Row ID iterator
The Row ID of the current iteration’s random row.
Example: abcdef12-3456-7890-abcd-ef1234567890
Created At (Unix) iterator
The Unix timestamp of when the current iteration’s row was created.
Example: 1731886315
Updated At (Unix) iterator
The Unix timestamp of the last time the current iteration’s row was updated.
Example: 1731886315