3737 FieldSchema ,
3838)
3939from .runtime import to_async_call
40+ from .index import IndexOptions
4041
4142
4243class OpCategory (Enum ):
@@ -430,6 +431,7 @@ class _TargetConnectorContext:
430431 key_decoder : Callable [[Any ], Any ]
431432 value_fields_schema : list [FieldSchema ]
432433 value_decoder : Callable [[Any ], Any ]
434+ index_options : IndexOptions
433435
434436
435437def _build_args (
@@ -543,6 +545,7 @@ def create_export_context(
543545 raw_spec : dict [str , Any ],
544546 raw_key_fields_schema : list [Any ],
545547 raw_value_fields_schema : list [Any ],
548+ raw_index_options : dict [str , Any ],
546549 ) -> _TargetConnectorContext :
547550 key_annotation , value_annotation = (
548551 (
@@ -563,6 +566,7 @@ def create_export_context(
563566 )
564567
565568 spec = load_engine_object (self ._spec_cls , raw_spec )
569+ index_options = load_engine_object (IndexOptions , raw_index_options )
566570 return _TargetConnectorContext (
567571 target_name = name ,
568572 spec = spec ,
@@ -571,6 +575,7 @@ def create_export_context(
571575 key_decoder = key_decoder ,
572576 value_fields_schema = value_fields_schema ,
573577 value_decoder = value_decoder ,
578+ index_options = index_options ,
574579 )
575580
576581 def get_persistent_key (self , export_context : _TargetConnectorContext ) -> Any :
@@ -597,6 +602,7 @@ def get_setup_state(self, export_context: _TargetConnectorContext) -> Any:
597602 spec = export_context .spec ,
598603 key_fields_schema = export_context .key_fields_schema ,
599604 value_fields_schema = export_context .value_fields_schema ,
605+ index_options = export_context .index_options ,
600606 )
601607 state = get_persistent_state_fn (* args )
602608 if not isinstance (state , self ._state_cls ):
0 commit comments