Skip to main content
Version: 2.0.0

tdk fn update

Update a function.

Dynamically imports the symbol named by --path (a tabsdatak *Info descriptor) and updates the existing function via the v2 bundle producer (tabsdatak.common._archive.bundle.build_bundle).

tdk fn update \
--proj quickstart \
--name read_world \
--coll sales_data \
--description Ingests raw sales data from Postgres \
--path functions/read_world.py::read_world \
--dir-to-bundle ./qs-example \
--reuse-tables \
--enabled \
--storage-path /prod \
--reset-state \
--reset-stage
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 be updated.
--coll, -cstringOptionalName of the collection to which the function belongs.
--descriptionstringOptionalDescription of the function.
--pathstringRequiredPath to the function file. Must be of the form '/path/to/file.py::function_name'. Will be prompted for it if not provided.
--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.
--reuse-tablesflagOptionalReuse previously created tables. If provided, any tables that the function produces that already exist in the system (but no longer have a function that generates them) will be reused, adding to their data history. If not provided, those tables will be recreated and their data history re-initialized.
--enabled, --disabledflagOptionalEnable or disable the feature
--storage-pathstringOptionalOptional storage-prefix override for this function's output table data. When omitted, the previous version's value is carried forward.
--reset-stateflagOptionalRegenerate the function's state table id instead of carrying it forward, so publishers re-read their initial configuration values from scratch.
--reset-stageflagOptionalRegenerate the function's stage id (a fresh stage/checkpoint dir), discarding accumulated stage state. The stage's storage prefix is unchanged.