The @transform
syntax is only valid in Code Repository, when writing Python transforms.
https://www.palantir.com/docs/foundry/code-repositories/create-transforms
You can read/write datasets in Code workspace (Jupyter CodeNotebook flavor) with another syntax See https://www.palantir.com/docs/foundry/code-workspaces/data/#tabular-datasets
from foundry.transforms import Dataset
kittens = Dataset.get("kittens")\
.read_table(format="arrow")\
.to_pandas()