@sasjs/adapter 4.16.6 → 4.16.7
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.
- package/index-dev.js +1584 -1147
- package/index.js +1584 -1147
- package/minified_sas9.js +1576 -1148
- package/node/index.js +1600 -1054
- package/package.json +2 -2
- package/src/SASViyaApiClient.ts +7 -1
- package/src/api/viya/uploadTables.ts +5 -1
package/package.json
CHANGED
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"main": "index.js",
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@sasjs/utils": "^3.5.6",
|
|
80
|
-
"axios": "1.
|
|
80
|
+
"axios": "1.16.0",
|
|
81
81
|
"axios-cookiejar-support": "5.0.5",
|
|
82
82
|
"form-data": "4.0.4",
|
|
83
83
|
"https": "1.0.0",
|
|
84
84
|
"tough-cookie": "4.1.3"
|
|
85
85
|
},
|
|
86
|
-
"version": "4.16.
|
|
86
|
+
"version": "4.16.7"
|
|
87
87
|
}
|
package/src/SASViyaApiClient.ts
CHANGED
|
@@ -1031,11 +1031,17 @@ export class SASViyaApiClient {
|
|
|
1031
1031
|
jobArguments[`_webin_name${index + 1}`] = fileInfo.tableName
|
|
1032
1032
|
})
|
|
1033
1033
|
|
|
1034
|
+
// Viya JES requires arguments to be Map<String,String>; coerce booleans/numbers.
|
|
1035
|
+
const stringifiedArguments: { [key: string]: string } = {}
|
|
1036
|
+
for (const k of Object.keys(jobArguments)) {
|
|
1037
|
+
stringifiedArguments[k] = String(jobArguments[k])
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1034
1040
|
const postJobRequestBody = {
|
|
1035
1041
|
name: `exec-${jobName}`,
|
|
1036
1042
|
description: 'Powered by SASjs',
|
|
1037
1043
|
jobDefinition,
|
|
1038
|
-
arguments:
|
|
1044
|
+
arguments: stringifiedArguments
|
|
1039
1045
|
}
|
|
1040
1046
|
|
|
1041
1047
|
const { result: postedJob } = await this.requestClient.post<Job>(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { prefixMessage } from '@sasjs/utils/error'
|
|
2
2
|
import { RequestClient } from '../../request/RequestClient'
|
|
3
|
-
import { convertToCSV } from '../../utils/convertToCsv'
|
|
3
|
+
import { convertToCSV, isFormatsTable } from '../../utils/convertToCsv'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Uploads tables to SAS as specially formatted CSVs.
|
|
@@ -18,6 +18,10 @@ export async function uploadTables(
|
|
|
18
18
|
const uploadedFiles = []
|
|
19
19
|
|
|
20
20
|
for (const tableName in data) {
|
|
21
|
+
// $tablename keys carry only column-format metadata for the matching
|
|
22
|
+
// tablename payload; they must not be uploaded as separate files.
|
|
23
|
+
if (isFormatsTable(tableName)) continue
|
|
24
|
+
|
|
21
25
|
const csv = convertToCSV(data, tableName)
|
|
22
26
|
if (csv === 'ERROR: LARGE STRING LENGTH') {
|
|
23
27
|
throw new Error(
|