apache_airflow_providers_imednet.operators package

Airflow operators for interacting with iMedNet.

Submodules

apache_airflow_providers_imednet.operators.export module

Airflow operator for exporting study records.

class apache_airflow_providers_imednet.operators.export.ImednetExportOperator[source]

Bases: BaseOperator

Unified Airflow operator for exporting study records to any destination.

__init__(*, study_key, destination=None, output_path=None, export_func=None, export_kwargs=None, imednet_conn_id='imednet_default', destination_conn_id=None, batch_size=500, max_retries=3, idempotent=True, mask_phi=True, quality_gate_enabled=False, min_schema_readiness_score=100.0, as_sdtm=False, domain=None, sdtm_domain=None, standards_profile=None, min_standards_score=None, naming_convention=None, preserve_record_id=None, modified_since=None, record_filter=None, record_data_filter=None, include_deleted=False, incremental=False, stream_name=None, ledger_path=None, state_provider=None, **kwargs)[source]

Initialize the operator.

Parameters:
  • study_key (str) – The study key identifier.

  • destination (str | None) – The destination sink format or database.

  • output_path (str | None) – The filesystem path or SQL table target to export to (if applicable).

  • export_func (str | None) – The specific legacy tabular export function to use.

  • export_kwargs (Mapping[str, Any] | None) – Extra non-secret keyword arguments passed to the sink/export function.

  • imednet_conn_id (str) – Airflow connection ID to use for iMednet API credentials.

  • destination_conn_id (str | None) – Optional Airflow connection ID to resolve destination credentials at runtime.

  • batch_size (int) – Number of records to read and write per batch.

  • max_retries (int) – Maximum number of export attempts.

  • idempotent (bool) – Whether the export execution should be safely repeatable, automatically deduplicating or replacing existing outputs as appropriate.

  • mask_phi (bool) – Whether to replace sensitive PHI values with ***MASKED*** by default.

  • quality_gate_enabled (bool) – Whether to filter records through the schema readiness quality gate prior to export.

  • min_schema_readiness_score (float) – Minimum schema readiness score (0-100) required when the quality gate is enabled.

  • preserve_record_id (bool | None) – Optional override controlling whether RECORD_ID is retained in SDTM outputs (defaults to retaining it only when incremental=True).

  • kwargs (Any) – Additional Airflow BaseOperator arguments.

  • as_sdtm (bool) –

  • domain (str | None) –

  • sdtm_domain (str | None) –

  • standards_profile (str | None) –

  • min_standards_score (float | None) –

  • naming_convention (str | None) –

  • modified_since (Any) –

  • record_filter (Any) –

  • record_data_filter (str | None) –

  • include_deleted (bool) –

  • incremental (bool) –

  • stream_name (str | None) –

  • ledger_path (Any) –

  • state_provider (Any) –

Return type:

None

static __new__(cls, *args, **kwargs)[source]

Record explicitly supplied operational flags prior to default binding.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

ImednetExportOperator

execute(context)[source]

Execute the export task.

Parameters:

context (Context) –

Return type:

str | None

property export_kwargs: dict[str, Any]

Return validated non-secret export keyword arguments.

get_openlineage_facets_on_complete(task_instance=None)[source]

Return OpenLineage source and destination datasets after execution completes.

Parameters:

task_instance (Any) –

Return type:

Any

get_openlineage_facets_on_start()[source]

Return OpenLineage source and destination datasets prior to execution.

Return type:

Any

property modified_since: Any

Return the configured modified_since watermark.

property output_path: str | None

Return the configured output path.

property record_data_filter: str | None

Return the configured record_data_filter.

property record_filter: Any

Return the configured record_filter.

property stream_name: str | None

Return the configured stream_name.

property study_key: str

Return the configured study key.