Add pipeline step
create_custom_pipeline_stepCreate Step
When to use: 사용자가 파이프라인에 스텝(LOOKUP 기준표 붙이기·FORMULA 계산 컬럼·AGGREGATION 묶기)을 추가해 달라고 명시적으로 요청할 때.
When NOT to use: 사용자가 명시적으로 만들기·수정·배포를 요청하지 않았으면 호출하지 않는다 — 분석 질문에 답하려고 에셋·파이프라인·소스·스텝을 만들거나 고치지 않는다. 기존 스텝을 고치려면 update_custom_pipeline_step 을 쓴다.
Limitations: step_config 는 step_type 마다 다르다. FORMULA 는 {expression, physical_column_id, data_type}, AGGREGATION 은 {expression: {group_by[], aggregates[{function, column, alias}]}}, LOOKUP 은 기준표가 구글 시트면 {source_type=GOOGLE_SHEETS, source_spreadsheet_id, source_sheet_name, join_keys, properties}(spreadsheet_id·sheet_name 은 list_custom_pipeline_available_sources 에서 얻는다), 테이블이면 {source_type=DATA_LAKE, source_table, source_database?, join_keys, properties}(list_custom_pipeline_available_sources 의 DATA_LAKE 항목이면 table_name·schema_name 을 source_table·source_database 로 넘긴다 — source_database 를 생략하면 내 구글 시트 연동 테이블에서 찾는다), 다른 커스텀 에셋이면 {source_type=CUSTOM_ASSET, source_table, join_keys, properties}(list_custom_pipeline_available_sources 의 CUSTOM_ASSET 항목이면 table_name 을 source_table 로 넘기고 source_database 는 보내지 않는다 — 에셋 테이블은 내 시트 연동 테이블과 다른 곳에 있어 DATA_LAKE 로 보내면 찾지 못하거나 같은 이름의 시트 테이블을 읽는다)이다. join_keys 의 source_column 은 파이프라인 쪽 컬럼, target_column 은 기준표 컬럼이다. properties 의 source_column 은 기준표에서 가져올 컬럼, name 은 결과 컬럼 표시명, physical_column_id 는 결과 테이블의 실제 컬럼명(영문·숫자·밑줄)이다. 참조할 컬럼 이름은 list_custom_pipeline_columns 로 확인한다. LOOKUP 은 형식 검증이 없으므로 get_custom_pipeline_lookup_match_rate 로 붙는 건수를 확인하고, 저장·배포 전에 preview_custom_pipeline(force_build=true)으로 결과를 확인하는 것을 검증 단계로 쓴다. 초안만 바뀐다 — 지금 실행 중인 배포 버전과 대시보드 수치는 그대로이고, publish_custom_asset 으로 배포해야 반영된다.
Examples:
Q: 매출을 결제 건수로 나눈 평균 구매금액 컬럼 추가해줘 params: {'path': {'pipeline_id': 34}, 'body': {'step_type': 'FORMULA', 'name': '평균 구매금액', 'priority': 1, 'step_config': {'physical_column_id': 'avg_order_value', 'data_type': 'DOUBLE', 'expression': {'type_tag': 'BIN_FUNCTION', 'function_name': 'DIVIDE', 'lhs': {'type_tag': 'COLUMN', 'lhs': 'sales'}, 'rhs': {'type_tag': 'COLUMN', 'lhs': 'pay_cnt'}}}}}
Q: 브랜드별 매출 합계로 묶어줘 params: {'path': {'pipeline_id': 34}, 'body': {'step_type': 'AGGREGATION', 'name': '브랜드별 합계', 'priority': 2, 'step_config': {'expression': {'group_by': ['brand_name'], 'aggregates': [{'function': 'SUM', 'column': 'sales', 'alias': 'sales_sum'}]}}}}
Q: 브랜드 수수료 시트에서 수수료율을 브랜드 기준으로 붙여줘 params: {'path': {'pipeline_id': 34}, 'body': {'step_type': 'LOOKUP', 'name': '브랜드 수수료', 'priority': 1, 'step_config': {'source_type': 'GOOGLE_SHEETS', 'source_spreadsheet_id': '1AbCdEfGh', 'source_sheet_name': '수수료', 'join_keys': [{'source_column': 'brand_name', 'target_column': '브랜드'}], 'properties': [{'name': '수수료율', 'source_column': '수수료율', 'physical_column_id': 'fee_rate', 'data_type': 'DOUBLE'}]}}}
Output shape: object: {id, step_type, name, priority, step_config, updated_at}
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": {
"pipeline_id": "<pipeline_id>",
"step_type": "<step_type>",
"name": "<name>",
"step_config": "<step_config>"
},
"name": "create_custom_pipeline_step"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| priority | No | ||
| step_type | Yes | ||
| project-id | No | ||
| pipeline_id | Yes | ||
| step_config | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||