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

🐛 Destination S3: fixed s3 destination field naming for Parquet and Avro formats #5729

Merged
merged 32 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
34add9a
fixed s3 destination field naming for Parquet and Avro formats
andriikorotkov Aug 30, 2021
a8fbb9d
pull request number update
andriikorotkov Aug 30, 2021
45407f5
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 2, 2021
266928e
updated resources for parquet
andriikorotkov Sep 3, 2021
feb83c1
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 3, 2021
beb4030
snowflake s3 destination COPY is writing records from different table…
andriikorotkov Sep 8, 2021
1c461ec
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 8, 2021
fd3cfe9
fixed s3 destination name transformer
andriikorotkov Sep 8, 2021
9f437f4
updated s3 destination name transformer
andriikorotkov Sep 9, 2021
c173b89
updated snowflake s3 file name
andriikorotkov Sep 9, 2021
43b4ec7
updated snowflake documentation
andriikorotkov Sep 9, 2021
5298862
updated snowflake documentation
andriikorotkov Sep 9, 2021
edf9c46
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 9, 2021
25d0e9b
updated snowflake documentation
andriikorotkov Sep 9, 2021
3504bda
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 9, 2021
6ef8937
updated code style
andriikorotkov Sep 9, 2021
b2533b1
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 9, 2021
9f740f4
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 9, 2021
d453953
updated code style
andriikorotkov Sep 9, 2021
a7cd3ca
updated code style
andriikorotkov Sep 9, 2021
d11148a
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 9, 2021
a63832b
updated redshift destination
andriikorotkov Sep 10, 2021
90ddd74
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 10, 2021
9bcc52b
added test data for test filed with bad first char
andriikorotkov Sep 10, 2021
235a01a
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 10, 2021
a2676b1
updated s3 documentation
andriikorotkov Sep 10, 2021
e36d1ab
fixed remarks
andriikorotkov Sep 10, 2021
cd13b97
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 13, 2021
6b66cd5
Merge branch 'akorotkov/5664-snowflake-s3-copy-fix' of github.com:air…
andriikorotkov Sep 13, 2021
cd043bc
Merge branch 'master' of github.com:airbytehq/airbyte into akorotkov/…
andriikorotkov Sep 13, 2021
9ffa857
fixed code style
andriikorotkov Sep 13, 2021
e3f783a
fixed s3 tests
andriikorotkov Sep 13, 2021
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 @@ -2,6 +2,6 @@
"destinationDefinitionId": "4816b78f-1489-44c1-9060-4b19d5fa9362",
"name": "S3",
"dockerRepository": "airbyte/destination-s3",
"dockerImageTag": "0.1.10",
"dockerImageTag": "0.1.11",
"documentationUrl": "https://docs.airbyte.io/integrations/destinations/s3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- destinationDefinitionId: 4816b78f-1489-44c1-9060-4b19d5fa9362
name: S3
dockerRepository: airbyte/destination-s3
dockerImageTag: 0.1.10
dockerImageTag: 0.1.11
documentationUrl: https://docs.airbyte.io/integrations/destinations/s3
- destinationDefinitionId: f7a7d195-377f-cf5b-70a5-be6b819019dc
name: Redshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar

RUN tar xf ${APPLICATION}.tar --strip-components=1

LABEL io.airbyte.version=0.1.10
LABEL io.airbyte.version=0.1.11
LABEL io.airbyte.name=airbyte/destination-s3
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* 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.destination.s3;

import com.google.common.annotations.VisibleForTesting;
import io.airbyte.integrations.destination.ExtendedNameTransformer;

@VisibleForTesting
andriikorotkov marked this conversation as resolved.
Show resolved Hide resolved
public class S3NameTransformer extends ExtendedNameTransformer {

@Override
protected String applyDefaultCase(String input) {
return super.convertStreamName(input).toLowerCase();
}

@Override
public String getIdentifier(String name) {
return "_" + convertStreamName(name);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import com.google.common.base.Preconditions;
import io.airbyte.commons.util.MoreIterators;
import io.airbyte.integrations.base.JavaBaseConstants;
import io.airbyte.integrations.destination.StandardNameTransformer;
import io.airbyte.integrations.destination.s3.S3NameTransformer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -62,7 +62,7 @@ public class JsonToAvroSchemaConverter {
private static final Logger LOGGER = LoggerFactory.getLogger(JsonToAvroSchemaConverter.class);
private static final Schema TIMESTAMP_MILLIS_SCHEMA = LogicalTypes.timestampMillis()
.addToSchema(Schema.create(Type.LONG));
private static final StandardNameTransformer NAME_TRANSFORMER = new StandardNameTransformer();
private static final S3NameTransformer NAME_TRANSFORMER = new S3NameTransformer();

private final Map<String, String> standardizedNames = new HashMap<>();

Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ Under the hood, an Airbyte data stream in Json schema is first converted to an A

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.1.11 | 2021-08-30 | [#5729](https://github.com/airbytehq/airbyte/pull/5729) | Updated the field names to start with `_` for formats `Parquet` and `Avro`. |
| 0.1.10 | 2021-09-13 | [#4699](https://github.com/airbytehq/airbyte/pull/4699) | Added json config validator |
| 0.1.9 | 2021-07-12 | [#4666](https://github.com/airbytehq/airbyte/pull/4666) | Fix MinIO output for Parquet format. |
| 0.1.8 | 2021-07-07 | [#4613](https://github.com/airbytehq/airbyte/pull/4613) | Patched schema converter to support combined restrictions. |
Expand Down