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

Forward destination location to dbt profiles #6709

Merged
merged 4 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/base-normalization/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ WORKDIR /airbyte
ENV AIRBYTE_ENTRYPOINT "/airbyte/entrypoint.sh"
ENTRYPOINT ["/airbyte/entrypoint.sh"]

LABEL io.airbyte.version=0.1.48
LABEL io.airbyte.version=0.1.49
LABEL io.airbyte.name=airbyte/normalization
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def transform_bigquery(config: Dict[str, Any]):
dbt_config["keyfile_json"] = json.loads(config["credentials_json"])
else:
dbt_config["method"] = "oauth"

if "dataset_location" in config:
dbt_config["location"] = config["dataset_location"]
return dbt_config

@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ def test_pick_a_port(self):
s.bind(("localhost", supposedly_open_port))

def test_transform_bigquery(self):
input = {"project_id": "my_project_id", "dataset_id": "my_dataset_id", "credentials_json": '{ "type": "service_account-json" }'}
input = {
"project_id": "my_project_id",
"dataset_id": "my_dataset_id",
"credentials_json": '{ "type": "service_account-json" }',
"dataset_location": "EU",
}

actual_output = TransformConfig().transform_bigquery(input)
expected_output = {
Expand All @@ -139,6 +144,7 @@ def test_transform_bigquery(self):
"project": "my_project_id",
"dataset": "my_dataset_id",
"keyfile_json": {"type": "service_account-json"},
"location": "EU",
"retries": 1,
"threads": 32,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ def read_records(self, stream_slice: Optional[Mapping[str, Any]] = None, **kwarg
screen_tabs_stream = ScreenTabs(authenticator=self.authenticator, domain=self._domain)
for screen in screens_stream.read_records(sync_mode=SyncMode.full_refresh):
for tab in screen_tabs_stream.read_tab_records(stream_slice={"screen_id": screen["id"]}, **kwargs):
if id in tab: # Check for proper tab record since the ScreenTabs stream doesn't throw http errors
if id in tab: # Check for proper tab record since the ScreenTabs stream doesn't throw http errors
yield from super().read_records(stream_slice={"screen_id": screen["id"], "tab_id": tab["id"]}, **kwargs)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"type": ["null", "string"]
},
"value": {
"type": ["null", "string"]
"type": ["null", "string"]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
{"or": {"urn:li:adTargetingFacet:locations": ["urn:li:geo:103644278"]}},
{"or": {"urn:li:adTargetingFacet:interfaceLocales": ["urn:li:locale:en_US"]}},
{"or": {"empty_dict_with_empty_list": []}}, # dict is present, but list is empty
{"or": {}}, # empty dict
{"or": {"empty_dict_with_empty_list": []}}, # dict is present, but list is empty
{"or": {}}, # empty dict
]
},
"exclude": {
Expand All @@ -37,7 +37,7 @@
"facet_test3",
"facet_test4",
],
"empty_list": []
"empty_list": [],
}
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class WorkerUtils {
public static final String DEFAULT_JOBS_IMAGE_PULL_SECRET = CONFIGS.getJobsImagePullSecret();
public static final String DEFAULT_JOB_IMAGE_PULL_POLICY = CONFIGS.getJobImagePullPolicy();


public static void gentleClose(final Process process, final long timeout, final TimeUnit timeUnit) {
if (process == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DefaultNormalizationRunner implements NormalizationRunner {

private static final Logger LOGGER = LoggerFactory.getLogger(DefaultNormalizationRunner.class);

public static final String NORMALIZATION_IMAGE_NAME = "airbyte/normalization:0.1.48";
public static final String NORMALIZATION_IMAGE_NAME = "airbyte/normalization:0.1.49";

private final DestinationType destinationType;
private final ProcessFactory processFactory;
Expand Down
1 change: 1 addition & 0 deletions docs/understanding-airbyte/basic-normalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ Therefore, in order to "upgrade" to the desired normalization version, you need

| Airbyte Version | Normalization Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- | :--- |
| 0.30.16-alpha | 0.1.49 | 2021-10-06 | [#6709](https://github.com/airbytehq/airbyte/pull/6709) | Forward destination dataset location to dbt profiles |
| 0.29.17-alpha | 0.1.47 | 2021-09-20 | [#6317](https://github.com/airbytehq/airbyte/pull/6317) | MySQL: updated MySQL normalization with using SSH tunnel |
| 0.29.17-alpha | 0.1.45 | 2021-09-18 | [#6052](https://github.com/airbytehq/airbyte/pull/6052) | Snowflake: accept any date-time format |
| 0.29.8-alpha | 0.1.40 | 2021-08-18 | [#5433](https://github.com/airbytehq/airbyte/pull/5433) | Allow optional credentials_json for BigQuery |
Expand Down