apache_airflow_providers_imednet.operators package

Airflow operators for interacting with iMedNet.

class apache_airflow_providers_imednet.operators.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', batch_size=500, max_retries=3, idempotent=True, **kwargs)[source]

Initialize the operator.

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

  • destination (Optional[str]) – The destination sink format or database.

  • output_path (Optional[str]) – The filesystem path to export to (if applicable).

  • export_func (Optional[str]) – The specific legacy tabular export function to use.

  • export_kwargs (Optional[Mapping[str, Any]]) – Extra keyword arguments passed to the sink/export function.

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

  • 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.

  • kwargs (Any) – Additional Airflow BaseOperator arguments.

Return type:

None

execute(context)[source]

Execute the export task.

Return type:

Optional[str]

Parameters:

context (airflow.sdk.definitions.context.Context) –

class apache_airflow_providers_imednet.operators.ImednetHook[source]

Bases: BaseHook

Retrieve an ImednetSDK instance from an Airflow connection.

__init__(imednet_conn_id='imednet_default')[source]

Initialize the Imednet hook.

Parameters:

imednet_conn_id (str) –

Return type:

None

describe_connection()[source]

Return redacted primitive metadata about resolved hook configuration.

Return type:

dict[str, Union[str, int, float, bool, None, list[PrimitiveContainer], dict[str, PrimitiveContainer]]]

get_conn()[source]

Backward compatible alias for get_sdk_client().

Return type:

ImednetSDK

get_sdk_client()[source]

Return an SDK client for use within task execution context.

Return type:

ImednetSDK

list_studies_metadata()[source]

Return primitive, serialization-safe study metadata for task mapping.

Return type:

list[dict[str, Union[str, int, float, bool, None, list[PrimitiveContainer], dict[str, PrimitiveContainer]]]]

list_study_keys()[source]

Return primitive study keys for mapped Airflow task expansion.

Return type:

list[str]

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', batch_size=500, max_retries=3, idempotent=True, **kwargs)[source]

Initialize the operator.

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

  • destination (Optional[str]) – The destination sink format or database.

  • output_path (Optional[str]) – The filesystem path to export to (if applicable).

  • export_func (Optional[str]) – The specific legacy tabular export function to use.

  • export_kwargs (Optional[Mapping[str, Any]]) – Extra keyword arguments passed to the sink/export function.

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

  • 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.

  • kwargs (Any) – Additional Airflow BaseOperator arguments.

Return type:

None

execute(context)[source]

Execute the export task.

Return type:

Optional[str]

Parameters:

context (airflow.sdk.definitions.context.Context) –