Skip to content

Commit

Permalink
fix format build (#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhizor authored Nov 10, 2020
1 parent 4f851a6 commit 8c7129c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
/*
* MIT License
*
* Copyright (c) 2020 Airbyte
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package io.airbyte.integrations.base;

public class NamingHelper {

public static String getRawTableName(String streamName) {
return streamName + "_raw";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ protected JsonNode getFailCheckConfig() throws Exception {
protected List<JsonNode> retrieveRecords(TestDestinationEnv env, String streamName) throws Exception {
final QueryJobConfiguration queryConfig =
QueryJobConfiguration
.newBuilder(String.format("SELECT * FROM %s.%s;", dataset.getDatasetId().getDataset(), NamingHelper.getRawTableName(streamName.toLowerCase())))
.newBuilder(
String.format("SELECT * FROM %s.%s;", dataset.getDatasetId().getDataset(), NamingHelper.getRawTableName(streamName.toLowerCase())))
.setUseLegacySql(false).build();

return StreamSupport
Expand All @@ -102,7 +103,8 @@ protected List<JsonNode> retrieveRecords(TestDestinationEnv env, String streamNa
protected void setup(TestDestinationEnv testEnv) throws Exception {
if (!Files.exists(CREDENTIALS_PATH)) {
throw new IllegalStateException(
"Must provide path to a big query credentials file. By default {module-root}/" + CREDENTIALS_PATH + ". Override by setting setting path with the CREDENTIALS_PATH constant.");
"Must provide path to a big query credentials file. By default {module-root}/" + CREDENTIALS_PATH
+ ". Override by setting setting path with the CREDENTIALS_PATH constant.");
}

final String credentialsJsonString = new String(Files.readAllBytes(CREDENTIALS_PATH));
Expand Down

0 comments on commit 8c7129c

Please sign in to comment.