Hi George,
Thanks for your reply.
While waiting, I tried directly streaming the data to BigQuery instead of
using PubSub so I created a client by following the link you gave me but
I'm getting a similar error as when I create a PubSub client:
panic: not an App Engine context
goroutine 1 [running]:
panic(0x1a83d00, 0xc010528280)
go/src/runtime/panic.go:481 +0x3e6
google.golang.org/appengine/internal.fullyQualifiedAppID(0x2ad463222500,
0xc01040f540, 0x0, 0x0)
google.golang.org/appengine/internal/identity_classic.go:54 +0x8b
google.golang.org/appengine/internal.FullyQualifiedAppID(0x2ad463222500,
0xc01040f540, 0x0, 0x0)
google.golang.org/appengine/internal/api_common.go:77 +0xe2
google.golang.org/appengine/internal.AppID(0x2ad463222500, 0xc01040f540,
0x0, 0x0)
google.golang.org/appengine/internal/identity.go:13 +0x37
google.golang.org/appengine.AppID(0x2ad463222500, 0xc01040f540, 0x0, 0x0)
google.golang.org/appengine/identity.go:20 +0x37
golang.org/x/oauth2/google.FindDefaultCredentials(0x2ad463222500,
0xc01040f540, 0xc010641470, 0x1, 0x1, 0xc010641470, 0x0, 0x0)
golang.org/x/oauth2/google/default.go:86 +0x5a8
golang.org/x/oauth2/google.DefaultTokenSource(0x2ad463222500, 0xc01040f540,
0xc010641470, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
golang.org/x/oauth2/google/default.go:43 +0x6b
google.golang.org/api/transport.NewHTTPClient(0x2ad463222500, 0xc01040f540,
0xc010583c48, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0)
google.golang.org/api/transport/dial.go:74 +0x669
cloud.google.com/go/bigquery.NewClient(0x2ad463222500, 0xc01040f540,
0x1c4f990, 0xd, 0x0, 0x0, 0x0, 0xc010400180, 0x0, 0x0)
cloud.google.com/go/bigquery/bigquery.go:54 +0x448
main.InitBigQuery()
bigquery.go:28 +0xca
main.main()
main.go:20 +0x1c
Code:
var (
ctx context.Context
bigQueryClient *bigquery.Client
)
func InitBigQuery() {
ctx = context.Background()
bqClient, err := bigquery.NewClient(ctx, "voodoo-165916")
if err != nil {
log.Println("(init big query) error while creating new bigquery
client:", err)
} else {
bigQueryClient = bqClient
InitUploader()
}
}
Le vendredi 5 mai 2017 22:51:37 UTC+2, George (Cloud Platform Support) a
écrit :
>
> The information provided is relevant. Waiting, at the moment, for input
> from developers, who might request more information soon.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/f32fbe02-0f8e-4da1-ae68-3caeaeda2cfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.