Snowflake Native App
The Orchestrate SDK is available as a Snowflake Native App for use in the Snowflake Ecosystem. This allows you to leverage the Orchestrate APIs in your Snowflake environment.
Installation
To install it in your Snowflake account, search for “Orchestrate” in the Snowflake Marketplace. In order to interface with the Orchestrate API, you will need to create a secret for your API key and network integrations.
For specific installation instructions for the version you’re installing, refer to package documentation in the marketplace.
Function Signatures
Functions within the Native App follow the exact same signatures as those in the Python SDK.
For example, the terminology.standardize_medication
function in the Python SDK has the same signature as the terminology.standardize_medication
function in the Snowflake Native App.
In the Python SDK:
from orchestrate import OrchestrateApi
import os
os.environ["ORCHESTRATE_API_KEY"] = "<your-api-key>"
api = OrchestrateApi()
api.terminology.standardize_medication("861004", "RxNorm")
Because the display
argument is optional, it can be omitted in Python. In the Snowflake Native App, it must be explicitly null
:
select orchestrate.terminology.standardize_medication('861004', 'RxNorm', null);
Type Differences
The Native App uses the same function names as the Python SDK, but request and response types expecting a dict
or Bundle
in Python expect a string
in the Native App. This is because the Native App uses SQL to interact with the Orchestrate API.
For example, the convert.fhir_stu3_to_fhir_r4
function in the Python SDK:
api.convert.fhir_stu3_to_fhir_r4({"resourceType": "Bundle", "type": "searchset", ... })
select orchestrate.convert.fhir_stu3_to_fhir_r4('{"resourceType": "Bundle", "type": "searchset", ... }');
OMOP Differences
When invoking convert.fhir_r4_to_omop
in the Native App, the response is a table function containing three columns:
file_name
: Name of the CSV file in the response zip.
row_type
: data
or header
. Indicates whether this row is a header row in the CSV or a data row.
content
: The content of the CSV row.