Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.API ReferenceCLI ReferenceRelease Notes
Version: 2.1.0

tdk fn patch

Register a code-only patch of a function version.

A patch shares the parent's topology (tables, dependencies, triggers, workers) — only bundle / snippet / runtime values / description can be overridden.

A patch is the only way to change the code a planned run executes: both 'tdk fnrun replay' and 'tdk plan recover' / 'tdk fnrun recover' re-run the function version the plan pinned, picking up its latest patch. Registering a new version with 'tdk fn update' does not affect runs that are already planned.

tdk fn patch \
--proj quickstart \
--name read_world \
--coll sales_data \
--fn-version fv-9d21ac \
--path functions/read_world.py::read_world \
--description Ingests raw sales data from Postgres \
--dir-to-bundle ./qs-example \
--profile production
FlagTypeRequiredDescription
--proj, -PstringOptionalProject to target; overrides the pinned project. Prompted for when a command needs one and neither is set.
--name, -nstringRequiredName of the function to patch.
--coll, -cstringOptionalName of the collection to which the function belongs.
--fn-versionstringRequiredFunction-version id (fvid) this patch overrides. Use 'tdk fn get --show-history' to find available fvids.
--pathstringRequiredPath to the function file. Must be of the form '/path/to/file.py::function_name'. Will be prompted for it if not provided.
--descriptionstringOptionalDescription of the patch.
--dir-to-bundlestringOptionalPath to the directory that should be stored in the bundle for execution in the backend. If not provided, the folder where the function file is will be used.
--profilestringOptionalProfile whose connection and settings this command uses: '<NAME>-connection.json' and '<NAME>-options.json' under the Tabsdata directory. Default: the profile set with 'tdk set --profile', else 'connection.json' and 'options.json'.