downloading-batch-export-files
하는 일
이 스킬은 PostHog에서 일회성 데이터 내보내기를 시작하고, 완성된 파일을 다운로드합니다. 자체 도구에 쓸 원시 데이터를 파일로 필요로 하는 분석가를 위한 것입니다.
사용하는 경우
- ✓특정 날짜 범위의 원시 이벤트, 사람, 세션을 다운로드해야 할 때.
- ✓HogQL 쿼리 결과를 파일로 저장하고 싶을 때.
- ✓다른 도구에 불러올 Parquet나 JSON Lines 파일이 필요할 때.
스킬 링크
https://github.com/PostHog/posthog/blob/master/products/batch_exports/skills/downloading-batch-export-files/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“지난주 모든 이벤트를 Parquet 파일로 내보내서 분석 도구에 불러올 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 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 쿼리 결과를 내보낼 수 있습니다.
날짜 범위에 제한이 있나요?
네. 시작일과 종료일을 모두 주면 순서가 맞아야 하고, 간격은 1주일을 넘을 수 없습니다.
미래 날짜를 내보낼 수 있나요?
아니요. 날짜는 미래일 수 없습니다.
상세 정보
작성자의 원본 설명
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
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
depot-ci
41k에이전트가 GitHub Actions 대안인 Depot CI 워크플로를 설정하고 실행하도록 돕습니다. 기존 워크플로 이전과 실행 로그 읽기를 포함합니다.
depot-container-builds
41k에이전트가 Depot 원격 빌더에서 Docker 이미지를 빌드하도록 돕습니다. 다중 플랫폼 이미지, 레지스트리 푸시, 빌드 실패 수정을 포함합니다.
depot-github-runners
41k에이전트가 GitHub Actions 작업을 Depot 관리형 러너로 옮기고, 러너 크기와 라벨을 고르도록 돕습니다.
editing-agents-md
41k에이전트가 규칙을 AGENTS.md나 CLAUDE.md 중 어디에 둘지 정하고, 파일을 키우지 않으면서 잘 지켜지도록 쓰게 돕습니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.