/submitUserJob

Submit a simple sqlflow job. Send the SQL files and get the data lineage result. SQLFlow job supports both of multiple files and zip archive file.

submit user job

post

Submit a simple sqlflow job. Send the SQL files and get the data lineage result. SQLFlow job supports both of multiple files and zip archive file.

Query parameters
accountstringOptional

account name of the target database

csvFormatstringOptional

Csv Format code, Format of a CSV file. used to represent the CSV in the Catalog, Schema, ObjectType, ObjectName, ObjectCode, Notes each column is the number of columns in the CSV file, does not exist it is 0. check https://www.gudusoft.com/blog/2021/09/05/sqlflow-csv/ for more detail

databasestringOptional

database metadata in the jdbc string

dbvendorstring · enumRequired

database vendor

Default: dbvoraclePossible values:
defaultDatabasestringOptional

default databse when there's no metadata

defaultSchemastringOptional

default schema

excludedDbsSchemasstringOptional

This parameters works under the resultset filtered by extractedDbsSchemas. List of databases and schemas to exclude from extraction, separated by commas database1/schema1,database2 or database1.schema1,database2 When parameter database is filled in, this parameter is considered a schema. And support wildcard characters such as database1/,/schema,/.

extractedDbsSchemasstringOptional

List of databases and schemas to extract, separated by commas, which are to be provided in the format database/schema; Or blank to extract all databases. database1/schema1,database2/schema2,database3 or database1.schema1,database2.schema2,database3 When parameter database is filled in, this parameter is considered a schema. And support wildcard characters such as database1/,/schema,/.

extractedStoredProceduresstringOptional

A list of stored procedures under the specified database and schema to extract, separated by commas, which are to be provided in the format database.schema.procedureName or schema.procedureName; Or blank to extract all databases, support expression. database1.schema1.procedureName1,database2.schema2.procedureName2,database3.schema3,database4 or database1/schema1/procedureName1,database2/schema2

extractedViewsstringOptional

A list of stored views under the specified database and schema to extract, separated by commas, which are to be provided in the format database.schema.viewName or schema.viewName. Or blank to extract all databases, support expression. database1.schema1.procedureName1,database2.schema2.procedureName2,database3.schema3,database4 or database1/schema1/procedureName1,database2/schema2

hostnamestringOptional

db hostname

passwordstringOptional

db password

portinteger · int32Optional

db port

ignoreFunctionbooleanOptional

whether ignore Function

Default: true
ignoreRecordSetbooleanOptional

whether ignore Record Set

Default: true
jobNamestringRequired

jobName

objectCodeEncloseCharstringOptional

Character to specify the SQL content, default is "

objectCodeEscapeCharstringOptional

specifies the string to escape in case of objectCodeEncloseChar in the SQL, default is ".

onTopbooleanOptional

whether set the job on the top

Default: false
parallelbooleanOptional

whether parallelly process the job. Parallel processing will lead to a high performance while decreasing the lineage accuracy.

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
sqlsourcestringOptional

sql source

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
sqlfilesstring · binary[]Optional
Responses
200
OK
application/json;charset=utf-8
ResponsestringExample: {code=200, data={jobId=c359aef4bd9641d697732422debd8055, jobName=job1, userId=google-oauth2|104002923119102769706, dbVendor=dbvmssql, dataSource={}, fileNames=[1.sql, 1.zip], createTime=2020-12-15 15:14:39, status=create}}
post
POST /api/gspLive_backend/sqlflow/job/submitUserJob HTTP/1.1
Host: api.gudusoft.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 23

{
  "sqlfiles": [
    "binary"
  ]
}
{code=200, data={jobId=c359aef4bd9641d697732422debd8055, jobName=job1, userId=google-oauth2|104002923119102769706, dbVendor=dbvmssql, dataSource={}, fileNames=[1.sql, 1.zip], createTime=2020-12-15 15:14:39, status=create}}

Sample response:

{
	"code":200,
	"data":{
		"jobId":"c359aef4bd9641d697732422debd8055",
		"jobName":"job1",
		"userId":"google-oauth2|104002923119102769706",
		"dbVendor":"dbvmssql",
		"dataSource":{
			
		},
		"fileNames":["1.sql","1.zip"],
		"createTime":"2020-12-15 15:14:39",
		"status":"create"
	}
}

Try it out!

hint: Ignoring the temporary table starting with "#" in sqlserver is a mandatory behavior, therefore it cannot be changed.

Last updated