-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Bigquery: added gcs upload option #5614
Merged
etsybaev
merged 16 commits into
master
from
etsybaev/5296-added-gcs-upload-to-bigquery-destination
Sep 8, 2021
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3f97970
[5296] Integrated destination-gcs skeleton to bigquery destination
83c1b28
[5296] Added skeleton for migration non_normilized data from gcs to b…
9ab7549
[5296] Fixed check() method, implemented some debts for distination-b…
d9a5609
Updated destination-bigquery (gcs) to take some values from args inst…
73b1128
Added tests data clearance
1ae2bb5
Added tests for destination-bigquery (GCS) upload type
db4621a
[5298] Minor refactor
a730bcd
Merge branch 'master' into etsybaev/5296-added-gcs-upload-to-bigquery…
9adc574
Fixed args handling
e69528d
Updated docs
aba38e5
fixed spec
1f40bc2
Added option to select if we want to keep files on GCS after migratio…
30c67ac
Updated docs
e99f476
Updated README.md
a5e702d
Added javadoc describing why S3 used and bumped bigquery version
888e9ab
Merge branch 'master' into etsybaev/5296-added-gcs-upload-to-bigquery…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
airbyte-integrations/connectors/destination-bigquery/sample_secret/credentials.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"basic_bigquery_config": { | ||
"type": "service_account", | ||
"project_id": "", | ||
"private_key_id": "", | ||
"private_key": "", | ||
"client_email": "", | ||
"client_id": "", | ||
"auth_uri": "", | ||
"token_uri": "", | ||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | ||
"client_x509_cert_url": "" | ||
}, | ||
"gcs_config": { | ||
"gcs_bucket_name": "", | ||
"gcs_bucket_path": "test_path", | ||
"gcs_bucket_region": "us-west1", | ||
"credential": { | ||
"credential_type": "HMAC_KEY", | ||
"hmac_key_access_id": "", | ||
"hmac_key_secret": "" | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
...n-bigquery/src/main/java/io/airbyte/integrations/destination/bigquery/BigQueryConsts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* 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.bigquery; | ||
|
||
public class BigQueryConsts { | ||
|
||
public static final int MiB = 1024 * 1024; | ||
public static final String CONFIG_DATASET_ID = "dataset_id"; | ||
public static final String CONFIG_PROJECT_ID = "project_id"; | ||
public static final String CONFIG_DATASET_LOCATION = "dataset_location"; | ||
public static final String CONFIG_CREDS = "credentials_json"; | ||
public static final String BIG_QUERY_CLIENT_CHUNK_SIZE = "big_query_client_buffer_size_mb"; | ||
|
||
public static final String LOADING_METHOD = "loading_method"; | ||
public static final String METHOD = "method"; | ||
public static final String GCS_STAGING = "GCS Staging"; | ||
public static final String GCS_BUCKET_NAME = "gcs_bucket_name"; | ||
public static final String GCS_BUCKET_PATH = "gcs_bucket_path"; | ||
public static final String GCS_BUCKET_REGION = "gcs_bucket_region"; | ||
public static final String CREDENTIAL = "credential"; | ||
public static final String FORMAT = "format"; | ||
public static final String KEEP_GCS_FILES = "keep_files_in_gcs-bucket"; | ||
public static final String KEEP_GCS_FILES_VAL = "Keep all tmp files in GCS"; | ||
|
||
// tests | ||
public static final String BIGQUERY_BASIC_CONFIG = "basic_bigquery_config"; | ||
public static final String GCS_CONFIG = "gcs_config"; | ||
|
||
public static final String CREDENTIAL_TYPE = "credential_type"; | ||
public static final String HMAC_KEY_ACCESS_ID = "hmac_key_access_id"; | ||
public static final String HMAC_KEY_ACCESS_SECRET = "hmac_key_secret"; | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to explain further about when to choose which option. Its not clear to me when should I choose
Standard
vsGCS Uploading (CSV format)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks