set_link¶
Type of operation: Metadata
Description¶
Add a foreign key to the output, which identifies the target dataset and columns used to find a target resource.
Usage¶
set_link [ label ], keyfield_1, keyfield_2, ...
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
label |
variant |
yes |
no |
none |
keyfield |
variant |
no |
yes |
column |
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)