KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
datax-runner
★ 8
Open GitHub ↗
Go lib for running alibaba datax
Download README (.md)
Explore Similar Repositories
Hackintosh-CLEVO-H
:
神舟战神炫龙蓝天 8/9 代全系机型(标压) macOS 10.15 Catalina EFI NH5xRD_RC_RA_RH(Q)/NH70RD_RC_RA_RH(Q)
help-me-read
:
No description available.
nest-api-example
:
A Nestjs example API using TypeORM with SQLite.
NLP2SQL
:
No description available.
shiny.grid
:
CSS grid implementation for R/shiny
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
datax-runner
?
Download (.md)
# datax-runner 一个 lib,方便 Go 语言调起[datax](https://github.com/alibaba/datax) ## Why datax-runner 因为官方只提供了一个`python`调用的脚本 ## 示例 ```go import ( "context" "log" "time" dataxr "github.com/koolay/datax-runner" ) type StdoutLog struct { } type StderrLog struct { } func (lg *StdoutLog) Write(text string) { log.Println("[Stdout]", text) } func (lg *StderrLog) Write(text string) { log.Println("[Stderr]", text) } func main() { datax := dataxr.NewDataX(dataxr.Config{ Debug: true, Xms: "512m", Xmx: "512m", Loglevel: "error", DataxHome: "./datax", Mode: "", Jobid: "1", ConfigFile: "./datax_stream_job.json", }, &StdoutLog{}, &StderrLog{}) ctx := context.Background() pid, err := datax.Exec(ctx, "java") if err != nil { log.Fatal(err) } log.Println("pid", pid) err = datax.Wait(ctx, 30*time.Second) if err != nil { log.Fatal(err) } } ```