dagDemo.dag 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. {
  2. "user_name": "XXX",
  3. "user_id": 1,
  4. "nodes_task_name": "dfs",
  5. "nodes_task_id": 123,
  6. "itermidate_data": [
  7. "hdfs://host:port/uri"
  8. ],
  9. "nodes": [
  10. {
  11. "id": "c180bdb3-c29b-4c3f-9ca5-706aa7104144",
  12. "name": "outputNode1",
  13. "op": "datasource",
  14. "data": {
  15. "output_source": [
  16. {
  17. "dataField": "name",
  18. "dataType": "string"
  19. },
  20. {
  21. "dataField": "address",
  22. "dataType": "string"
  23. }
  24. ]
  25. }
  26. },
  27. {
  28. "id": "d8e031c0-f87c-445d-8451-eb8f7bf416cb",
  29. "name": "inputNode1",
  30. "op": "datasource",
  31. "data": {
  32. "input_source": [
  33. {
  34. "dataSelect": false,
  35. "dataField": "name",
  36. "dataType": "string"
  37. },
  38. {
  39. "dataSelect": true,
  40. "dataField": "address",
  41. "dataType": "string"
  42. }
  43. ],
  44. "input_table": 5
  45. }
  46. },
  47. {
  48. "id": "2f04affc-9c4d-4c88-80d3-6c8a95743110",
  49. "name": "SqlNode1",
  50. "op": "sql",
  51. "data": {
  52. "input_number": 2,
  53. "output": [
  54. {
  55. "outputVar": "r1"
  56. }
  57. ],
  58. "script": "select * from table1",
  59. "param": "sql params"
  60. }
  61. },
  62. {
  63. "id": "6e673e3f-87e6-4f68-8c69-14a14057faf6",
  64. "name": "PysparkNode1",
  65. "op": "pyspark",
  66. "data": {
  67. "input_number": 1,
  68. "output": [
  69. {
  70. "outputVar": "r1"
  71. },
  72. {
  73. "outputVar": "r2"
  74. }
  75. ],
  76. "script": "import os\n\nprint('hello pyspark')",
  77. "param": "pyspark params",
  78. "package": "jupyterlab = 1.1"
  79. }
  80. },
  81. {
  82. "id": "6aeed233-0951-4637-99e8-4736262edc94",
  83. "name": "PythonNode1",
  84. "op": "python",
  85. "data": {
  86. "input_number": 2,
  87. "output": [
  88. {
  89. "outputVar": "r1"
  90. },
  91. {
  92. "outputVar": "r2"
  93. },
  94. {
  95. "outputVar": "r3"
  96. }
  97. ],
  98. "script": "import os\n\nprint('hello python')\n",
  99. "param": "python params"
  100. }
  101. }
  102. ],
  103. "edges": [
  104. {
  105. "id": "d6ec13bd-1feb-4394-ace7-973874600b4a",
  106. "source": "d8e031c0-f87c-445d-8451-eb8f7bf416cb",
  107. "target": "c180bdb3-c29b-4c3f-9ca5-706aa7104144"
  108. }
  109. ],
  110. "graph": {
  111. "cells": [
  112. {
  113. "shape": "dag-edge",
  114. "attrs": {
  115. "line": {
  116. "strokeDasharray": ""
  117. }
  118. },
  119. "id": "d6ec13bd-1feb-4394-ace7-973874600b4a",
  120. "zIndex": -1,
  121. "source": {
  122. "cell": "d8e031c0-f87c-445d-8451-eb8f7bf416cb",
  123. "port": "bottomPort"
  124. },
  125. "target": {
  126. "cell": "c180bdb3-c29b-4c3f-9ca5-706aa7104144",
  127. "port": "topPort"
  128. }
  129. },
  130. {
  131. "position": {
  132. "x": 350,
  133. "y": 530
  134. },
  135. "size": {
  136. "width": 180,
  137. "height": 80
  138. },
  139. "view": "react-shape-view",
  140. "shape": "dag-node",
  141. "component": {
  142. "key": null,
  143. "ref": null,
  144. "props": {},
  145. "_owner": null,
  146. "_store": {}
  147. },
  148. "portMarkup": [
  149. {
  150. "tagName": "foreignObject",
  151. "selector": "fo",
  152. "children": [
  153. {
  154. "ns": "http://www.w3.org/1999/xhtml",
  155. "tagName": "body",
  156. "selector": "foBody",
  157. "attrs": {
  158. "xmlns": "http://www.w3.org/1999/xhtml"
  159. },
  160. "style": {
  161. "width": "100%",
  162. "height": "100%",
  163. "background": "transparent"
  164. },
  165. "children": [
  166. {
  167. "tagName": "div",
  168. "selector": "foContent",
  169. "style": {
  170. "width": "100%",
  171. "height": "100%"
  172. }
  173. }
  174. ]
  175. }
  176. ]
  177. }
  178. ],
  179. "ports": {
  180. "groups": {
  181. "top": {
  182. "position": "top",
  183. "attrs": {
  184. "fo": {
  185. "width": 10,
  186. "height": 10,
  187. "x": -5,
  188. "y": -5,
  189. "magnet": "true"
  190. },
  191. "circle": {
  192. "r": 4,
  193. "magnet": true,
  194. "stroke": "#C2C8D5",
  195. "strokeWidth": 1,
  196. "fill": "#fff"
  197. }
  198. }
  199. },
  200. "bottom": {
  201. "position": "bottom",
  202. "attrs": {
  203. "fo": {
  204. "width": 10,
  205. "height": 10,
  206. "x": -5,
  207. "y": -5,
  208. "magnet": "true"
  209. },
  210. "circle": {
  211. "r": 4,
  212. "magnet": true,
  213. "stroke": "#C2C8D5",
  214. "strokeWidth": 1,
  215. "fill": "#fff"
  216. }
  217. }
  218. }
  219. },
  220. "items": [
  221. {
  222. "id": "topPort",
  223. "group": "top"
  224. }
  225. ]
  226. },
  227. "id": "c180bdb3-c29b-4c3f-9ca5-706aa7104144",
  228. "data": {
  229. "label": "OutputSource",
  230. "status": "default",
  231. "type": "outputsource",
  232. "id": "c180bdb3-c29b-4c3f-9ca5-706aa7104144",
  233. "nodeName": "outputNode1",
  234. "outputSource": [
  235. {
  236. "dataField": "name",
  237. "dataType": "string"
  238. },
  239. {
  240. "dataField": "address",
  241. "dataType": "string"
  242. }
  243. ],
  244. "inputNumber": 0
  245. },
  246. "zIndex": 7
  247. },
  248. {
  249. "position": {
  250. "x": 250,
  251. "y": 120
  252. },
  253. "size": {
  254. "width": 180,
  255. "height": 80
  256. },
  257. "view": "react-shape-view",
  258. "shape": "dag-node",
  259. "component": {
  260. "key": null,
  261. "ref": null,
  262. "props": {},
  263. "_owner": null,
  264. "_store": {}
  265. },
  266. "portMarkup": [
  267. {
  268. "tagName": "foreignObject",
  269. "selector": "fo",
  270. "children": [
  271. {
  272. "ns": "http://www.w3.org/1999/xhtml",
  273. "tagName": "body",
  274. "selector": "foBody",
  275. "attrs": {
  276. "xmlns": "http://www.w3.org/1999/xhtml"
  277. },
  278. "style": {
  279. "width": "100%",
  280. "height": "100%",
  281. "background": "transparent"
  282. },
  283. "children": [
  284. {
  285. "tagName": "div",
  286. "selector": "foContent",
  287. "style": {
  288. "width": "100%",
  289. "height": "100%"
  290. }
  291. }
  292. ]
  293. }
  294. ]
  295. }
  296. ],
  297. "ports": {
  298. "groups": {
  299. "top": {
  300. "position": "top",
  301. "attrs": {
  302. "fo": {
  303. "width": 10,
  304. "height": 10,
  305. "x": -5,
  306. "y": -5,
  307. "magnet": "true"
  308. }
  309. }
  310. },
  311. "bottom": {
  312. "position": "bottom",
  313. "attrs": {
  314. "fo": {
  315. "width": 10,
  316. "height": 10,
  317. "x": -5,
  318. "y": -5,
  319. "magnet": "true"
  320. }
  321. }
  322. }
  323. },
  324. "items": [
  325. {
  326. "id": "bottomPort",
  327. "group": "bottom"
  328. }
  329. ]
  330. },
  331. "id": "d8e031c0-f87c-445d-8451-eb8f7bf416cb",
  332. "data": {
  333. "label": "InputSource",
  334. "status": "default",
  335. "type": "datasource",
  336. "id": "d8e031c0-f87c-445d-8451-eb8f7bf416cb",
  337. "nodeName": "inputNode1",
  338. "dataTable": 5,
  339. "inputSource": [
  340. {
  341. "dataSelect": false,
  342. "dataField": "name",
  343. "dataType": "string"
  344. },
  345. {
  346. "dataSelect": true,
  347. "dataField": "address",
  348. "dataType": "string"
  349. }
  350. ]
  351. },
  352. "zIndex": 8
  353. },
  354. {
  355. "position": {
  356. "x": 90,
  357. "y": 370
  358. },
  359. "size": {
  360. "width": 180,
  361. "height": 36
  362. },
  363. "view": "react-shape-view",
  364. "shape": "dag-node",
  365. "component": {
  366. "key": null,
  367. "ref": null,
  368. "props": {},
  369. "_owner": null,
  370. "_store": {}
  371. },
  372. "portMarkup": [
  373. {
  374. "tagName": "foreignObject",
  375. "selector": "fo",
  376. "children": [
  377. {
  378. "ns": "http://www.w3.org/1999/xhtml",
  379. "tagName": "body",
  380. "selector": "foBody",
  381. "attrs": {
  382. "xmlns": "http://www.w3.org/1999/xhtml"
  383. },
  384. "style": {
  385. "width": "100%",
  386. "height": "100%",
  387. "background": "transparent"
  388. },
  389. "children": [
  390. {
  391. "tagName": "div",
  392. "selector": "foContent",
  393. "style": {
  394. "width": "100%",
  395. "height": "100%"
  396. }
  397. }
  398. ]
  399. }
  400. ]
  401. }
  402. ],
  403. "ports": {
  404. "groups": {
  405. "top": {
  406. "position": "top",
  407. "attrs": {
  408. "fo": {
  409. "width": 10,
  410. "height": 10,
  411. "x": -5,
  412. "y": -5,
  413. "magnet": "true"
  414. }
  415. }
  416. },
  417. "bottom": {
  418. "position": "bottom",
  419. "attrs": {
  420. "fo": {
  421. "width": 10,
  422. "height": 10,
  423. "x": -5,
  424. "y": -5,
  425. "magnet": "true"
  426. }
  427. }
  428. }
  429. },
  430. "items": []
  431. },
  432. "id": "2f04affc-9c4d-4c88-80d3-6c8a95743110",
  433. "data": {
  434. "label": "sql",
  435. "status": "undone",
  436. "type": "script",
  437. "id": "2f04affc-9c4d-4c88-80d3-6c8a95743110",
  438. "paramText": "sql params",
  439. "nodeName": "SqlNode1",
  440. "scriptText": "select * from table1",
  441. "outputData": [
  442. {
  443. "outputVar": "r1"
  444. }
  445. ],
  446. "inputNumber": 2,
  447. "outputNumber": 1
  448. },
  449. "zIndex": 9
  450. },
  451. {
  452. "position": {
  453. "x": 360,
  454. "y": 380
  455. },
  456. "size": {
  457. "width": 180,
  458. "height": 36
  459. },
  460. "view": "react-shape-view",
  461. "shape": "dag-node",
  462. "component": {
  463. "key": null,
  464. "ref": null,
  465. "props": {},
  466. "_owner": null,
  467. "_store": {}
  468. },
  469. "portMarkup": [
  470. {
  471. "tagName": "foreignObject",
  472. "selector": "fo",
  473. "children": [
  474. {
  475. "ns": "http://www.w3.org/1999/xhtml",
  476. "tagName": "body",
  477. "selector": "foBody",
  478. "attrs": {
  479. "xmlns": "http://www.w3.org/1999/xhtml"
  480. },
  481. "style": {
  482. "width": "100%",
  483. "height": "100%",
  484. "background": "transparent"
  485. },
  486. "children": [
  487. {
  488. "tagName": "div",
  489. "selector": "foContent",
  490. "style": {
  491. "width": "100%",
  492. "height": "100%"
  493. }
  494. }
  495. ]
  496. }
  497. ]
  498. }
  499. ],
  500. "ports": {
  501. "groups": {
  502. "top": {
  503. "position": "top",
  504. "attrs": {
  505. "fo": {
  506. "width": 10,
  507. "height": 10,
  508. "x": -5,
  509. "y": -5,
  510. "magnet": "true"
  511. }
  512. }
  513. },
  514. "bottom": {
  515. "position": "bottom",
  516. "attrs": {
  517. "fo": {
  518. "width": 10,
  519. "height": 10,
  520. "x": -5,
  521. "y": -5,
  522. "magnet": "true"
  523. }
  524. }
  525. }
  526. },
  527. "items": []
  528. },
  529. "id": "6e673e3f-87e6-4f68-8c69-14a14057faf6",
  530. "data": {
  531. "label": "pyspark",
  532. "status": "undone",
  533. "type": "script",
  534. "id": "6e673e3f-87e6-4f68-8c69-14a14057faf6",
  535. "paramText": "pyspark params",
  536. "nodeName": "PysparkNode1",
  537. "scriptText": "import os\n\nprint('hello pyspark')",
  538. "outputData": [
  539. {
  540. "outputVar": "r1"
  541. },
  542. {
  543. "outputVar": "r2"
  544. }
  545. ],
  546. "inputNumber": 1,
  547. "packageData": "jupyterlab = 1.1",
  548. "outputNumber": 2
  549. },
  550. "zIndex": 10
  551. },
  552. {
  553. "position": {
  554. "x": 580,
  555. "y": 320
  556. },
  557. "size": {
  558. "width": 180,
  559. "height": 36
  560. },
  561. "view": "react-shape-view",
  562. "shape": "dag-node",
  563. "component": {
  564. "key": null,
  565. "ref": null,
  566. "props": {},
  567. "_owner": null,
  568. "_store": {}
  569. },
  570. "portMarkup": [
  571. {
  572. "tagName": "foreignObject",
  573. "selector": "fo",
  574. "children": [
  575. {
  576. "ns": "http://www.w3.org/1999/xhtml",
  577. "tagName": "body",
  578. "selector": "foBody",
  579. "attrs": {
  580. "xmlns": "http://www.w3.org/1999/xhtml"
  581. },
  582. "style": {
  583. "width": "100%",
  584. "height": "100%",
  585. "background": "transparent"
  586. },
  587. "children": [
  588. {
  589. "tagName": "div",
  590. "selector": "foContent",
  591. "style": {
  592. "width": "100%",
  593. "height": "100%"
  594. }
  595. }
  596. ]
  597. }
  598. ]
  599. }
  600. ],
  601. "ports": {
  602. "groups": {
  603. "top": {
  604. "position": "top",
  605. "attrs": {
  606. "fo": {
  607. "width": 10,
  608. "height": 10,
  609. "x": -5,
  610. "y": -5,
  611. "magnet": "true"
  612. }
  613. }
  614. },
  615. "bottom": {
  616. "position": "bottom",
  617. "attrs": {
  618. "fo": {
  619. "width": 10,
  620. "height": 10,
  621. "x": -5,
  622. "y": -5,
  623. "magnet": "true"
  624. }
  625. }
  626. }
  627. },
  628. "items": []
  629. },
  630. "id": "6aeed233-0951-4637-99e8-4736262edc94",
  631. "data": {
  632. "label": "python",
  633. "status": "undone",
  634. "type": "script",
  635. "id": "6aeed233-0951-4637-99e8-4736262edc94",
  636. "paramText": "python params",
  637. "nodeName": "PythonNode1",
  638. "scriptText": "import os\n\nprint('hello python')\n",
  639. "outputData": [
  640. {
  641. "outputVar": "r1"
  642. },
  643. {
  644. "outputVar": "r2"
  645. },
  646. {
  647. "outputVar": "r3"
  648. }
  649. ],
  650. "inputNumber": 2,
  651. "outputNumber": 3
  652. },
  653. "zIndex": 11
  654. }
  655. ]
  656. }
  657. }