Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: add_record_metadata should be in the generated Readme #1285

Closed
visch opened this issue Dec 20, 2022 · 4 comments
Closed

[Feature]: add_record_metadata should be in the generated Readme #1285

visch opened this issue Dec 20, 2022 · 4 comments

Comments

@visch
Copy link
Contributor

visch commented Dec 20, 2022

Feature scope

Targets (data type handling, batching, SQL object generation, etc.)

Description

https://github.com/meltano/sdk/blob/main/singer_sdk/sinks/core.py#L194
defaults to false, this should automatically be put into the readme generation just like stream_maps are! :D

@visch visch added kind/Feature New feature or request valuestream/SDK labels Dec 20, 2022
@edgarrmondragon
Copy link
Collaborator

This is good first issue for anyone looking to contribute.

  • Add the config schema, similar to

    TARGET_SCHEMA_CONFIG = PropertiesList(
    Property(
    "default_target_schema",
    StringType(),
    description="The default target database schema name to use for all streams.",
    ),
    ).to_dict()

  • Append to the builtin config, similar to

    @classmethod
    def append_builtin_config(cls: type[SQLTarget], config_jsonschema: dict) -> None:
    """Appends built-in config to `config_jsonschema` if not already set.
    To customize or disable this behavior, developers may either override this class
    method or override the `capabilities` property to disabled any unwanted
    built-in capabilities.
    For all except very advanced use cases, we recommend leaving these
    implementations "as-is", since this provides the most choice to users and is
    the most "future proof" in terms of taking advantage of built-in capabilities
    which may be added in the future.
    Args:
    config_jsonschema: [description]
    """
    def _merge_missing(source_jsonschema: dict, target_jsonschema: dict) -> None:
    # Append any missing properties in the target with those from source.
    for k, v in source_jsonschema["properties"].items():
    if k not in target_jsonschema["properties"]:
    target_jsonschema["properties"][k] = v
    capabilities = cls.capabilities
    if TargetCapabilities.TARGET_SCHEMA in capabilities:
    _merge_missing(TARGET_SCHEMA_CONFIG, config_jsonschema)
    super().append_builtin_config(config_jsonschema)

@stale
Copy link

stale bot commented Jul 18, 2023

This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.

@stale stale bot added the stale label Jul 18, 2023
@edgarrmondragon
Copy link
Collaborator

Still relevant

@stale stale bot removed the stale label Jul 20, 2023
@edgarrmondragon
Copy link
Collaborator

Closed by #1881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants