subWorkflow

Definition

๋‹ค๋ฅธ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ํ•˜๋‚˜์˜ Node๋กœ ์‹คํ–‰ ํ•  ์ˆ˜ ์žˆ๋‹ค. [Flow๊ตฌ์„ฑ]๋…ธ๋“œ ์ค‘ [subWorkflow]๋…ธ๋“œ๋ฅผ drag & drop ํ•œ ํ›„ Property ํ•ญ๋ชฉ์„ ์ž…๋ ฅํ•œ๋‹ค. Property ํŒจ๋„์˜ [๋”๋ณด๊ธฐ+] ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ์ž…๋ ฅ๊ฐ€๋Šฅํ•œ ์ „์ฒด Property ํ•ญ๋ชฉ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

๋ชฉ๋ก ์—ด๊ธฐ๋ฅผ ๋ˆ„๋ฅด๋ฉด ๋ชฉ๋ก์ด ํŒ์—… ๋˜๊ณ  ์ด์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•˜๋ฉด ์›Œํฌํ”Œ๋กœ์šฐ ๋ฒˆํ˜ธ๊ฐ€ ์ž…๋ ฅ ๋œ๋‹ค.

Set

[setting], [scheduler], [parameter] ์„ค์ •์€ [์›Œํฌํ”Œ๋กœ์šฐ ์ƒ์„ฑ] > [์„ค์ •]์„ ์ฐธ๊ณ ํ•œ๋‹ค.

property

[Node Description] ์ž‘์„ฑ ์ค‘์ธ ๋…ธ๋“œ๋ช… ์ž…๋ ฅ

flow024

  1. propagateConfiguration : subWorkflow ์„ค์ • ์ „๋‹ฌ ์—ฌ๋ถ€ ์„ ํƒ
  2. appPath : subworkflow ๋ชฉ๋ก์ฐฝ์—์„œ ๋Œ€์ƒ ์›Œํฌํ”Œ๋กœ์šฐ ์„ ํƒ. ์„ ํƒํ•˜๋ฉด workflowId, workflowName์€ ์ž๋™ ์„ค์ •๋จ
  3. workflowId : ์›Œํฌํ”Œ๋กœ์šฐ ID
  4. workflowName : ์›Œํฌํ”Œ๋กœ์šฐ ์ด๋ฆ„
  5. configuration : key-value๋กœ ์„ค์ •
  6. forceOK : ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ๊ฐ€ ์‹คํŒจํ•ด๋„ ์ •์ƒ์œผ๋กœ ํ‘œ์‹œํ•˜๊ณ  ์ข…๋ฃŒ

Example

executeHive(create table as select ์ฟผ๋ฆฌ ์‹คํ–‰)๋…ธ๋“œ๊ฐ€ ์‹คํ–‰๋˜๋Š” ์›Œํฌํ”Œ๋กœ์šฐ(G1378)๋ฅผ subWorkflow๋กœ ์„ค์ • ํ›„ ์‹คํ–‰ ๋ฐ ๊ฒฐ๊ณผ๊นŒ์ง€ ํ™•์ธํ•œ๋‹ค.

  1. executeHive workflow ์ƒ์„ฑ
create table air_pollution_subworkflow_test
as select * from air_pollution limit 10

flow041

  1. [subWorkflow]๋…ธ๋“œ๋ฅผ drag & drop ํ•œ ํ›„ Property ํ•ญ๋ชฉ์„ ์ž…๋ ฅํ•œ๋‹ค. 1๋ฒˆ์—์„œ ์ž‘์„ฑํ•œ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ฐพ์•„ ๋“ฑ๋กํ•œ๋‹ค.

flow042

  1. subworkflow ์‹คํ–‰๊ฒฐ๊ณผ executeHive๋…ธ๋“œ์— ์„ค์ •ํ•œ ์ฟผ๋ฆฌ๊ฐ€ ์ •์ƒ ์‹คํ–‰๋˜์—ˆ๋‹ค.

flow043