Mindaugas Nižauskas
07/03/2024, 2:43 PMMindaugas Nižauskas
07/03/2024, 2:44 PMclass CustomPropertiesStream(RepositoryStream):
"""Defines 'custom_properties' stream."""
name = "custom_properties"
path = "/repos/{org}/{repo}/properties/values"
primary_keys = ["property_name"]
parent_stream_type = RepositoryStream
ignore_parent_replication_key = False
state_partitioning_keys = ["repo", "org"]
selected_by_default = True
schema = th.PropertiesList(
# Parent Keys
th.Property("repo", th.StringType),
th.Property("org", th.StringType),
th.Property("repo_id", th.IntegerType),
# Custom Property Keys
th.Property("property_name", th.StringType),
th.Property("value", th.StringType),
).to_dict()
And adding CustomPropertiesStream imports to stream.py
Is my code correct? Anything else I should be aware of?Edgar Ramírez (Arch.dev)
07/03/2024, 2:53 PMMindaugas Nižauskas
07/03/2024, 2:55 PMroot@b8857e052cea:/project# meltano select tap-github --list
2024-07-03T14:53:52.254688Z [info ] The default environment 'dev' will be ignored for `meltano select`. To configure a specific environment, please use the option `--environment=<environment name>`.
Legend:
selected
excluded
automatic
Enabled patterns:
custom_properties.*
Selected attributes:
root@b8857e052cea:/project#Edgar Ramírez (Arch.dev)
07/03/2024, 2:56 PMmeltano install --clean and try again?Mindaugas Nižauskas
07/03/2024, 2:59 PM.meltano/extractors/tap-github folderReuben (Matatika)
07/03/2024, 3:31 PMEdgar Ramírez (Arch.dev)
07/03/2024, 3:32 PMI did that, but you know, for testing locally, I am directly modifying tap code in myOh, sorry about that 😳folder.meltano/extractors/tap-github
Mindaugas Nižauskas
07/04/2024, 6:42 AMMindaugas Nižauskas
07/04/2024, 7:14 AMpip_url: git+<https://github.com/datarts-tech/tap-github.git@add_custom_properties>, solved the issue of not selecting it, but I see another problem when I try to run it:
Maybe this is something very obvious for you?
2024-07-04T07:11:51.002891Z [info ] File "/project/.meltano/extractors/tap-github/venv/lib/python3.10/site-packages/singer_sdk/streams/core.py", line 409, in get_replication_key_signpost cmd_type=elb consumer=False name=tap-github producer=True stdio=stderr string_id=tap-github
2024-07-04T07:11:51.003641Z [info ] return utc_now() if self.is_timestamp_replication_key else None cmd_type=elb consumer=False name=tap-github producer=True stdio=stderr string_id=tap-github
2024-07-04T07:11:51.004167Z [info ] File "/project/.meltano/extractors/tap-github/venv/lib/python3.10/site-packages/singer_sdk/streams/core.py", line 218, in is_timestamp_replication_key cmd_type=elb consumer=False name=tap-github producer=True stdio=stderr string_id=tap-github
2024-07-04T07:11:51.004743Z [info ] return is_datetime_type(type_dict) cmd_type=elb consumer=False name=tap-github producer=True stdio=stderr string_id=tap-github
2024-07-04T07:11:51.005519Z [info ] File "/project/.meltano/extractors/tap-github/venv/lib/python3.10/site-packages/singer_sdk/helpers/_typing.py", line 140, in is_datetime_type cmd_type=elb consumer=False name=tap-github producer=True stdio=stderr string_id=tap-github
2024-07-04T07:11:51.006143Z [info ] raise EmptySchemaTypeError cmd_type=elb consumer=False name=tap-github producer=True stdio=stderr string_id=tap-github
2024-07-04T07:11:51.006741Z [info ] singer_sdk.helpers._typing.EmptySchemaTypeError: Could not detect type from empty type_dict. Did you forget to define a property in the stream schema? cmd_type=elb consumer=False name=tap-github producer=True stdio=stderr string_id=tap-github
2024-07-04T07:11:51.116180Z [info ] Incremental state has been updated at 2024-07-04 07:11:51.116089.
2024-07-04T07:11:51.130659Z [error ] Extractor failed
2024-07-04T07:11:51.131075Z [error ] Block run completed. block_type=ExtractLoadBlocks err=RunnerError('Extractor failed') exit_codes={<PluginType.EXTRACTORS: 'extractors'>: 1} set_number=0 success=FalseEdgar Ramírez (Arch.dev)
07/04/2024, 4:43 PMMindaugas Nižauskas
07/04/2024, 5:21 PMEdgar Ramírez (Arch.dev)
07/04/2024, 5:59 PM