@@ -43,7 +43,7 @@ class TestReadLimits:
43
43
def get_limits (config : Mapping [str , Any ]) -> TestReadLimits :
44
44
command_config = config .get ("__test_read_config" , {})
45
45
max_pages_per_slice = (
46
- command_config .get (MAX_PAGES_PER_SLICE_KEY ) or DEFAULT_MAXIMUM_NUMBER_OF_PAGES_PER_SLICE
46
+ command_config .get (MAX_PAGES_PER_SLICE_KEY ) or DEFAULT_MAXIMUM_NUMBER_OF_PAGES_PER_SLICE
47
47
)
48
48
max_slices = command_config .get (MAX_SLICES_KEY ) or DEFAULT_MAXIMUM_NUMBER_OF_SLICES
49
49
max_records = command_config .get (MAX_RECORDS_KEY ) or DEFAULT_MAXIMUM_RECORDS
@@ -67,11 +67,11 @@ def create_source(config: Mapping[str, Any], limits: TestReadLimits) -> Manifest
67
67
68
68
69
69
def read_stream (
70
- source : DeclarativeSource ,
71
- config : Mapping [str , Any ],
72
- configured_catalog : ConfiguredAirbyteCatalog ,
73
- state : List [AirbyteStateMessage ],
74
- limits : TestReadLimits ,
70
+ source : DeclarativeSource ,
71
+ config : Mapping [str , Any ],
72
+ configured_catalog : ConfiguredAirbyteCatalog ,
73
+ state : List [AirbyteStateMessage ],
74
+ limits : TestReadLimits ,
75
75
) -> AirbyteMessage :
76
76
try :
77
77
test_read_handler = TestReader (
@@ -117,5 +117,28 @@ def resolve_manifest(source: ManifestDeclarativeSource) -> AirbyteMessage:
117
117
return error .as_airbyte_message ()
118
118
119
119
120
+ def full_resolve_manifest (source : ManifestDeclarativeSource ) -> AirbyteMessage :
121
+ try :
122
+ manifest = source .resolved_manifest
123
+ streams = manifest .get ("streams" , [])
124
+ for stream in streams :
125
+ stream ["dynamic_stream_name" ] = None
126
+ streams .extend (source .dynamic_streams )
127
+
128
+ return AirbyteMessage (
129
+ type = Type .RECORD ,
130
+ record = AirbyteRecordMessage (
131
+ data = {"manifest" : manifest },
132
+ emitted_at = _emitted_at (),
133
+ stream = "full_resolve_manifest" ,
134
+ ),
135
+ )
136
+ except Exception as exc :
137
+ error = AirbyteTracedException .from_exception (
138
+ exc , message = f"Error full resolving manifest: { str (exc )} "
139
+ )
140
+ return error .as_airbyte_message ()
141
+
142
+
120
143
def _emitted_at () -> int :
121
144
return ab_datetime_now ().to_epoch_millis ()
0 commit comments