Dont know if this is connected but when executing a pipeline with cross 
language source I am getting an error too. For example

package main

import (
        "context"
        "flag"
        "reflect"

        "github.com/apache/beam/sdks/v2/go/pkg/beam"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/io/textio"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/io/xlang/bigqueryio"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/log"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/x/beamx"
)

var (
        output = flag.String("output", "output-go", "Pubsub input topic.")
)

func main() {
        flag.Parse()
        beam.Init()
        ctx := context.Background()

        p := beam.NewPipeline()
        s := p.Root()
        table := "bigquery-public-data.usa_names.usa_1910_2013"
        outType := reflect.TypeOf((*string)(nil)).Elem()
        data := bigqueryio.Read(s, outType, bigqueryio.FromTable(table))
        textio.Write(s, *output, data)

        if err := beamx.Run(context.Background(), p); err != nil {
                log.Exitf(ctx, "Failed to execute job: %v", err)
        }
}

and error is

2022/08/01 17:15:50 Failed to execute job: translation failed
        caused by:
no root units
exit status 1

Reply via email to