GitHub
09/18/2024, 7:07 PMstreams.core.Stream should read the key_properties automatically.
Issue created by haleemur
Feature scope
Taps (catalog, state, stream maps, tests, etc.)
Description
If the key_properties is present in the schema, then the primary_keys attribute should be derived from it. This will allow tap authors to keep the definition contained in 1 place (within the schema) and not have to override the method primary_keys for each stream.
key_properties is in the singer spec. However, I was not able to find primary_keys being set in these classes (Stream, GraphQLStream, RESTStream).
The SQLStream class defines primary_keys as self._singer_catalog_entry.metadata.root.table_key_properties or []. This is likely safe as, if the key properties are available in the metadata, they should be used, though I haven't read enough code to determine exactly how the key properties are set in the metadata.
meltano/sdkGitHub
09/18/2024, 7:07 PMstreams.core.Stream should read the key_properties automatically.
Issue closed as completed by haleemur
meltano/sdk