@@ -23,6 +23,7 @@ import useConnection from "hooks/services/useConnectionHook";
23
23
import { useCurrentWorkspace } from "hooks/services/useWorkspace" ;
24
24
import { useDestinationDefinitionSpecificationLoadAsync } from "hooks/services/useDestinationHook" ;
25
25
import { ContentCard , H4 } from "components" ;
26
+ import { FeatureItem , useFeatureService } from "hooks/services/Feature" ;
26
27
27
28
type TransformationViewProps = {
28
29
connection : Connection ;
@@ -111,6 +112,11 @@ const TransformationView: React.FC<TransformationViewProps> = ({
111
112
) ;
112
113
const { updateConnection } = useConnection ( ) ;
113
114
const workspace = useCurrentWorkspace ( ) ;
115
+ const { hasFeature } = useFeatureService ( ) ;
116
+
117
+ const supportsNormalization = definition . supportsNormalization ;
118
+ const supportsDbt =
119
+ hasFeature ( FeatureItem . AllowCustomDBT ) && definition . supportsDbt ;
114
120
115
121
const onSubmit = async ( values : {
116
122
transformations ?: Transformation [ ] ;
@@ -150,19 +156,19 @@ const TransformationView: React.FC<TransformationViewProps> = ({
150
156
151
157
return (
152
158
< Content >
153
- { definition . supportsNormalization && (
159
+ { supportsNormalization && (
154
160
< NormalizationCard
155
161
operations = { connection . operations }
156
162
onSubmit = { onSubmit }
157
163
/>
158
164
) }
159
- { definition . supportsDbt && (
165
+ { supportsDbt && (
160
166
< CustomTransformationsCard
161
167
operations = { connection . operations }
162
168
onSubmit = { onSubmit }
163
169
/>
164
170
) }
165
- { ! definition . supportsNormalization && ! definition . supportsDbt && (
171
+ { ! supportsNormalization && ! supportsDbt && (
166
172
< NoSupportedTransformationCard >
167
173
< H4 center >
168
174
< FormattedMessage id = "connectionForm.operations.notSupported" />
0 commit comments