Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery Destination : Fix GCS processing of Facebook data #9415

Merged
merged 8 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-bigquery-denormalized

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.2.2
LABEL io.airbyte.version=0.2.3
LABEL io.airbyte.name=airbyte/destination-bigquery-denormalized
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static JsonNode getSchema() {
+ " \"string\"\n"
+ " ]\n"
+ " },\n"
+ " \"permissions\": {\n"
+ " \"permission-list\": {\n"
+ " \"type\": [\n"
+ " \"array\"\n"
+ " ],\n"
Expand Down Expand Up @@ -135,7 +135,7 @@ public static JsonNode getSchemaWithInvalidArrayType() {
+ " \"string\"\n"
+ " ]\n"
+ " },\n"
+ " \"permissions\": {\n"
+ " \"permission-list\": {\n"
+ " \"type\": [\n"
+ " \"array\"\n"
+ " ],\n"
Expand Down Expand Up @@ -167,7 +167,7 @@ public static JsonNode getData() {
"{\n"
+ " \"name\": \"Andrii\",\n"
+ " \"accepts_marketing_updated_at\": \"2021-10-11T06:36:53-07:00\",\n"
+ " \"permissions\": [\n"
+ " \"permission-list\": [\n"
+ " {\n"
+ " \"domain\": \"abs\",\n"
+ " \"grants\": [\n"
Expand Down Expand Up @@ -266,7 +266,7 @@ public static JsonNode getDataWithEmptyObjectAndArray() {
return Jsons.deserialize(
"{\n"
+ " \"name\": \"Andrii\",\n"
+ " \"permissions\": [\n"
+ " \"permission-list\": [\n"
+ " {\n"
+ " \"domain\": \"abs\",\n"
+ " \"items\": {},\n" // empty object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-bigquery

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.6.2
LABEL io.airbyte.version=0.6.3
LABEL io.airbyte.name=airbyte/destination-bigquery
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ ENV APPLICATION destination-s3

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.2.2
LABEL io.airbyte.version=0.2.3
LABEL io.airbyte.name=airbyte/destination-s3
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected String applyDefaultCase(final String input) {

@Override
public String getIdentifier(final String name) {
return checkFirsCharInStreamName(convertStreamName(name));
return replaceForbiddenCharacters(checkFirsCharInStreamName(convertStreamName(name)));
}

private String checkFirsCharInStreamName(final String name) {
Expand All @@ -26,4 +26,8 @@ private String checkFirsCharInStreamName(final String name) {
}
}

private String replaceForbiddenCharacters(final String name) {
return name.replace("-", "_");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public Schema getAvroSchema(final JsonNode jsonSchema,
// Omit the namespace for root level fields, because it is directly assigned in the builder above.
// This may not be the correct choice.
? null
: (fieldNamespace == null ? fieldName : (fieldNamespace + "." + fieldName));
: (fieldNamespace == null ? stdName : (fieldNamespace + "." + stdName));
fieldBuilder.type(parseJsonField(subfieldName, subfieldNamespace, subfieldDefinition, appendExtraProps, addStringToLogicalTypes))
.withDefault(null);
}
Expand Down