@lightdash/warehouses 0.2452.0 → 0.2453.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AthenaWarehouseClient.d.ts","sourceRoot":"","sources":["../../src/warehouseClients/AthenaWarehouseClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAOf,MAAM,wBAAwB,CAAC;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"AthenaWarehouseClient.d.ts","sourceRoot":"","sources":["../../src/warehouseClients/AthenaWarehouseClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAOf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGH,uBAAuB,EAGvB,MAAM,EAEN,mBAAmB,EACnB,gBAAgB,EAGhB,gBAAgB,EAChB,cAAc,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM5C,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAEhE,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,OAAO,wBAAwB;IAC/B,SAAS,cAAc;IACvB,YAAY,6BAA6B;IACzC,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,SAAS,cAAc;IACvB,IAAI,SAAS;CAChB;AAgCD,qBAAa,gBAAiB,SAAQ,uBAAuB;IACzD,QAAQ,CAAC,IAAI,yBAAyB;IAEtC,cAAc,IAAI,m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AAM,GAClB,OAAO,CAAC,gBAAgB,CAAC;IA2C5B,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;CAGlC"}
|
|
@@ -121,11 +121,18 @@ class AthenaWarehouseClient extends WarehouseBaseClient_1.default {
|
|
|
121
121
|
constructor(credentials) {
|
|
122
122
|
super(credentials, new AthenaSqlBuilder(credentials.startOfWeek));
|
|
123
123
|
try {
|
|
124
|
+
const authenticationType = credentials.authenticationType ??
|
|
125
|
+
common_1.AthenaAuthenticationType.ACCESS_KEY;
|
|
126
|
+
const hasAccessKeyCredentials = !!credentials.accessKeyId && !!credentials.secretAccessKey;
|
|
127
|
+
if (authenticationType === common_1.AthenaAuthenticationType.ACCESS_KEY &&
|
|
128
|
+
!hasAccessKeyCredentials) {
|
|
129
|
+
throw new common_1.WarehouseConnectionError('Athena access key authentication requires accessKeyId and secretAccessKey');
|
|
130
|
+
}
|
|
124
131
|
const clientConfig = {
|
|
125
132
|
region: credentials.region,
|
|
126
133
|
};
|
|
127
134
|
// Configure authentication with access key credentials
|
|
128
|
-
if (
|
|
135
|
+
if (authenticationType === common_1.AthenaAuthenticationType.ACCESS_KEY) {
|
|
129
136
|
clientConfig.credentials = {
|
|
130
137
|
accessKeyId: credentials.accessKeyId,
|
|
131
138
|
secretAccessKey: credentials.secretAccessKey,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash/warehouses",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2453.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"snowflake-sdk": "~2.3.3",
|
|
24
24
|
"ssh2": "^1.14.0",
|
|
25
25
|
"trino-client": "0.2.9",
|
|
26
|
-
"@lightdash/common": "0.
|
|
26
|
+
"@lightdash/common": "0.2453.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/pg": "^8.11.10",
|