Jacopo Gobbi
06/30/2026, 3:18 PMflat_json.sparsity.factor for a table?Rocky
06/30/2026, 3:19 PMflat_json.sparsity.factor for a table, you can use the following methods depending on whether it was set at the table level or is using the global default.
1. Check Table-Level Property
If the property was explicitly set for the table (supported from v4.0 onwards), you can find it in the PROPERTIES section of the SHOW CREATE TABLE output:
sql
SHOW CREATE TABLE <table_name>;
Look for "flat_json.sparsity.factor" in the result. If it is not listed there, the table is using the global default value.
2. Check Global BE Configuration
If the property is not set at the table level, StarRocks uses the global BE configuration json_flat_sparsity_factor. You can check this value by querying the `information_schema`:
sql
SELECT * FROM information_schema.be_configs
WHERE NAME = 'json_flat_sparsity_factor';
Alternatively, you can check it via the BE's HTTP interface:
bash
curl http://<BE_IP>:<BE_HTTP_PORT>/varz | grep json_flat_sparsity_factor
Summary of Property Names
* Table Property: flat_json.sparsity.factor (Set via CREATE TABLE or ALTER TABLE ... SET).
* BE Configuration: json_flat_sparsity_factor (Default is 0.3).
How to Modify It
If you need to change the value for a specific table:
sql
ALTER TABLE <table_name> SET ("flat_json.sparsity.factor" = "0.5");
Note: The Flat JSON feature and table-level configuration are available starting from version 4.0. In versions earlier than 4.0, this is controlled exclusively via the BE configuration json_flat_sparsity_factor.
References
• administration/management/BE_configuration.md
• administration/management/monitoring/metrics.md
• administration/management/FE_configuration.md