filter-expressions
यह क्या करती है
यह स्किल बताती है कि Lightdash क्वेरी टूल के लिए फ़िल्टर एक्सप्रेशन कैसे लिखे जाएँ। यह उन एनालिस्ट और डेवलपरों के लिए है जो ऐसी क्वेरी बनाते हैं जिन्हें पंक्ति-फ़िल्टर या शर्त वाले मीट्रिक फ़िल्टर चाहिए।
कब इस्तेमाल करें
- ✓जब आपको Lightdash क्वेरी को कुछ पंक्तियों तक सीमित करना है।
- ✓जब आप चाहते हैं कि कोई कस्टम मीट्रिक केवल शर्त पूरी करने वाली पंक्तियाँ गिने।
- ✓जब आप Lightdash में फ़िल्टर के साथ फ़ील्ड के मान खोज रहे हैं।
Skill का लिंक
https://github.com/lightdash/lightdash/blob/main/packages/backend/src/ee/services/ai/skills/builtInSkills/filter-expressions/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“Lightdash में कुल राजस्व की क्वेरी चलाइए, लेकिन केवल उत्तर क्षेत्र के पूरे हुए ऑर्डर शामिल करें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल बताती है कि हर फ़िल्टर एक्सप्रेशन को सही श्रेणी में कैसे रखें, जैसे डायमेंशन, मीट्रिक या टेबल कैलकुलेशन। वह उन फ़ील्ड को समूहीकरण में जोड़ने के खिलाफ़ चेतावनी देती है जो केवल पंक्तियाँ फ़िल्टर करने के लिए इस्तेमाल होते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Read this before writing filters for expression-enabled tools. It does not apply to tools whose schemas use structured filter objects. Follow each tool's input schema; this skill does not enable unavailable tools or filter modes.
Filter Expressions
For run_metric_query, set queryConfig.filters to null when no query filters are needed. Otherwise, dimensions, metrics, and tableCalculations are independent string expressions or null.
- A non-null category contains one raw string expression.
- Choose the category from discovered field metadata (its dimension/metric kind), never from a field name or whether a numeric field sounds metric-like. A raw numeric dimension belongs in
dimensions; only metrics and custom metrics belong inmetrics. - A field used only to restrict rows stays in its filter expression. Do not add it to
queryConfig.dimensionsunless the user asked to group by or display it: extra selected dimensions change aggregation and table-calculation grain. - Table calculations belong only in
tableCalculations. - Each category is flat and uses AND or OR, never both.
- The three categories combine implicitly with AND.
- Aggregation custom metric filters are flat AND expressions.
- Omit
search_field_values.filtersfor an unscoped search. When present, it is one flat dimension expression string and is AND-only. - The tool schema is authoritative for where each string is placed.
Raw placement examples:
dimensions: orders_status equals=completed,shipped AND orders_order_date inThePast=2{unit:weeks,completed:true}
dimensions (alternatives): orders_promo_code startsWith=VIP OR orders_promo_code endsWith=25
metrics: orders_total_order_amount greaterThan=100
tableCalculations: rank lessThanOrEqual=10
Join flat rules with AND or OR. Do not mix both connectors in one expression.
Bare scalars work. Double-quote reserved and whitespace/punctuation strings (apostrophes/parentheses); quote when unsure. Quoted commas/braces literal; backslash escapes. E.g.
orders_product_name equals="Coffee Filters (100pk)".Limits: 256 rules; 256 values including settings/rule; 256 characters/literal; 16384 characters/expression.
string
Grammar: <field> <operator form>
isNull [0 values]notNull [0 values]equals=<value>[,<value>...] [1+ values]notEquals=<value>[,<value>...] [1+ values]startsWith=<value>[,<value>...] [1+ values]endsWith=<value>[,<value>...] [1+ values]include=<value>[,<value>...] [1+ values]doesNotInclude=<value>[,<value>...] [1+ values]
number
Grammar: <field> <operator form>
isNull [0 values]notNull [0 values]equals=<value>[,<value>...] [1+ values]notEquals=<value>[,<value>...] [1+ values]lessThan=<value> [1 value]lessThanOrEqual=<value> [1 value]greaterThan=<value> [1 value]greaterThanOrEqual=<value> [1 value]inBetween=<first value>,<second value> [2 values]notInBetween=<first value>,<second value> [2 values]
date
Grammar: <field> <operator form>
isNull [0 values]notNull [0 values]equals=<value>[,<value>...] [1+ values]notEquals=<value>[,<value>...] [1+ values]lessThan=<value> [1 value]lessThanOrEqual=<value> [1 value]greaterThan=<value> [1 value]greaterThanOrEqual=<value> [1 value]inThePast=<count>{unit:<unit>,completed:<bool>} [1 count; settings required]notInThePast=<count>{unit:<unit>,completed:<bool>} [1 count; settings required]inTheNext=<count>{unit:<unit>,completed:<bool>} [1 count; settings required]inTheCurrent=<unit>[{toDate:true[,excludeToday:true]}] [1 unit; settings optional]notInTheCurrent=<unit>[{toDate:true[,excludeToday:true]}] [1 unit; settings optional]inBetween=<first value>,<second value> [2 values]- Units: days, weeks, months, quarters, years; completed=false includes partial, true completed only.
- Current-period bounds: {toDate:true} ends the current week/month/quarter/year at today ("month to date"); {toDate:true,excludeToday:true} ends it at yesterday (today's partial data excluded). Not valid for days.
boolean
Grammar: <field> <operator form>
isNull [0 values]notNull [0 values]equals=<value> [1 value]notEquals=<value> [1 value]
अक्सर पूछे जाने वाले सवाल
फ़िल्टर कहाँ जाते हैं?
हर फ़िल्टर उस श्रेणी में जाता है जो उसके फ़ील्ड से मेल खाती है, जैसे डायमेंशन या मीट्रिक।
क्या फ़िल्टर समूहीकरण बदलता है?
केवल तब जब आप फ़ील्ड को समूहीकरण में जोड़ते हैं, इसलिए स्किल कहती है कि केवल-फ़िल्टर फ़ील्ड समूहीकरण में न डालें।
क्या सारे फ़िल्टर मोड उपलब्ध हैं?
स्किल हर टूल के अपने इनपुट स्कीमा का पालन करती है, इसलिए केवल वही मोड लागू होते हैं जो वह टूल सपोर्ट करता है।
जानकारी
लेखक का मूल विवरण
Author filter expressions for run_metric_query and search_field_values, including conditional custom metric filters.
repo: lightdash/lightdash
लोकप्रियता
- GitHub स्टार
- 6.2k
- रैंकिंग में स्थान
- #14397
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
breakup-pr
6.2kआपके एजेंट को बड़े pull request को छोटे, एक के ऊपर एक जुड़े हिस्सों में बाँटने में मदद करती है, जिन्हें एक-एक करके रिव्यू और मर्ज किया जा सके।
lightdash-agent-slack-messaging
6.2kआपके एजेंट को Lightdash एडमिनिस्ट्रेटरों के लिए साफ़ और मित्रवत रखरखाव तथा गतिविधि रिपोर्ट लिखने में मदद करती है, केवल उपलब्ध सबूतों के आधार पर।
developing-in-lightdash
6.2kआपके एजेंट को Lightdash डैशबोर्ड और चार्ट को JSON के रूप में पढ़ने, बनाने और संपादित करने में मदद करती है, हर चार्ट प्रकार की सेटिंग के साथ।
mcp-artifact-integration
6.2kआपके एजेंट को HTML या React artifact के अंदर Lightdash क्वेरी परिणाम दिखाने में मदद करती है, जिसमें लोडिंग, त्रुटि और खाली स्थितियाँ संभाली जाती हैं।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।