Skip to content

Commit 87a3055

Browse files
Tweak dbt configuration parameters to reasonable values (#9846)
* Tweak dbt configuration parameters to reasonable values (following dbt docs/recommendatins) * Fix unit tests * Bumpversion of normalization
1 parent f3fa7ad commit 87a3055

File tree

5 files changed

+26
-16
lines changed

5 files changed

+26
-16
lines changed

airbyte-integrations/bases/base-normalization/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ WORKDIR /airbyte
2828
ENV AIRBYTE_ENTRYPOINT "/airbyte/entrypoint.sh"
2929
ENTRYPOINT ["/airbyte/entrypoint.sh"]
3030

31-
LABEL io.airbyte.version=0.1.64
31+
LABEL io.airbyte.version=0.1.65
3232
LABEL io.airbyte.name=airbyte/normalization

airbyte-integrations/bases/base-normalization/normalization/transform_config/transform.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def transform_bigquery(config: Dict[str, Any]):
133133
"project": config["project_id"],
134134
"dataset": config["dataset_id"],
135135
"priority": config.get("transformation_priority", "interactive"),
136-
"threads": 32,
137-
"retries": 1,
136+
"threads": 8,
137+
"retries": 3,
138138
}
139139
if "credentials_json" in config:
140140
dbt_config["method"] = "service-account-json"
@@ -161,7 +161,7 @@ def transform_postgres(config: Dict[str, Any]):
161161
"port": config["port"],
162162
"dbname": config["database"],
163163
"schema": config["schema"],
164-
"threads": 32,
164+
"threads": 8,
165165
}
166166

167167
# if unset, we assume true.
@@ -182,7 +182,7 @@ def transform_redshift(config: Dict[str, Any]):
182182
"port": config["port"],
183183
"dbname": config["database"],
184184
"schema": config["schema"],
185-
"threads": 32,
185+
"threads": 4,
186186
}
187187
return dbt_config
188188

@@ -202,9 +202,13 @@ def transform_snowflake(config: Dict[str, Any]):
202202
"database": config["database"].upper(),
203203
"warehouse": config["warehouse"].upper(),
204204
"schema": config["schema"].upper(),
205-
"threads": 32,
205+
"threads": 5,
206206
"client_session_keep_alive": False,
207207
"query_tag": "normalization",
208+
"retry_all": True,
209+
"retry_on_database_errors": True,
210+
"connect_retries": 3,
211+
"connect_timeout": 15,
208212
}
209213
return dbt_config
210214

@@ -259,7 +263,7 @@ def transform_mssql(config: Dict[str, Any]):
259263
"database": config["database"],
260264
"user": config["username"],
261265
"password": config["password"],
262-
"threads": 32,
266+
"threads": 8,
263267
# "authentication": "sql",
264268
# "trusted_connection": True,
265269
}

airbyte-integrations/bases/base-normalization/unit_tests/test_transform_config.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def test_transform_bigquery(self):
147147
"priority": "interactive",
148148
"keyfile_json": {"type": "service_account-json"},
149149
"location": "EU",
150-
"retries": 1,
151-
"threads": 32,
150+
"retries": 3,
151+
"threads": 8,
152152
}
153153

154154
actual_keyfile = actual_output["keyfile_json"]
@@ -167,8 +167,8 @@ def test_transform_bigquery_no_credentials(self):
167167
"project": "my_project_id",
168168
"dataset": "my_dataset_id",
169169
"priority": "interactive",
170-
"retries": 1,
171-
"threads": 32,
170+
"retries": 3,
171+
"threads": 8,
172172
}
173173

174174
assert expected_output == actual_output
@@ -192,7 +192,7 @@ def test_transform_postgres(self):
192192
"pass": "password123",
193193
"port": 5432,
194194
"schema": "public",
195-
"threads": 32,
195+
"threads": 8,
196196
"user": "a user",
197197
}
198198

@@ -225,7 +225,7 @@ def test_transform_postgres_ssh(self):
225225
"pass": "password123",
226226
"port": port,
227227
"schema": "public",
228-
"threads": 32,
228+
"threads": 8,
229229
"user": "a user",
230230
}
231231

@@ -252,7 +252,11 @@ def test_transform_snowflake(self):
252252
"query_tag": "normalization",
253253
"role": "AIRBYTE_ROLE",
254254
"schema": "AIRBYTE_SCHEMA",
255-
"threads": 32,
255+
"threads": 5,
256+
"retry_all": True,
257+
"retry_on_database_errors": True,
258+
"connect_retries": 3,
259+
"connect_timeout": 15,
256260
"type": "snowflake",
257261
"user": "AIRBYTE_USER",
258262
"warehouse": "AIRBYTE_WAREHOUSE",
@@ -332,7 +336,7 @@ def test_transform(self):
332336
"pass": "password123",
333337
"port": 5432,
334338
"schema": "public",
335-
"threads": 32,
339+
"threads": 8,
336340
"user": "a user",
337341
}
338342
actual = TransformConfig().transform(DestinationType.postgres, input)

airbyte-workers/src/main/java/io/airbyte/workers/normalization/NormalizationRunnerFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
public class NormalizationRunnerFactory {
1515

1616
public static final String BASE_NORMALIZATION_IMAGE_NAME = "airbyte/normalization";
17-
public static final String NORMALIZATION_VERSION = "0.1.64";
17+
public static final String NORMALIZATION_VERSION = "0.1.65";
1818

1919
static final Map<String, ImmutablePair<String, DefaultNormalizationRunner.DestinationType>> NORMALIZATION_MAPPING =
2020
ImmutableMap.<String, ImmutablePair<String, DefaultNormalizationRunner.DestinationType>>builder()

docs/understanding-airbyte/basic-normalization.md

+2
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ Therefore, in order to "upgrade" to the desired normalization version, you need
350350

351351
| Airbyte Version | Normalization Version | Date | Pull Request | Subject |
352352
| :--- | :--- | :--- | :--- | :--- |
353+
| 0.35.13-alpha | 0.1.65 | 2021-01-28 | [\#9846](https://github.com/airbytehq/airbyte/pull/9846) | Tweak dbt multi-thread parameter down |
354+
| 0.35.12-alpha | 0.1.64 | 2021-01-28 | [\#9793](https://github.com/airbytehq/airbyte/pull/9793) | Support PEM format for ssh-tunnel keys |
353355
| 0.35.4-alpha | 0.1.63 | 2021-01-07 | [\#9301](https://github.com/airbytehq/airbyte/pull/9301) | Fix Snowflake prefix tables starting with numbers |
354356
| | 0.1.62 | 2021-01-07 | [\#9340](https://github.com/airbytehq/airbyte/pull/9340) | Use TCP-port support for clickhouse |
355357
| | 0.1.62 | 2021-01-07 | [\#9063](https://github.com/airbytehq/airbyte/pull/9063) | Change Snowflake-specific materialization settings |

0 commit comments

Comments
 (0)