Deploying functions
How Rayfin functions ship to Fabric with rayfin up, and how to deploy just the functions project with rayfin up functions deploy.
Warning
Functions are experimental and are not available in every Fabric region or tenant. The deployment behavior below is the current documented behavior and may change. See Functions.
Enable functions before deploying
Functions deploy only when the service is turned on in rayfin/rayfin.yml:
services:
functions:
enabled: trueSee Functions for enabling the service and
Writing a function for scaffolding
rayfin/functions/ with npx rayfin functions init.
Deploying with rayfin up
rayfin up is the canonical "deploy this app" command — it syncs the service flags and
runtime settings from rayfin.yml to the remote Rayfin item, alongside applying your
database schema and, when enabled, building and deploying static content:
npx rayfin upWith services.functions.enabled: true, functions ship as part of this same deployment.
Redeploy with rayfin up after changing function code.
Deploying functions on their own
For faster iteration you can push functions without rebuilding and redeploying the rest of the app:
npx rayfin up functions deployNote
This subcommand is marked experimental in the CLI. It is registered only when
services.functions.enabled: true in rayfin.yml (or RAYFIN_FEATURE_FLAGS includes
functions).
| Flag | Description |
|---|---|
-v, --verbose | Enable verbose output. |
--skip-build | Skip the build command and deploy existing build output. |
--json | Output the result as JSON. |
It is the functions equivalent of rayfin up staticapp deploy
for static content and rayfin up db apply for schema. Use plain rayfin up when you want
the whole app deployed consistently.
Deploy my Rayfin app to Microsoft Fabric, functions included.
First confirm services.functions.enabled is true in rayfin/rayfin.yml (and that
rayfin/functions/ exists — run `npx rayfin functions init` if it doesn't). Then run the
standard deploy workflow yourself:
1. `npx rayfin login`
2. `npx rayfin up`
3. `npx rayfin up status`
After deploying, tell me how to call one of the functions from the frontend.Calling functions from your app
Invoke Rayfin functions from the frontend with a type-safe FunctionClient — client.functions.<name>.invoke() and error handling.
Connectors
Read and write existing Microsoft Fabric data — warehouses, SQL databases, Lakehouse SQL endpoints, semantic models, and KQL databases — from a Rayfin app.