Skip to content

Commit 3711a1f

Browse files
author
awstools
committed
feat(client-glue): Added support for custom datatypes when using custom csv classifier.
1 parent 7d95b34 commit 3711a1f

File tree

5 files changed

+352
-247
lines changed

5 files changed

+352
-247
lines changed

clients/client-glue/src/models/models_0.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5152,6 +5152,16 @@ export interface CreateCsvClassifierRequest {
51525152
* <p>Enables the processing of files that contain only one column.</p>
51535153
*/
51545154
AllowSingleColumn?: boolean;
5155+
5156+
/**
5157+
* <p>Enables the configuration of custom datatypes.</p>
5158+
*/
5159+
CustomDatatypeConfigured?: boolean;
5160+
5161+
/**
5162+
* <p>Creates a list of supported custom datatypes.</p>
5163+
*/
5164+
CustomDatatypes?: string[];
51555165
}
51565166

51575167
/**

clients/client-glue/src/models/models_1.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,16 @@ export interface CsvClassifier {
867867
* <p>Enables the processing of files that contain only one column.</p>
868868
*/
869869
AllowSingleColumn?: boolean;
870+
871+
/**
872+
* <p>Enables the custom datatype to be configured.</p>
873+
*/
874+
CustomDatatypeConfigured?: boolean;
875+
876+
/**
877+
* <p>A list of custom datatypes including "BINARY", "BOOLEAN", "DATE", "DECIMAL", "DOUBLE", "FLOAT", "INT", "LONG", "SHORT", "STRING", "TIMESTAMP".</p>
878+
*/
879+
CustomDatatypes?: string[];
870880
}
871881

872882
/**

clients/client-glue/src/models/models_2.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,16 @@ export interface UpdateCsvClassifierRequest {
11051105
* <p>Enables the processing of files that contain only one column.</p>
11061106
*/
11071107
AllowSingleColumn?: boolean;
1108+
1109+
/**
1110+
* <p>Specifies the configuration of custom datatypes.</p>
1111+
*/
1112+
CustomDatatypeConfigured?: boolean;
1113+
1114+
/**
1115+
* <p>Specifies a list of supported custom datatypes.</p>
1116+
*/
1117+
CustomDatatypes?: string[];
11081118
}
11091119

11101120
/**

clients/client-glue/src/protocols/Aws_json1_1.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14412,6 +14412,10 @@ const serializeAws_json1_1CreateCsvClassifierRequest = (
1441214412
return {
1441314413
...(input.AllowSingleColumn != null && { AllowSingleColumn: input.AllowSingleColumn }),
1441414414
...(input.ContainsHeader != null && { ContainsHeader: input.ContainsHeader }),
14415+
...(input.CustomDatatypeConfigured != null && { CustomDatatypeConfigured: input.CustomDatatypeConfigured }),
14416+
...(input.CustomDatatypes != null && {
14417+
CustomDatatypes: serializeAws_json1_1CustomDatatypes(input.CustomDatatypes, context),
14418+
}),
1441514419
...(input.Delimiter != null && { Delimiter: input.Delimiter }),
1441614420
...(input.DisableValueTrimming != null && { DisableValueTrimming: input.DisableValueTrimming }),
1441714421
...(input.Header != null && { Header: serializeAws_json1_1CsvHeader(input.Header, context) }),
@@ -14727,6 +14731,14 @@ const serializeAws_json1_1CustomCode = (input: CustomCode, context: __SerdeConte
1472714731
};
1472814732
};
1472914733

14734+
const serializeAws_json1_1CustomDatatypes = (input: string[], context: __SerdeContext): any => {
14735+
return input
14736+
.filter((e: any) => e != null)
14737+
.map((entry) => {
14738+
return entry;
14739+
});
14740+
};
14741+
1473014742
const serializeAws_json1_1CustomEntityTypeNames = (input: string[], context: __SerdeContext): any => {
1473114743
return input
1473214744
.filter((e: any) => e != null)
@@ -17925,6 +17937,10 @@ const serializeAws_json1_1UpdateCsvClassifierRequest = (
1792517937
return {
1792617938
...(input.AllowSingleColumn != null && { AllowSingleColumn: input.AllowSingleColumn }),
1792717939
...(input.ContainsHeader != null && { ContainsHeader: input.ContainsHeader }),
17940+
...(input.CustomDatatypeConfigured != null && { CustomDatatypeConfigured: input.CustomDatatypeConfigured }),
17941+
...(input.CustomDatatypes != null && {
17942+
CustomDatatypes: serializeAws_json1_1CustomDatatypes(input.CustomDatatypes, context),
17943+
}),
1792817944
...(input.Delimiter != null && { Delimiter: input.Delimiter }),
1792917945
...(input.DisableValueTrimming != null && { DisableValueTrimming: input.DisableValueTrimming }),
1793017946
...(input.Header != null && { Header: serializeAws_json1_1CsvHeader(input.Header, context) }),
@@ -19810,6 +19826,11 @@ const deserializeAws_json1_1CsvClassifier = (output: any, context: __SerdeContex
1981019826
output.CreationTime != null
1981119827
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
1981219828
: undefined,
19829+
CustomDatatypeConfigured: __expectBoolean(output.CustomDatatypeConfigured),
19830+
CustomDatatypes:
19831+
output.CustomDatatypes != null
19832+
? deserializeAws_json1_1CustomDatatypes(output.CustomDatatypes, context)
19833+
: undefined,
1981319834
Delimiter: __expectString(output.Delimiter),
1981419835
DisableValueTrimming: __expectBoolean(output.DisableValueTrimming),
1981519836
Header: output.Header != null ? deserializeAws_json1_1CsvHeader(output.Header, context) : undefined,
@@ -19846,6 +19867,18 @@ const deserializeAws_json1_1CustomCode = (output: any, context: __SerdeContext):
1984619867
} as any;
1984719868
};
1984819869

19870+
const deserializeAws_json1_1CustomDatatypes = (output: any, context: __SerdeContext): string[] => {
19871+
const retVal = (output || [])
19872+
.filter((e: any) => e != null)
19873+
.map((entry: any) => {
19874+
if (entry === null) {
19875+
return null as any;
19876+
}
19877+
return __expectString(entry) as any;
19878+
});
19879+
return retVal;
19880+
};
19881+
1984919882
const deserializeAws_json1_1CustomEntityType = (output: any, context: __SerdeContext): CustomEntityType => {
1985019883
return {
1985119884
ContextWords:

0 commit comments

Comments
 (0)