/sqlflow

Generate sqlflow model

generate sqlflow

post

generate sqlflow model

Query parameters
dbvendorstring · enumRequired

database vendor

Default: dbvoraclePossible values:
simpleOutputbooleanOptional

simple output, ignore the intermediate results, defualt is false.

Default: falseExample: false
ignoreRecordSetbooleanOptional

same as simpleOutput, but will keep output of the top level select list, default is false.

Default: falseExample: false
jobIdstringOptional

give the job Id if need to use the job settings and display the job graph

normalizeIdentifierbooleanOptional

whether normalize the Identifier

Default: true
returnFullRelationshipbooleanOptional

whether return full data relationship. will return only summary info if set to false in case of exceeding the relation limit.

Default: false
showConstantTablebooleanOptional

whether show constant table

Default: false
showRelationTypestringOptional

show relation type, required false, default value is 'fdd', multiple values seperated by comma like fdd,frd,fdr,join. Availables are 'fdd' value of target column from source column, 'frd' the recordset count of target column which is affected by value of source column, 'fdr' value of target column which is affected by the recordset count of source column, 'join' combines rows from two or more tables, based on a related column between them

Default: fdd
showTransformbooleanOptional

whether show transform

Default: false
sqltextstringOptional

sql text from which to generate the sqlflow model

tokenstringRequired

The token is generated from userid and usersecret. It is used in every Api invocation.

treatArgumentsInCountFunctionAsDirectDataflowbooleanOptional

Whether treat the arguments in COUNT function as direct Dataflow

Default: false
userIdstringRequired

the user id of sqlflow web or client

Body
sqlfilestring · binaryOptional

sql file from which to generate the sqlflow model

Responses
200
OK
application/json;charset=utf-8
ResponsestringExample: {"code":200,"data":{"dbvendor":"dbvoracle","dbobjs":[{"id":"8","name":"QUERY INSERT-1","type":"process","coordinates":[{"x":1,"y":1,"hashCode":"0"},{"x":1,"y":73,"hashCode":"0"}],"queryHashId":"04ebc5aec1a07e1db80b0bc798742875"},{"id":"4","name":"RAW_CUSTOMERS","type":"table","columns":[{"id":"5","name":"ID","coordinates":[{"x":1,"y":28,"hashCode":"0"},{"x":1,"y":30,"hashCode":"0"}]},{"id":"6","name":"FIRST_NAME","coordinates":[{"x":1,"y":32,"hashCode":"0"},{"x":1,"y":42,"hashCode":"0"}]},{"id":"7","name":"LAST_NAME","coordinates":[{"x":1,"y":44,"hashCode":"0"},{"x":1,"y":53,"hashCode":"0"}]}],"coordinates":[{"x":1,"y":13,"hashCode":"0"},{"x":1,"y":26,"hashCode":"0"}]}],"relationships":[]},"sessionId":"527f2887da8bd7f5952840aa14cb05f357943aff3f5f02a6f1d7f914bca12971_1664807322126"}
post
POST /api/gspLive_backend/sqlflow/generation/sqlflow HTTP/1.1
Host: api.gudusoft.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 20

{
  "sqlfile": "binary"
}
{
  "code": 200,
  "data": {
    "dbvendor": "dbvoracle",
    "dbobjs": [
      {
        "id": "8",
        "name": "QUERY INSERT-1",
        "type": "process",
        "coordinates": [
          {
            "x": 1,
            "y": 1,
            "hashCode": "0"
          },
          {
            "x": 1,
            "y": 73,
            "hashCode": "0"
          }
        ],
        "queryHashId": "04ebc5aec1a07e1db80b0bc798742875"
      },
      {
        "id": "4",
        "name": "RAW_CUSTOMERS",
        "type": "table",
        "columns": [
          {
            "id": "5",
            "name": "ID",
            "coordinates": [
              {
                "x": 1,
                "y": 28,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 30,
                "hashCode": "0"
              }
            ]
          },
          {
            "id": "6",
            "name": "FIRST_NAME",
            "coordinates": [
              {
                "x": 1,
                "y": 32,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 42,
                "hashCode": "0"
              }
            ]
          },
          {
            "id": "7",
            "name": "LAST_NAME",
            "coordinates": [
              {
                "x": 1,
                "y": 44,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 53,
                "hashCode": "0"
              }
            ]
          }
        ],
        "coordinates": [
          {
            "x": 1,
            "y": 13,
            "hashCode": "0"
          },
          {
            "x": 1,
            "y": 26,
            "hashCode": "0"
          }
        ]
      }
    ],
    "relationships": []
  },
  "sessionId": "527f2887da8bd7f5952840aa14cb05f357943aff3f5f02a6f1d7f914bca12971_1664807322126"
}

Sample response:

{
  "code": 200,
  "data": {
    "dbvendor": "dbvoracle",
    "dbobjs": [
      {
        "id": "8",
        "name": "QUERY INSERT-1",
        "type": "process",
        "coordinates": [
          {
            "x": 1,
            "y": 1,
            "hashCode": "0"
          },
          {
            "x": 1,
            "y": 73,
            "hashCode": "0"
          }
        ],
        "queryHashId": "04ebc5aec1a07e1db80b0bc798742875"
      },
      {
        "id": "4",
        "name": "RAW_CUSTOMERS",
        "type": "table",
        "columns": [
          {
            "id": "5",
            "name": "ID",
            "coordinates": [
              {
                "x": 1,
                "y": 28,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 30,
                "hashCode": "0"
              }
            ]
          },
          {
            "id": "6",
            "name": "FIRST_NAME",
            "coordinates": [
              {
                "x": 1,
                "y": 32,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 42,
                "hashCode": "0"
              }
            ]
          },
          {
            "id": "7",
            "name": "LAST_NAME",
            "coordinates": [
              {
                "x": 1,
                "y": 44,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 53,
                "hashCode": "0"
              }
            ]
          }
        ],
        "coordinates": [
          {
            "x": 1,
            "y": 13,
            "hashCode": "0"
          },
          {
            "x": 1,
            "y": 26,
            "hashCode": "0"
          }
        ]
      }
    ],
    "relationships": []
  },
  "sessionId": "527f2887da8bd7f5952840aa14cb05f357943aff3f5f02a6f1d7f914bca12971_1664807322126"
}

Try it out!

Last updated