openapi_executesql_perjob.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* http://127.0.0.1:8888/openapi/executeSql */
  2. {
  3. /* required-start */
  4. "type":"yarn-per-job",
  5. "statement":"CREATE TABLE Orders (\r\n order_number INT,\r\n price DECIMAL(32,2),\r\n order_time TIMESTAMP(3)\r\n) WITH (\r\n 'connector' = 'datagen',\r\n 'rows-per-second' = '1',\r\n 'fields.order_number.kind' = 'sequence',\r\n 'fields.order_number.start' = '1',\r\n 'fields.order_number.end' = '1000'\r\n);\r\nCREATE TABLE pt (\r\nordertotal INT,\r\nnumtotal INT\r\n) WITH (\r\n 'connector' = 'print'\r\n);\r\ninsert into pt select 1 as ordertotal ,sum(order_number)*2 as numtotal from Orders",
  6. "gatewayConfig":{
  7. "clusterConfig":{
  8. "flinkConfigPath":"/opt/src/flink-1.13.3_conf/conf",
  9. "flinkLibPath":"hdfs:///flink13/lib/flinklib",
  10. "yarnConfigPath":"/usr/local/hadoop/hadoop-2.7.7/etc/hadoop"
  11. },
  12. "flinkConfig": {
  13. "configuration":{
  14. "parallelism.default": 1
  15. }
  16. }
  17. },
  18. /* required-end */
  19. /* default-start */
  20. "useResult":false,
  21. "useStatementSet":false,
  22. "fragment":false,
  23. "maxRowNum":100,
  24. "checkPoint":0,
  25. "parallelism":1,
  26. /* default-start */
  27. /* custom-start */
  28. "jobName":"openapitest",
  29. "savePointPath":"hdfs://ns/flink/savepoints/savepoint-5f4b8c-4326844a6843",
  30. "configuration":{
  31. "table.exec.resource.default-parallelism":2
  32. }
  33. /* custom-end */
  34. }