Lineage Add API

class ds_capability.components.abstract_common_component.AbstractCommonComponent(property_manager: Any, intent_model: Any, default_save: bool | None = None, reset_templates: bool | None = None, template_path: str | None = None, template_module: str | None = None, template_source_handler: str | None = None, template_persist_handler: str | None = None, align_connectors: bool | None = None)

An abstract common component class that contains the methods shared across all capabilities. This allows all capability instances to share common behavior in initialization, connectivity management, reporting and running the component.

add_column_description(column_name: str, description: str, save: bool | None = None)

adds a description note that is included in with the ‘report_column_catalog’

add_intent_description(action: [<class 'int'>, <class 'str'>], text: str, save: bool | None = None)

sets description associated with an intent action

Parameters:
  • action – the action to add the comment to

  • text – the description text

  • save – (optional) override of the default save action set at initialisation.

add_notes(catalog: str, label: [<class 'str'>, <class 'list'>], text: str, constraints: list | None = None, save=None)
adds a note to the augmented knowledge.

if no label is given then a journal date of ‘year-month’ is provided if no catalog is given then the default catalogue name is given

Parameters:
  • catalog – a catalog name

  • label – a sub key label or list of labels to separate different information strands

  • text – the text to add

  • constraints – (optional) a list of allowed label values, if None then any value allowed

  • save – if True, save to file. Default is True

add_run_book(run_levels: [<class 'str'>, <class 'list'>], book_name: str | None = None, save: bool | None = None)

sets a named run book, the run levels are a list of levels and the order they are run in

Parameters:
  • run_levels – the name or list of levels to be run

  • book_name – (optional) the name of the run_book. defaults to ‘primary_run_book’

  • save – (optional) override of the default save action set at initialisation.

add_run_book_level(run_level: str, book_name: str | None = None, save: bool | None = None)

adds a single runlevel to the end of a run_book. If the name already exists it will be replaced

Parameters:
  • run_level – the run_level to add.

  • book_name – (optional) the name of the run_book. defaults to ‘primary_run_book’

  • save – (optional) override of the default save action set at initialisation.

set_description(description: str, save=None)

sets the description of this component task :param description: a brief description of this component task :param save: override of the default save action set at initialisation.

set_status(status: str, save=None)

sets the status of this component task. Suggested status might be ‘discovery’, ‘stable’, ‘production’ :param status: the status to be set, :param save: override of the default save action set at initialisation.

set_version(version: str, save=None)

sets the version :param version: the version to be set :param save: override of the default save action set at initialisation.

class ds_capability.components.feature_select.FeatureSelect(property_manager: Any, intent_model: Any, default_save: bool | None = None, reset_templates: bool | None = None, template_path: str | None = None, template_module: str | None = None, template_source_handler: str | None = None, template_persist_handler: str | None = None, align_connectors: bool | None = None)
set_provenance(title: str | None = None, domain: str | None = None, description: str | None = None, license_type: str | None = None, license_name: str | None = None, license_uri: str | None = None, cost_price: str | None = None, cost_code: str | None = None, cost_type: str | None = None, provider_name: str | None = None, provider_uri: str | None = None, provider_note: str | None = None, author_name: str | None = None, author_uri: str | None = None, author_contact: str | None = None, save: bool | None = None)

sets the provenance values. Only sets those passed

Parameters:
  • title – (optional) the title of the provenance

  • domain – (optional) the domain it sits within

  • description – (optional) a description of the provenance

  • license_type – (optional) The type of the license. Default ‘ODC-By’

  • license_name – (optional) The full name of the license. Default ‘Open Data Commons Attribution License’

  • license_uri – (optional) The license uri. Default https://opendatacommons.org/licenses/by/

  • cost_price – (optional) a cost price associated with this provenance

  • cost_code – (optional) a cost centre code or reference code

  • cost_type – (optional) the cost type or description

  • provider_name – (optional) the provider system or institution name or title

  • provider_uri – (optional) a uri reference that helps identify the provider

  • provider_note – (optional) any notes that might be useful

  • author_name – (optional) the author of the data

  • author_uri – (optional) the author uri

  • author_contact – (optional)the the author contact information

  • save – (optional) if True, save to file. Default is True