是否可以使用Java使用Apache Beam删除bigQuery中可用的表?
p.apply("Delete Table name", BigQueryIO.readTableRows().fromQuery("DELETE FROM Table_name where condition"));
答案 0 :(得分:1)
我使用BQ API解决了这个问题。
BigQuery bigquery = BigQueryOptions.newBuilder()。setCredentials(credential).setProjectId(ProjectName).build()。getService(); QueryJobConfiguration queryConfig = QueryJobConfiguration.newBuilder(Query).setUseLegacySql(false).build(); JobId jobId = JobId.of(UUID.randomUUID()。toString()); 作业queryJob = bigquery.create(JobInfo.newBuilder(queryConfig).setJobId(jobId).build());