Change options in Show Entries #records dropdown #29720
Replies: 2 comments 1 reply
-
Hey @zwickera! I'm here to assist you with any issues or questions you have. I'm a bot designed to help you solve bugs, answer questions, and become a contributor. Yes, it is possible to configure or expand the options in the "Show Entries" dropdown for the table visualization type in Superset to include 500 or 1000 results per page. This can be achieved by modifying the To include 500 or 1000 results per page, you need to add these values to the // Import the PAGE_SIZE_OPTIONS constant
import { PAGE_SIZE_OPTIONS } from '../consts';
// Add 500 and 1000 to the PAGE_SIZE_OPTIONS array
const PAGE_SIZE_OPTIONS = [
[10, '10'],
[25, '25'],
[50, '50'],
[100, '100'],
[500, '500'], // Add 500
[1000, '1000'], // Add 1000
]; By adding these values, the "Show Entries" dropdown will now include options for 500 and 1000 results per page [1]. Additionally, you can make these changes configurable through the Superset UI or a configuration file, rather than modifying the source code directly. You can create a configuration module, typically a file named For example: export SUPERSET_CONFIG_PATH=/app/superset_config.py Or, if using a custom Dockerfile: COPY --chown=superset superset_config.py /app/
ENV SUPERSET_CONFIG_PATH /app/superset_config.py In your # Superset specific config
ROW_LIMIT = 5000
# Flask App Builder configuration
SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db?check_same_thread=false'
WTF_CSRF_ENABLED = True
WTF_CSRF_EXEMPT_LIST = []
WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365
MAPBOX_API_KEY = '' This approach allows you to configure Superset without altering the core source code [2][3]. |
Beta Was this translation helpful? Give feedback.
-
Per the suggestion of @dosu I was hoping to add this to the superset_config.py that is already set up. However, adding the following block of code to superset_config.py is not working, the dropdown still shows the original values, not the updated values with 400 and 800: PAGE_SIZE_OPTIONS = [ Per review of the intent of superset_config.py, it looks like this is intended to allow overriding values that are already configured in /superset/config.py. PAGE_SIZE_OPTIONS is not a setting in the config.py file, instead it's a setting in code. If there is a way to modify values for PAGE_SIZE_OPTIONS within superset_config.py, I'll need additional assistance for how to access and modify this array. If doing so is not possible, and can only be done via code modification, let me know. Thank you. |
Beta Was this translation helpful? Give feedback.
-
For the table visualization type, there's a dropdown that restricts the # rows that show for a user per page:
Currently this has options for 10 to 200, and an All option.
Is it possible to configure/expand these options, to allow, for example, 500 or 1000 results per page? Can the list of available options for this dropdown be configured via the superset interface, and if so, where? Or can it be modified via a configuration file, or elsewhere?
Any help would be most appreciated, thanks.
Beta Was this translation helpful? Give feedback.
All reactions