changes for the meta data to add the forced replication key #27
changes for the meta data to add the forced replication key #27narenderqlik wants to merge 3 commits intolibrary-updatesfrom
Conversation
| schema = Schema.from_dict(schema_dict) | ||
| mdata = metadata.get_standard_metadata(schema_dict, | ||
| key_properties=stream.pk_fields) | ||
| mdata = metadata.get_standard_metadata(schema_dict,key_properties=stream.pk_fields, replication_method="FULL_TABLE") |
There was a problem hiding this comment.
The replication method is hard-coded as "FULL_TABLE" because the stream details don’t currently include a replication method. To make it dynamic, we'd need to update the stream metadata to include this info, and then fetch it from there.
There was a problem hiding this comment.
You can add FULL_TABLE as default replication method in Stream class and generalize the implementation.
There was a problem hiding this comment.
I have added the replication_method key in the stream class to get the dynamic replication method for for all the streams.
RushiT0122
left a comment
There was a problem hiding this comment.
I see at least 18 children of companies table. Reverify the implementation and make appropriate changes.
| if hasattr(stream, 'parent_stream') and stream.parent_stream: | ||
| mdata = metadata.write(mdata, (), 'parent-tap-stream-id', stream.parent_stream.tap_stream_id) |
There was a problem hiding this comment.
| if hasattr(stream, 'parent_stream') and stream.parent_stream: | |
| mdata = metadata.write(mdata, (), 'parent-tap-stream-id', stream.parent_stream.tap_stream_id) | |
| if getattr(stream, `parent_stream`, None): | |
| mdata = metadata.write(mdata, (), 'parent-tap-stream-id', stream.parent_stream.tap_stream_id) |
There was a problem hiding this comment.
I have made the changes. please verify once
Description of change
Add New Metadata to tap-codat
SAC-28823
Changes :
AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code