public void deleteTable(String projectId, String datasetId, String tableName) { try { bqClient.tables().delete(projectId, datasetId, tableName).execute(); LOG.info("Successfully deleted table: " + tableName); } catch (Exception e) { LOG.debug("Exception caught when deleting table: " + e.getMessage()); } }
private void deleteTable(String datasetId, String tableId) throws IOException, InterruptedException { executeWithBackOff( client.tables().delete(projectId, datasetId, tableId), String.format( "Error when trying to delete the temporary table %s in dataset %s of project %s. " + "Manual deletion may be required.", tableId, datasetId, projectId)); }
bigquery.tables().delete(exporterConfig.getBigqueryProjectId(), exporterConfig.getBigqueryDatasetId(), kind).execute();
/** * {@inheritDoc} * * <p>Tries executing the RPC for at most {@code MAX_RPC_RETRIES} times until it succeeds. * * @throws IOException if it exceeds {@code MAX_RPC_RETRIES} attempts. */ @Override public void deleteTable(TableReference tableRef) throws IOException, InterruptedException { executeWithRetries( client .tables() .delete(tableRef.getProjectId(), tableRef.getDatasetId(), tableRef.getTableId()), String.format( "Unable to delete table: %s, aborting after %d retries.", tableRef.getTableId(), MAX_RPC_RETRIES), Sleeper.DEFAULT, createDefaultBackoff(), ALWAYS_RETRY); }
void deleteTable(String projectId, String datasetId, String tableId) throws IOException { try { client.tables().delete(projectId, datasetId, tableId).execute(); } catch (GoogleJsonResponseException e) { if (e.getStatusCode() == HttpStatusCodes.STATUS_CODE_NOT_FOUND) { // Already deleted return; } throw e; } }
@Override public boolean deleteTable(String datasetId, String tableId) { try { bigquery.tables().delete(this.options.projectId(), datasetId, tableId).execute(); return true; } catch (IOException ex) { BigQueryException serviceException = translate(ex); if (serviceException.code() == HTTP_NOT_FOUND) { return false; } throw serviceException; } }
@Override public boolean deleteTable(String datasetId, String tableId) { try { bigquery.tables().delete(this.options.projectId(), datasetId, tableId).execute(); return true; } catch (IOException ex) { BigQueryException serviceException = translate(ex); if (serviceException.code() == HTTP_NOT_FOUND) { return false; } throw serviceException; } }
@Override public void cleanupExport() throws IOException { if (deleteIntermediateTable) { logger.atInfo().log( "Deleting input intermediate table: %s:%s.%s", tableToExport.getProjectId(), tableToExport.getDatasetId(), tableToExport.getTableId()); Bigquery.Tables tables = bigQueryHelper.getRawBigquery().tables(); Bigquery.Tables.Delete delete = tables.delete( tableToExport.getProjectId(), tableToExport.getDatasetId(), tableToExport.getTableId()); delete.execute(); } delegate.cleanupExport(); }
@Override public boolean deleteTable(String projectId, String datasetId, String tableId) { try { bigquery.tables().delete(projectId, datasetId, tableId).execute(); return true; } catch (IOException ex) { BigQueryException serviceException = translate(ex); if (serviceException.getCode() == HTTP_NOT_FOUND) { return false; } throw serviceException; } }
@Override public boolean deleteTable(String projectId, String datasetId, String tableId) { try { bigquery.tables().delete(projectId, datasetId, tableId).execute(); return true; } catch (IOException ex) { BigQueryException serviceException = translate(ex); if (serviceException.getCode() == HTTP_NOT_FOUND) { return false; } throw serviceException; } }