Skip to content

Environment Variables ​

HENGSHI SENSE provides a wide range of features for different business scenarios. You can adjust environment variables to meet specific environment and feature requirements.

The following sections list key environment variables and their descriptions.


APP_CONFIG_APP_ENABLE_EXTEND_APP_APPROVAL

Value typeDefault valueDescription
booleanfalseWhether to enable extended app approval for apps.

APP_CONFIG_APP_ENABLE_RULE_STRICT_VALIDATE

Value typeDefault valueDescription
booleanfalseWhether to enable strict rule validation for apps.

APP_CONFIG_ENABLE_TENANT_APP_VERSION

Value typeDefault valueDescription
booleanfalseWhether to enable app version management for tenants. This takes effect only if the current license supports app version management.

ENGINE_CONFIG_ANALYZE_ENGINE_TABLE_WHEN_IMPORT

Value typeDefault valueDescription
booleantrueWhether to analyze engine tables when importing data into the engine.

ENGINE_CONFIG_DATASET_CACHE_IMPORT_MAX_TIME

Value typeDefault valueDescription
number3Maximum time for dataset cache imports (hours).

ENGINE_CONFIG_ENGINE_FIELD_TYPE_CHANGE_AUTO_IMPORT

Value typeDefault valueDescription
booleantrueWhether to import data automatically when an engine field type changes.

ENGINE_CONFIG_ENGINE_FIELD_TYPE_CHANGE_IMPORT_DELAY_TIME

Value typeDefault valueDescription
number120Delay before importing data after an engine field type changes (seconds).

ENGINE_CONFIG_ENGINE_IMPORT_CHECK_TABLE_EXISTS

Value typeDefault valueDescription
booleanfalseWhether to check if a table exists when importing data into the engine.

ENGINE_CONFIG_ENGINE_IMPORT_EXPR_JSON_FIELD

Value typeDefault valueDescription
booleanfalseWhether to import expression JSON fields when importing data into the engine.

ENGINE_CONFIG_ENGINE_IMPORT_FROM_PG_BATCH_FETCH_SIZE

Value typeDefault valueDescription
number-1

ENGINE_CONFIG_ENGINE_IMPORT_USER_EXPR_AND_TYPE

Value typeDefault valueDescription
booleantrueWhether to use user-defined expressions and types when importing data into the engine.

ENGINE_CONFIG_ENGINE_TABLES_SYNC_INTERVAL

Value typeDefault valueDescription
number3600000Interval between engine table synchronizations (ms).

ENGINE_CONFIG_GPDB_ENGINE_IDLE_IN_TRANSACTION_MAX

Value typeDefault valueDescription
number60Maximum idle-in-transaction duration for GPDB engine cleanup during query queue and engine resource management.

ENGINE_CONFIG_GPDB_WITH_TO_TEMP_TABLE_THRESHOLD

Value typeDefault valueDescription
number5Threshold for using temporary tables in GPDB.

EXTERNAL_DB_CONFIG_BATCH_INSERT_MAX_CELL_COUNT

Value typeDefault valueDescription
number100000Maximum number of cells in a batch insert.

EXTERNAL_DB_CONFIG_CONN_LOCK_TIMEOUT

Value typeDefault valueDescription
number600000Connection lock timeout (ms).

EXTERNAL_DB_CONFIG_DORIS_BATCH_INSERT_SIZE

Value typeDefault valueDescription
number-1

EXTERNAL_DB_CONFIG_DORIS_TABLE_NAME_MAX_LENGTH

Value typeDefault valueDescription
number64

EXTERNAL_DB_CONFIG_DORIS_TABLE_REPLICATION_NUM

Value typeDefault valueDescription
number1

EXTERNAL_DB_CONFIG_JDBC_CONNECT_TIMEOUT

Value typeDefault valueDescription
number20JDBC connection timeout (seconds).

EXTERNAL_DB_CONFIG_JDBC_GET_CONN_TEST_SOCKET

Value typeDefault valueDescription
booleanfalseWhether to test the socket when obtaining a JDBC connection.

EXTERNAL_DB_CONFIG_JDBC_SOCKET_TIMEOUT

Value typeDefault valueDescription
number3600JDBC socket timeout (seconds).

EXTERNAL_DB_CONFIG_SPLIT_BATCH_FOR_STAR_ROCKS_SPECIAL_CHAR_INSERT

Value typeDefault valueDescription
booleantrueWhether to split batches when inserting special characters into StarRocks.

EXTERNAL_DB_CONFIG_THROTTLE_QUERY_TIMEOUT

Value typeDefault valueDescription
number600Timeout for throttled vendor queries (seconds).

GENERAL_CONFIG_API_DATASET_IMPORT_TIME_OUT

Value typeDefault valueDescription
number3600000API dataset import timeout (ms). The default is one hour.

GENERAL_CONFIG_APP_IMAGE_MAX_AGE

Value typeDefault valueDescription
number31536000Maximum age of app images (seconds).

GENERAL_CONFIG_AUDIT_LOG_HISTORY_RESERVE_DAYS

Value typeDefault valueDescription
number90Retention period for audit log history (days).

GENERAL_CONFIG_CHART_DATA_ROWS_LIMIT

Value typeDefault valueDescription
number100000Maximum number of chart data rows.

GENERAL_CONFIG_COLUMN_AUTH_HIDE_FIELD_NAME

Value typeDefault valueDescription
booleantrueWhether to hide field names based on column permissions.

GENERAL_CONFIG_DEFAULT_IMAGE_COMPRESS_QUALITY

Value typeDefault valueDescription
number0.75Image compression ratio.

GENERAL_CONFIG_DOWNLOAD_INTERVAL

Value typeDefault valueDescription
number5000

GENERAL_CONFIG_DOWNLOAD_TIMEOUT

Value typeDefault valueDescription
number55000Download timeout (ms).

GENERAL_CONFIG_ENABLE_BODY_ENCODE

Value typeDefault valueDescription
booleanfalseWhether to encode HTTP request bodies. Refresh the page after changing this setting for it to take effect.

GENERAL_CONFIG_ENABLE_VERIFY_ADMIN_PASSWORD

Value typeDefault valueDescription
booleantrueWhether to verify the current user's password when resetting a password.

GENERAL_CONFIG_EVEREST_DELETED_USER_RESERVED_DAYS

Value typeDefault valueDescription
number15Retention period for deleted users (days). Users are soft-deleted by default and permanently deleted only after this period.

GENERAL_CONFIG_EVEREST_MSG_MAX_LENGTH

Value typeDefault valueDescription
number300

GENERAL_CONFIG_EXPORT_INVISIBLE_FIELDS

Value typeDefault valueDescription
booleanfalseWhether to include invisible fields in exports.

GENERAL_CONFIG_FILE_HEADER_ABNORMAL_RATIO_THRESHOLD

Value typeDefault valueDescription
number1.1Threshold for the file header anomaly ratio.

GENERAL_CONFIG_FILE_HEADER_SUPPORT_PADDING

Value typeDefault valueDescription
booleantrueWhether to support adding headers automatically to files that contain only data.

GENERAL_CONFIG_FILE_MEM_PROCESSING_THRESHOLD

Value typeDefault valueDescription
number52428800Threshold for processing files in memory (bytes).

GENERAL_CONFIG_FILE_TYPE_DETECT_LINE_LIMIT

Value typeDefault valueDescription
number50000Maximum number of rows to inspect for type detection in files.

GENERAL_CONFIG_HENGSHI_ACCESS_AGGREGATION_LOG_RESERVED_DAYS

Value typeDefault valueDescription
number180Retention period for aggregated access logs (days).

GENERAL_CONFIG_HENGSHI_ACCESS_LOG_RESERVED_DAYS

Value typeDefault valueDescription
number32Retention period for access logs (days).

GENERAL_CONFIG_HENGSHI_BACKGROUND_JOB_LOG_RESERVED_DAYS

Value typeDefault valueDescription
number2Retention period for background job logs (days).

GENERAL_CONFIG_LOGIN_BLOCK_MINUTE

Value typeDefault valueDescription
number3Duration of the block after failed login attempts (minutes).

GENERAL_CONFIG_LOGIN_RETRY_COUNT

Value typeDefault valueDescription
number3Number of retries after failed login attempts.

GENERAL_CONFIG_PLATFORM_CONNECTION_AUTH

Value typeDefault valueDescription
stringcustomizePermissions for platform connections authorized for tenants.
customize: Tenant administrators can manage permissions themselves.
read: All users in the tenant have read permission.

GENERAL_CONFIG_PLATFORM_FOLDER_AUTH

Value typeDefault valueDescription
stringcustomizePermissions for platform folders/data packages authorized for tenants.
customize: Tenant administrators can manage permissions themselves.
read: All users in the tenant have read permission.

GENERAL_CONFIG_SAMPLE_COUNT

Value typeDefault valueDescription
number10000Number of samples.

GENERAL_CONFIG_SESSION_COOKIE_MAX_AGE

Value typeDefault valueDescription
number86400Maximum cookie age.

HE_QUERY_CONFIG_CONSTANT_EXPRESSION_OPTIMIZER

Value typeDefault valueDescription
booleantrueWhether to enable the constant expression optimizer.

HE_QUERY_CONFIG_DISABLE_MINIO_CACHE_FOR_CHART_DATA

Value typeDefault valueDescription
booleanfalseWhether to disable storing chart data in MinIO when it exceeds the threshold.

HE_QUERY_CONFIG_ENGINE_FALLBACK_DATA_QUERY_TO_SOURCE

Value typeDefault valueDescription
booleantrueWhether engine data queries can fall back to querying the data source.

HE_QUERY_CONFIG_REDIS_MAX_CHART_DATA_SIZE

Value typeDefault valueDescription
number2621440Maximum length of chart data stored in Redis, measured as the length of the serialized JSON string.
The default corresponds to 5 MB, calculated at 2 bytes per character.

MESSAGE_PUSH_CONFIG_APP_EMAIL_ATTACHEMENT_MAX_SIZE_MB

Value typeDefault valueDescription
number25Maximum email attachment size for app subscriptions (MB).

MESSAGE_PUSH_CONFIG_APP_SUBSCRIBE_NEED_MERGE_CHART_EXCEL_TABLE_MAX_SIZE_MB

Value typeDefault valueDescription
number5Maximum size of chart Excel tables to merge for app subscriptions (MB).

MESSAGE_PUSH_CONFIG_EXPORT_TABLE_MAX_DATA_NUM

Value typeDefault valueDescription
number50000Maximum number of data records in table exports for app subscriptions.

MESSAGE_PUSH_CONFIG_EXPORT_TABLE_MAX_TIMEOUT

Value typeDefault valueDescription
number180000Maximum timeout for table exports in app subscriptions (ms).

MESSAGE_PUSH_CONFIG_EXPORT_TABLE_RETRY_WAIT_TIME

Value typeDefault valueDescription
number5000Wait time before retrying a table export in an app subscription (ms).

MESSAGE_PUSH_CONFIG_MAX_NOTIFY_TEST_API_CALL_TIMES

Value typeDefault valueDescription
number10Maximum number of notification test API calls.

SCREENSHOT_CONFIG_HENGSHI_THUMBNAIL_DELAY_TIME

Value typeDefault valueDescription
number10Delay before generating thumbnails (seconds).

SCREENSHOT_CONFIG_HENGSHI_THUMBNAIL_ENABLED

Value typeDefault valueDescription
booleantrueWhether to enable thumbnail generation.

SCREENSHOT_CONFIG_SCREENSHOT_CHART_BASE_TIMEOUT

Value typeDefault valueDescription
number40000Base screenshot timeout (ms).

SCREENSHOT_CONFIG_SCREENSHOT_IS_NICE

Value typeDefault valueDescription
booleanfalseWhether to use nice for screenshots.

SCREENSHOT_CONFIG_SCREENSHOT_NICE_VALUE

Value typeDefault valueDescription
number19nice value for screenshots.

SCREENSHOT_CONFIG_SCREENSHOT_JS_TIMEOUT_DIFF

Value typeDefault valueDescription
number8000JavaScript timeout difference for screenshots (ms).

SCREENSHOT_CONFIG_SCREENSHOT_MAX_TIMEOUT

Value typeDefault valueDescription
number90000Maximum screenshot timeout (ms).

SCREENSHOT_CONFIG_SCREENSHOT_PPT_EXPORT_MAX_IMG_SIZE

Value typeDefault valueDescription
number10000000Maximum image size for PowerPoint exports (bytes).

SCREENSHOT_CONFIG_SCREENSHOT_PUBLISHED_THUMBNAIL_RESIZE_FACTOR

Value typeDefault valueDescription
number6Thumbnail resize factor.

SCREENSHOT_CONFIG_SCREENSHOT_RETRY_INTERVAL

Value typeDefault valueDescription
number1000Screenshot retry interval (ms).

SCREENSHOT_CONFIG_SCREENSHOT_RETRY_NUM

Value typeDefault valueDescription
number3Number of screenshot retries.

SCREENSHOT_CONFIG_SCREENSHOT_WAIT_TIMEOUT

Value typeDefault valueDescription
number1200000Screenshot wait timeout (ms).

SCREENSHOT_CONFIG_THUMBNAIL_MAX_AGE

Value typeDefault valueDescription
number300

Notebook SQL Security Checks ​

SECURITY_CORS_CONFIG_VALIDATE_NOTEBOOK_SQL_SECURITY

Value typeDefault valueDescription
booleanfalseWhether to enable Notebook SQL security checks in 7.0. When set to true, supported statements and sensitive functions are checked before execution. SQL that cannot be safely recognized or is flagged as risky is rejected.

A system administrator can open System Settings > Environment Variables, set this variable to true, and save. The checks are disabled by default; existing environments use their actual configured value. Disabling the setting skips these checks. This setting is independent of SQL function security checks for SQL datasets and API custom queries.

Secure data source accounts with the minimum required privileges first. HENGSHI security checks alone cannot provide complete protection. For supported data sources, allowed syntax, and check limits, see Scripts: SQL Security Checks.


SECURITY_CORS_CONFIG_ACCESS_CONTROL_ALLOW_CREDENTIALS

Value typeDefault valueDescription
booleantrueWhether browsers can include credentials in cross-origin requests. The default (true) is recommended.
Reference: Access-Control-Allow-Credentials

SECURITY_CORS_CONFIG_ACCESS_CONTROL_ALLOW_HEADERS

Value typeDefault valueDescription
stringOrigin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId, token, X-Request-Domain, X-Request-Hash-Url, X-CSRF-Token, x-request-proxyRequest headers that browsers are allowed to use in cross-origin requests. When adding a header, include all existing values as well.
Reference: Access-Control-Allow-Headers

SECURITY_CORS_CONFIG_ACCESS_CONTROL_ALLOW_METHODS

Value typeDefault valueDescription
stringPOST, GET, PUT, OPTIONS, DELETEHTTP methods that browsers are allowed to use in cross-origin requests.
Reference: Access-Control-Allow-Methods

SECURITY_CORS_CONFIG_ACCESS_CONTROL_ALLOW_ORIGIN

Value typeDefault valueDescription
string``External domains allowed to access the resource.
Reference: Access-Control-Allow-Origin

SECURITY_CORS_CONFIG_ACCESS_CONTROL_MAX_AGE

Value typeDefault valueDescription
number-1How long preflight request results can be cached (seconds).
Reference: Access-Control-Max-Age

User Manual for Hengshi Analysis Platform