downloading-batch-export-files
यह क्या करती है
यह स्किल PostHog से एक बार का डेटा निर्यात शुरू करती है और तैयार फ़ाइल डाउनलोड करती है। यह उन विश्लेषकों के लिए है जिन्हें अपने टूल के लिए कच्चा डेटा फ़ाइल में चाहिए।
कब इस्तेमाल करें
- ✓जब आपको किसी खास तारीख की सीमा के लिए कच्चे इवेंट, लोग या सेशन डाउनलोड करने हों।
- ✓जब आप HogQL क्वेरी के नतीजे फ़ाइल के रूप में सहेजना चाहें।
- ✓जब आपको किसी दूसरे टूल में लोड करने के लिए Parquet या JSON Lines फ़ाइल चाहिए।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/products/batch_exports/skills/downloading-batch-export-files/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“पिछले हफ़्ते के सारे इवेंट Parquet फ़ाइल में निर्यात कीजिए, ताकि मैं उसे अपने विश्लेषण टूल में लोड कर सकूँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI सही सेटिंग के साथ निर्यात शुरू करता है, जैसे डेटा का प्रकार और तारीखें, फिर फ़ाइल तैयार होने तक स्थिति जाँचता है। फिर वह PostHog के डाउनलोड लिंक से फ़ाइल डाउनलोड करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Downloading batch export files
Use this skill when a user wants a one-off downloadable export of PostHog data. The export is started and monitored through MCP, but the final file download uses the existing REST endpoint directly.
Available MCP tools
| Tool | Purpose |
|---|---|
posthog:file-download-batch-exports-create |
Start an on-demand export and return the run ID |
posthog:file-download-batch-exports-retrieve |
Poll the run status and return file IDs after completion |
Do not rely on a generated MCP tool for the /download/ endpoint.
That endpoint is a redirecting file download endpoint, so raw HTTP/download handling is the right interface until MCP has explicit redirect support.
Workflow
1. Choose the export shape
Ask a short clarifying question if the user did not specify the required inputs:
model: one ofevents,persons,sessions, orhogqldata_interval_startanddata_interval_end: ISO 8601 datetimes. Any supplied bound may not be in the future. When both bounds are supplied, they must be ordered and at most one week apart Required forevents,persons, andsessions. Forhogql, required only for the placeholders the query references. If only one placeholder is referenced, the other bound may be omitted and the one-week limit does not apply.file.format:ParquetorJSONLines; preferParquetfor compact analytics exports andJSONLinesfor line-oriented text processingfile.compression: optional, one ofzstd,gzip,brotli,lz4, orsnappy. IfJSONLineswas chosen as format, onlygzipandbrotliare supported.file.max_size_mb: part size in MiB, 1024 by default. A part can go a little over this size. Lower it when the user wants smaller parts, raise it for fewer and bigger ones, or set it tonullto write a single file of any size.
For events, include and exclude are optional event-name filters.
Use them only when the user asks for specific events or wants to omit specific events.
For hogql, pass the query as hogql_query and leave out include and exclude.
You may prompt the user to export a slice of data by including a WHERE clause in the HogQL query, for example limiting results from the events table by bounding timestamp.
Always prefer limiting the data exported to the minimum necessary to solve the user's request.
Every column in the SELECT clause must be a field or have an alias.
This model is in closed beta and is enabled per team.
A hogql query can reference the {data_interval_start} and {data_interval_end} placeholders.
The export replaces them with the data_interval_start and data_interval_end values, so one query can export any interval.
Supply a bound for every placeholder the query references; a missing bound fails the request.
The bounds only replace placeholders and do not filter anything themselves, so a query without placeholders runs unchanged even when bounds are supplied.
Prefer placeholders over literal dates when the user wants a time range, or several consecutive ranges from the same query.
Compare with >= {data_interval_start} and < {data_interval_end}, so consecutive ranges do not export the same row twice.
2. Start the export
Call posthog:file-download-batch-exports-create with the selected shape.
The response contains an id for the export run.
Example request:
{
"model": "events",
"file": {
"format": "JSONLines",
"compression": "gzip"
},
"include": ["$pageview"],
"data_interval_start": "2026-05-25T00:00:00Z",
"data_interval_end": "2026-05-26T00:00:00Z"
}
Example request for the hogql model:
{
"model": "hogql",
"file": {
"format": "Parquet"
},
"hogql_query": "SELECT event, timestamp, properties.$current_url AS url FROM events WHERE timestamp >= {data_interval_start} AND timestamp < {data_interval_end}",
"data_interval_start": "2026-05-25T00:00:00Z",
"data_interval_end": "2026-05-26T00:00:00Z"
}
3. Poll until completion
Call posthog:file-download-batch-exports-retrieve with the returned id.
Status handling:
| Status | Action | | ------------------------------------------
अक्सर पूछे जाने वाले सवाल
मैं कौन सा डेटा निर्यात कर सकता हूँ?
आप इवेंट, लोग, सेशन, या HogQL क्वेरी के नतीजे निर्यात कर सकते हैं।
क्या तारीख की सीमा पर कोई पाबंदी है?
हाँ। जब शुरू और अंत दोनों तारीखें दी जाएँ, तो वे क्रम में होनी चाहिए और एक हफ़्ते से ज़्यादा दूर नहीं।
क्या भविष्य की तारीखें निर्यात हो सकती हैं?
नहीं। तारीखें भविष्य की नहीं हो सकतीं।
जानकारी
लेखक का मूल विवरण
Export PostHog events, persons, sessions, or the results of a HogQL query on demand and download the resulting files. Use when the user asks to download/export raw PostHog data, export HogQL query results, create a one-off file export, fetch a Parquet or JSONLines export, or use the file_download_batch_exports API. Covers starting the export with MCP, polling completion, and downloading via the existing REST redirect endpoint.
repo: PostHog/posthog
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6836
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
discrawl
394kयह आपके एजेंट को Discord संदेशों के सेव किए गए स्थानीय आर्काइव में खोजने, उसका सारांश बनाने और उसकी ताज़गी जांचने में मदद करती है।
clickhouse-io
280kआपके एजेंट को ClickHouse databases में queries और schemas optimize करने में मदद करता है। high-performance analytical workloads के लिए best practices लागू करता है। जब analytical queries बहुत धीमी हों, तब इसका उपयोग करें।
scientific-db-pubmed-database
280kआपके एजेंट को बायोमेडिकल क्षेत्र के वैज्ञानिक लेख खोजने में मदद करता है। जिस रिसर्च में खास मेडिकल जानकारी चाहिए, उसके लिए यह काम का है।