import type { VendorConfig } from '../types'; import { SHARED_SEARCH_KEYWORDS, SHARED_SQL_AGGREGATES, SHARED_SQL_KEYWORDS, SHARED_SQL_SCALARS } from './shared'; const blsConfig: VendorConfig = { id: 'bls', label: '百度云 BLS', searchKeywords: SHARED_SEARCH_KEYWORDS, searchBuiltinFields: [ { name: '_source', detail: '日志源', doc: 'BLS 内置字段:日志来源' }, { name: '_hostname', detail: '主机名', doc: 'BLS 内置字段:采集主机名' }, { name: '_message', detail: '原始内容', doc: 'BLS 内置字段:原始日志内容' }, ], fieldAssignOperators: [':', '='], sqlKeywords: Array.from(new Set([...SHARED_SQL_KEYWORDS, 'OVER', 'PARTITION', 'EXISTS'])), sqlFunctions: [ ...SHARED_SQL_AGGREGATES, ...SHARED_SQL_SCALARS, { name: 'date_format', signature: 'date_format(time, format)', doc: 'BLS:时间格式化' }, { name: 'date_trunc', signature: 'date_trunc(unit, time)', doc: 'BLS:时间截断' }, { name: 'from_unixtime', signature: 'from_unixtime(unixtime)', doc: 'BLS:unix 时间转日期' }, { name: 'regexp_extract', signature: 'regexp_extract(str, pattern[, group])', doc: 'BLS:正则提取' }, { name: 'split_part', signature: 'split_part(str, delimiter, idx)', doc: 'BLS:字符串切分' }, { name: 'approx_distinct', signature: 'approx_distinct(field)', doc: 'BLS:近似去重计数' }, ], }; export default blsConfig;