我正在尝试在数据流作业中调用Google数据存储区我正在获取空实例
0;;;*100
答案 0 :(得分:4)
尝试将此代码放在main函数中,而不是在数据流Pipline中。
答案 1 :(得分:1)
这可能是凭据问题。你能试试吗,
Credentials credentials = context.getPipelineOptions().as(GcpOptions.class).getGcpCredential();
Datastore datastore = DatastoreOptions.newBuilder().setCredentials(credentials).build().getService();