Skip to content

Commit 27652fc

Browse files
zoltanersekfa-assistant
authored andcommitted
140 [BUG] Fusion doesn't pass profile-configured database/schema into the connection parameters (#5764)
* 140 [BUG] Fusion doesn't pass profile-configured database/schema into the connection parameters Signed-off-by: Zoltan Ersek <[email protected]> * fix formatting Signed-off-by: Zoltan Ersek <[email protected]> * update golden Signed-off-by: Zoltan Ersek <[email protected]> * update golden 2 Signed-off-by: Zoltan Ersek <[email protected]> * upgrade driver to correct version Signed-off-by: Zoltan Ersek <[email protected]> --------- Signed-off-by: Zoltan Ersek <[email protected]> GitOrigin-RevId: 801bbbdef8611e3297f106d2adff14197f8638d7
1 parent 5f89ad8 commit 27652fc

File tree

4 files changed

+40
-33
lines changed

4 files changed

+40
-33
lines changed

crates/dbt-auth/src/snowflake/mod.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ use std::fs;
1111
const APP_NAME: &str = "dbt";
1212

1313
// WARNING: Still needs adjustment on what is considered must-have
14-
const REQUIRED_PARAMS: [&str; 5] = ["user", "password", "account", "role", "warehouse"];
14+
const REQUIRED_PARAMS: [&str; 7] = [
15+
"user",
16+
"password",
17+
"account",
18+
"role",
19+
"warehouse",
20+
"database",
21+
"schema",
22+
];
1523

1624
const DEFAULT_CONNECT_TIMEOUT: &str = "10s";
1725

@@ -304,9 +312,7 @@ impl SnowflakeAuth {
304312
"password" => Ok(builder.with_password(value)),
305313
"account" => builder.with_named_option(snowflake::ACCOUNT, value),
306314
"database" => builder.with_named_option(snowflake::DATABASE, value),
307-
// TODO: see if setting SCHEMA is necessary, connection cannot be established if schema doesn't exist
308-
// this is a common case if we need to execute statements like `CREATE SCHEMA`
309-
// "schema" => builder.with_named_option(snowflake::SCHEMA, value),
315+
"schema" => builder.with_named_option(snowflake::SCHEMA, value),
310316
"role" => builder.with_named_option(snowflake::ROLE, value),
311317
"warehouse" => builder.with_named_option(snowflake::WAREHOUSE, value),
312318
"host" => builder.with_named_option(snowflake::HOST, value),
@@ -351,6 +357,8 @@ impl SnowflakeAuth {
351357
"user",
352358
"password",
353359
"account",
360+
"database",
361+
"schema",
354362
"role",
355363
"warehouse",
356364
"private_key_path",
@@ -372,10 +380,8 @@ impl SnowflakeAuth {
372380
"user" => Ok(builder.with_username(value)),
373381
"password" => Ok(builder.with_password(value)),
374382
"account" => builder.with_named_option(snowflake::ACCOUNT, value),
375-
// TODO: see if setting SCHEMA is necessary, connection cannot be established if schema doesn't exist
376-
// this is a common case if we need to execute statements like `CREATE SCHEMA` or `CREATE DATABASE`
377383
"database" => builder.with_named_option(snowflake::DATABASE, value),
378-
// "schema" => builder.with_named_option(snowflake::SCHEMA, value),
384+
"schema" => builder.with_named_option(snowflake::SCHEMA, value),
379385
"role" => builder.with_named_option(snowflake::ROLE, value),
380386
"warehouse" => builder.with_named_option(snowflake::WAREHOUSE, value),
381387
"private_key_path" => {

crates/dbt-xdbc/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ you want to work on.
104104
git clone [email protected]:dbt-labs/arrow-adbc.git
105105
cd arrow-adbc
106106
cd go/adbc/driver/bigquery # source directory
107+
go build -v ./... # build go
107108
cd go/adbc/pkg # build directory for all Go drivers
108109
make clean || make libadbc_driver_bigquery.dylib
109110
```
@@ -119,7 +120,7 @@ an environment variable that is checked by, and only by debug builds of `fs` and
119120
link to the local driver from the `lib/` folder at the root of the `fs` repo.
120121

121122
```bash
122-
export DISABLE_CDN_DRIVER_CACHE=
123+
export DISABLE_CDN_DRIVER_CACHE=true
123124
# assuming you keep all the repos in the ~/code folder:
124125
ln -s ~/code/arrow-adbc/go/adbc/pkg/libadbc_driver_bigquery.dylib ~/code/fs/lib/libadbc_driver_bigquery.dylib
125126
```

crates/dbt-xdbc/src/checksums.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -288,64 +288,64 @@ pub static SORTED_CDN_DRIVER_CHECKSUMS: [(
288288
("salesforce", "pc-windows-msvc", "x86_64", "0.18.0+dbt0.0.2"),
289289
"944b06f4348b924df96629950a17933bf479c180d7411d28cec8db1bb9d2c623",
290290
),
291-
(
292-
("snowflake", "apple-darwin", "aarch64", "0.18.0+dbt0.0.10"),
293-
"0ce8a9de9ce44e3066a40b8a19b03db06e5967c6aa24057693f8954ab89250f7",
294-
),
295-
(
296-
("snowflake", "apple-darwin", "aarch64", "0.18.0+dbt0.0.11"),
297-
"a9b88af6a8b15cb47c386b8700c55cdb861a8eb5746ef14c9296e236b16a355f",
298-
),
299291
(
300292
("snowflake", "apple-darwin", "aarch64", "0.18.0+dbt0.0.12"),
301293
"4902d80356258e886af07de17116b0396d7a90223c419a19a328b8704f10fb0a",
302294
),
303295
(
304-
("snowflake", "apple-darwin", "x86_64", "0.18.0+dbt0.0.10"),
305-
"494a7f5d3e12db02bcbc33ab6a28f00ee912d63cf60d7db940a8040aec078189",
296+
("snowflake", "apple-darwin", "aarch64", "0.18.0+dbt0.0.13"),
297+
"96383629cb8aee83dac7a271eaea13c2fd69770f381ad038fc5966571b4b4b20",
306298
),
307299
(
308-
("snowflake", "apple-darwin", "x86_64", "0.18.0+dbt0.0.11"),
309-
"625bbd3b9d4f9e0a1af8d02ef75b4b20106b4ae05700ea5ce899972d03c579f2",
300+
("snowflake", "apple-darwin", "aarch64", "0.18.0+dbt0.0.14"),
301+
"b5ce23a8899d48b20a81c81abc58b3c3501913c3a3f55ca7fd758fee7d459c42",
310302
),
311303
(
312304
("snowflake", "apple-darwin", "x86_64", "0.18.0+dbt0.0.12"),
313305
"50d045405336f07869122ab5f36738fedcff7d167dbfce1a3b91866a66f6cc55",
314306
),
315307
(
316-
("snowflake", "manylinux_2_17-linux-gnu", "aarch64", "0.18.0+dbt0.0.10"),
317-
"7fea332ea4a951bcc9dcffc99d8307c2592832781b98492fb7ec2ecedb57a5ae",
308+
("snowflake", "apple-darwin", "x86_64", "0.18.0+dbt0.0.13"),
309+
"8c3f5de7a79f512c3b63991367089b77518314249c9d9e6acc6429dd364123e4",
318310
),
319311
(
320-
("snowflake", "manylinux_2_17-linux-gnu", "aarch64", "0.18.0+dbt0.0.11"),
321-
"2a90257858af2e4133b0274a34bb9431d2f846a8e80e67937df3c4ce36844904",
312+
("snowflake", "apple-darwin", "x86_64", "0.18.0+dbt0.0.14"),
313+
"5e20f4b82e40144f95f30a6f6bd2d762962bb35a1248f5e3e7209a623f972a4a",
322314
),
323315
(
324316
("snowflake", "manylinux_2_17-linux-gnu", "aarch64", "0.18.0+dbt0.0.12"),
325317
"3857599e4e64dfe5df710e6502ab8fe6ec469b022626385b16e0919faba91f0c",
326318
),
327319
(
328-
("snowflake", "manylinux_2_17-linux-gnu", "x86_64", "0.18.0+dbt0.0.10"),
329-
"c2b4a32eefb112ed0af9b9704f2377cb538b25b5cd90539282987f556941b533",
320+
("snowflake", "manylinux_2_17-linux-gnu", "aarch64", "0.18.0+dbt0.0.13"),
321+
"5d07d710e6b2222654ae26c3e9d647644fc741064278ef946a0ff26e354561e6",
330322
),
331323
(
332-
("snowflake", "manylinux_2_17-linux-gnu", "x86_64", "0.18.0+dbt0.0.11"),
333-
"a96cad78dd1e97dd4d7d31a1556014fc46c8733007f78751236a275e98e6d8b3",
324+
("snowflake", "manylinux_2_17-linux-gnu", "aarch64", "0.18.0+dbt0.0.14"),
325+
"a637f403c49faa5fc576075aedf89779bdb6cfead87ca869238115e3fea66066",
334326
),
335327
(
336328
("snowflake", "manylinux_2_17-linux-gnu", "x86_64", "0.18.0+dbt0.0.12"),
337329
"5f5955646e5fcecb702cf1b6566510903d16d28c0689120844c1c153a18b21e1",
338330
),
339331
(
340-
("snowflake", "pc-windows-msvc", "x86_64", "0.18.0+dbt0.0.10"),
341-
"e5f65f57625647a1da7f9cd46523c3076c557f6c77e7afadf9f92a20c1600aac",
332+
("snowflake", "manylinux_2_17-linux-gnu", "x86_64", "0.18.0+dbt0.0.13"),
333+
"8dcb699a885b412593422b4965984c5d99b6219a7e8a2797083de694dbb414db",
342334
),
343335
(
344-
("snowflake", "pc-windows-msvc", "x86_64", "0.18.0+dbt0.0.11"),
345-
"81a761e1a94c4ffe2db5dbb07587c48635cdb1f3098ccd9f6edfe81d80f9ffdc",
336+
("snowflake", "manylinux_2_17-linux-gnu", "x86_64", "0.18.0+dbt0.0.14"),
337+
"fb63b52973bd926d1c48f8ddd93e8c97c21fb404b9a2341600018616dfda6240",
346338
),
347339
(
348340
("snowflake", "pc-windows-msvc", "x86_64", "0.18.0+dbt0.0.12"),
349341
"e1b4e964d8d1f7047e4549e1a75fea08a1accbc029275698340760fc68eab237",
350342
),
343+
(
344+
("snowflake", "pc-windows-msvc", "x86_64", "0.18.0+dbt0.0.13"),
345+
"1b5e0e064ef165613ac2d9e15569df82fe2847544de60e5184ead134964b0690",
346+
),
347+
(
348+
("snowflake", "pc-windows-msvc", "x86_64", "0.18.0+dbt0.0.14"),
349+
"05e98a21a8aa4da26b2d34ee185003f11972bd59deaa00541faf86d0c6833a81",
350+
),
351351
];

crates/dbt-xdbc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub fn str_from_sqlstate(sqlstate: &[c_char; 5]) -> &str {
8282
}
8383

8484
// XXX: if needed, rollback to 0.17.0+dbt0.0.8 because 0.0.9 is broken on Windows
85-
pub const SNOWFLAKE_DRIVER_VERSION: &str = "0.18.0+dbt0.0.12";
85+
pub const SNOWFLAKE_DRIVER_VERSION: &str = "0.18.0+dbt0.0.14";
8686
pub const BIGQUERY_DRIVER_VERSION: &str = "0.18.0+dbt0.0.14";
8787
pub const POSTGRES_DRIVER_VERSION: &str = "0.18.0+dbt0.0.3";
8888
pub const DATABRICKS_DRIVER_VERSION: &str = "0.18.0+dbt0.0.6";

0 commit comments

Comments
 (0)