set_link¶
Type of operation: Metadata
Description¶
Add a foreign key to the output. The foreign key identifies the target dataset and columns used to find a target resource.
Usage¶
set_link [ label ], keyfield ...
Argument |
Type |
Required |
Multiple |
---|---|---|---|
label |
any |
Optional |
Only one |
keyfield |
fieldref |
Required |
Can be multiple |
Accelerable¶
set_link is always accelerable if the input is accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.
Examples¶
set_link "Related Resource", src1:@target.dst1, src2:@target.dst2
Adds a foreign key that links to @target, matching dst1 and dst2 in the target to src1 and src2 in the current dataset. The key label is set to “Related Resource”.
set_link src1:@foo.dst1
Adds a foreign key that links to @foo, matching dst1 in the target to src1 in the current dataset. The key label is set from the existing label of the target @foo.
Aliases¶
addfk
(deprecated)