Apache Doris Stream Loader Golang API
Stream-Load-Manual user curl command to load data, doris-stream-loader with Golang API code.
go get github.com/yale8848/doris-stream-loader@v0.1.4
- Init
ld:= doris.New(doris.LoadConfig{Host:"172.16.1.244:8030",DBName:"db_dxh",TableName:"dxh_log2",User:"root",Password:"123456"})
- Stream Load
res,err:=ld.LoadByFile("data.txt",doris.WithLabel("001"),
doris.WithColumnSeparator(","))
CheckErr(err)
fmt.Printf("%+v\r\n",res)
- GET LABEL STATE
res,err:=ld.LabelState("001")
CheckErr(err)
fmt.Printf("%+v\r\n",res)
- CANCEL LABEL
res,err:=ld.LabelCancel("001")
CheckErr(err)
fmt.Printf("%+v\r\n",res)