Export Destinations¶
This guide explains when to use each export destination family and how to install only the optional dependencies you need.
For sink internals and data-flow architecture, see Architecture Overview. For full CLI syntax, see Command Line Interface (CLI).
Installation¶
# Install all tabular export dependencies
pip install "imednet[export]"
# Or install destination-specific extras
pip install "imednet[duckdb]"
pip install "imednet[mongodb]"
pip install "imednet[neo4j]"
pip install "imednet[snowflake]"
Destination decision matrix¶
Destination |
Best fit |
Data-shape characteristics |
Operational constraints |
|---|---|---|---|
MongoDB |
Application-facing document reads, schema-preserving archival |
Keeps nested |
Requires |
Neo4j |
Relationship-heavy exploration and lineage queries |
Preserves the hierarchy |
Requires |
Snowflake |
Warehouse-native analytics and bulk loading at scale |
Writes Parquet batch files, uploads to an internal stage, then issues
|
Requires |
SDK examples¶
MongoDB (document export):
from imednet import ImednetSDK
from imednet_sinks import MongoDbSinkConfig, export_to_mongodb
sdk = ImednetSDK(api_key="mock", security_key="mock")
mongodb_cfg = MongoDbSinkConfig(
study_key="MY_STUDY",
uri="mongodb://localhost:27017",
database="imednet",
collection="records",
batch_size=500,
idempotent=True,
)
rows = export_to_mongodb(sdk, "MY_STUDY", config=mongodb_cfg)
print(rows)
Neo4j (graph export):
from imednet import ImednetSDK
from imednet_sinks import Neo4jSinkConfig, export_to_neo4j
sdk = ImednetSDK(api_key="mock", security_key="mock")
neo4j_cfg = Neo4jSinkConfig(
study_key="MY_STUDY",
uri="bolt://localhost:7687",
auth=("neo4j", "..."),
database="neo4j",
batch_size=500,
idempotent=True,
)
rows = export_to_neo4j(sdk, "MY_STUDY", config=neo4j_cfg)
print(rows)
Snowflake (warehouse-native export):
from imednet import ImednetSDK
from imednet_sinks import SnowflakeSinkConfig, export_to_snowflake
sdk = ImednetSDK(api_key="mock", security_key="mock")
snowflake_cfg = SnowflakeSinkConfig(
study_key="MY_STUDY",
account="myorg-myaccount",
user="loader",
password="...",
database="IMEDNET_DB",
schema="PUBLIC",
warehouse="COMPUTE_WH",
stage="MY_STAGE",
table="RECORDS",
)
rows = export_to_snowflake(sdk, "MY_STUDY", config=snowflake_cfg)
print(rows)