-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source-redshift-batch: Add TestFeatureFlagUseSchemaInference
Just a simple test case to make sure the `use_schema_inference` feature flag does what it was intended to.
- Loading branch information
1 parent
caa3432
commit 82315d3
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
source-redshift-batch/.snapshots/TestFeatureFlagUseSchemaInference-Discovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Binding 0: | ||
{ | ||
"resource_config_json": { | ||
"name": "test_feature_flag_use_schema_inference_77244729", | ||
"template": "{{if .CursorFields -}}\n {{- if .IsFirstQuery -}}\n SELECT * FROM \"test\".\"feature_flag_use_schema_inference_77244729\"\n {{- else -}}\n SELECT * FROM \"test\".\"feature_flag_use_schema_inference_77244729\"\n\t{{- range $i, $k := $.CursorFields -}}\n\t {{- if eq $i 0}} WHERE ({{else}}) OR ({{end -}}\n {{- range $j, $n := $.CursorFields -}}\n\t\t{{- if lt $j $i -}}\n\t\t {{$n}} = ${{add $j 1}} AND {{end -}}\n\t {{- end -}}\n\t {{$k}} \u003e ${{add $i 1}}\n\t{{- end -}}\n\t) \n {{- end}} ORDER BY {{range $i, $k := $.CursorFields}}{{if gt $i 0}}, {{end}}{{$k}}{{end -}};\n{{- else -}}\n SELECT * FROM \"test\".\"feature_flag_use_schema_inference_77244729\";\n{{- end}}\n" | ||
}, | ||
"resource_path": [ | ||
"test_feature_flag_use_schema_inference_77244729" | ||
], | ||
"collection": { | ||
"name": "acmeCo/test/test_feature_flag_use_schema_inference_77244729", | ||
"read_schema_json": { | ||
"type": "object", | ||
"required": [ | ||
"_meta", | ||
"id" | ||
], | ||
"properties": { | ||
"_meta": { | ||
"$schema": "http://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/estuary/connectors/source-redshift-batch/document-metadata", | ||
"properties": { | ||
"polled": { | ||
"type": "string", | ||
"format": "date-time", | ||
"title": "Polled Timestamp", | ||
"description": "The time at which the update query which produced this document as executed." | ||
}, | ||
"index": { | ||
"type": "integer", | ||
"title": "Result Index", | ||
"description": "The index of this document within the query execution which produced it." | ||
} | ||
}, | ||
"type": "object", | ||
"required": [ | ||
"polled", | ||
"index" | ||
] | ||
}, | ||
"data": { | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"id": { | ||
"type": "integer" | ||
} | ||
}, | ||
"x-infer-schema": true | ||
}, | ||
"key": [ | ||
"/id" | ||
], | ||
"projections": null | ||
}, | ||
"state_key": "test_feature_flag_use_schema_inference_77244729" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters