apache_airflow_providers_imednet package

Airflow provider for iMednet.

This package provides hooks, operators, and sensors for integrating iMednet EDC data workflows into Apache Airflow pipelines.

class apache_airflow_providers_imednet.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.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]

class apache_airflow_providers_imednet.ImednetJobSensor[source]

Bases: BaseSensorOperator

Poll iMednet for job completion.

__init__(*, study_key, batch_id, imednet_conn_id='imednet_default', poke_interval=60, **kwargs)[source]

Initialize the job sensor.

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

  • batch_id (str) – The batch or job identifier to monitor.

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

  • poke_interval (float) – Seconds between polling attempts.

  • kwargs (Any) – Additional Airflow BaseSensorOperator arguments.

Return type:

None

poke(context)[source]

Check the status of the job.

Return type:

bool

Parameters:

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

Subpackages

Submodules

apache_airflow_providers_imednet.export module

Airflow-facing export helpers.

apache_airflow_providers_imednet.export.export_to_csv(*args, **kwargs)[source]

Wrap imednet.spi.export.export_to_csv() for Airflow compatibility.

Return type:

None

Parameters:
  • args (Any) –

  • kwargs (Any) –

apache_airflow_providers_imednet.export.export_to_excel(*args, **kwargs)[source]

Wrap imednet.spi.export.export_to_excel() for Airflow compatibility.

Return type:

None

Parameters:
  • args (Any) –

  • kwargs (Any) –

apache_airflow_providers_imednet.export.export_to_json(*args, **kwargs)[source]

Wrap imednet.spi.export.export_to_json() for Airflow compatibility.

Return type:

None

Parameters:
  • args (Any) –

  • kwargs (Any) –

apache_airflow_providers_imednet.export.export_to_parquet(*args, **kwargs)[source]

Wrap imednet.spi.export.export_to_parquet() for Airflow compatibility.

Return type:

None

Parameters:
  • args (Any) –

  • kwargs (Any) –

apache_airflow_providers_imednet.export.export_to_sql(*args, **kwargs)[source]

Wrap imednet.spi.export.export_to_sql() for Airflow compatibility.

Return type:

None

Parameters:
  • args (Any) –

  • kwargs (Any) –

apache_airflow_providers_imednet.export.export_to_sql_by_form(*args, **kwargs)[source]

Wrap imednet.spi.export.export_to_sql_by_form() for Airflow compatibility.

Return type:

None

Parameters:
  • args (Any) –

  • kwargs (Any) –

apache_airflow_providers_imednet.sensors module

Airflow sensors for iMednet operations.

class apache_airflow_providers_imednet.sensors.ImednetJobSensor[source]

Bases: BaseSensorOperator

Poll iMednet for job completion.

__init__(*, study_key, batch_id, imednet_conn_id='imednet_default', poke_interval=60, **kwargs)[source]

Initialize the job sensor.

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

  • batch_id (str) – The batch or job identifier to monitor.

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

  • poke_interval (float) – Seconds between polling attempts.

  • kwargs (Any) – Additional Airflow BaseSensorOperator arguments.

Return type:

None

poke(context)[source]

Check the status of the job.

Return type:

bool

Parameters:

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