Publish custom asset
publish_custom_assetPublish Asset
When to use: 사용자가 에셋을 배포(발행)해 달라고 명시적으로 요청할 때 — 바뀌는 내용을 보여 주고 확인받은 뒤에만 실행한다.
When NOT to use: 사용자가 명시적으로 만들기·수정·배포를 요청하지 않았으면 호출하지 않는다 — 분석 질문에 답하려고 에셋·파이프라인·소스·스텝을 만들거나 고치지 않는다. 저장 이력만 남기려면 create_custom_pipeline_version 을 쓴다.
Limitations: 배포하면 그 순간의 초안 전체(하위 파이프라인 포함)가 새 버전으로 고정되고 실행 버전이 된다. 최대 30분 주기의 스냅샷 업로드 뒤 마트 빌드가 끝나야 대시보드 수치가 바뀐다. 커스텀 에셋·파이프라인은 같은 소유자의 모든 프로젝트가 공유하며, 발행하면 그 프로젝트들 대시보드에도 반영된다. 먼저 get_custom_asset 으로 읽고 그 draft_revision 을 expected_revision 으로 넘긴다. 409 면 그 사이 초안이 바뀐 것이다 — 409 응답의 current_revision 을 그대로 다시 보내 덮어쓰지 말고, 다시 읽어 바뀐 내용을 사용자에게 확인받은 뒤 다시 시도한다. 저장·배포 전에 preview_custom_pipeline(force_build=true)으로 결과를 확인하는 것을 검증 단계로 쓴다. 되돌리기: unpublish_custom_asset(이후 갱신만 멈춤 — 테이블·차트는 그대로, 다시 배포하면 복귀) 또는 rollback_custom_asset(이전 배포 버전으로 초안과 실행 버전을 교체).
Examples:
Q: 주문 보강 에셋 배포해줘 params: {'path': {'asset_id': 12}, 'body': {'expected_revision': '…', 'description': '수수료율 컬럼 추가'}}
Output shape: object: {id, asset_id, version_number, description, created_by, created_at, snapshot}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"asset_id": "<asset_id>",
"expected_revision": "<expected_revision>"
},
"name": "publish_custom_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset_id | Yes | ||
| project-id | No | ||
| description | No | ||
| expected_revision | Yes | Concurrency token for operations that act on a whole draft — the `draft_revision` (or column-meta `revision`) this client last read. When the draft changed since, the request is rejected with 409 and the live token. Omit to keep the legacy last-write-wins behaviour. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||