JoinAcross[{a1,a2,…},{b1,b2,…},keyspec]
gives a list of associations obtained by joining those pairs of associations ai and bj in which the values specified by keyspec match.
JoinAcross[tab1,tab2,keyspec]
joins two tabular objects according to keyspec.
JoinAcross[prefix1obj1,prefix2obj2,keyspec]
prefixes the keys in obji with prefixi using ExtendedKey[prefixi,ckeyij].
JoinAcross[alist,blist,keyspec,"joinspec"]
uses joinspec to determine when to allow associations that contain missing elements to be generated.
JoinAcross
JoinAcross[{a1,a2,…},{b1,b2,…},keyspec]
gives a list of associations obtained by joining those pairs of associations ai and bj in which the values specified by keyspec match.
JoinAcross[tab1,tab2,keyspec]
joins two tabular objects according to keyspec.
JoinAcross[prefix1obj1,prefix2obj2,keyspec]
prefixes the keys in obji with prefixi using ExtendedKey[prefixi,ckeyij].
JoinAcross[alist,blist,keyspec,"joinspec"]
uses joinspec to determine when to allow associations that contain missing elements to be generated.
Details and Options
- JoinAcross[{a1,a2,…},{b1,b2,…},keyspec] effectively implements the analog of SQL JOIN, joining two tables with rows ai and bj across columns specified by keyspec.
- In JoinAcross[{a1,a2,…},{b1,b2,…},keyspec], keyspec can be one of the following:
-
key join ai and bj when the value associated with key is the same {key1,key2,…} all the values associated with each keyi need to be the same in each matched pair keyakeyb the value associated with keya in ai must be the same as the value associated with keyb in bj {keya1keyb1,keya2keyb2,…} match the value associated with keyai in ai with the value associated with keybj in bj func join the pairs ai, bj whenever func[ai,bj] is True - In JoinAcross[{a1,a2,…},{b1,b2,…},keyspec], keyspec can effectively be replaced by the following functions:
-
key #1[key]===#2[key]& {key1,key2,…} #1[key1]===#2[key1]&[key2]===#2[key2]&&…& keyakeyb #1[keya]===#2[key2]& {keya1keyb1,keya2keyb2,…} #1[keya1]===#2[keyb1]&[keya2]===#2[keyb2]&&…& - Key specifications in JoinAcross must be wrapped in Key unless they are strings.
- JoinAcross effectively generates a filtered version of Flatten[Outer[Join,alist,blist]].
- By default, JoinAcross does an "inner join" in the SQL sense.
- The following forms for "joinspec" specify different behavior for pairs of associations ai, bj:
-
"Inner" keep only those ai, bj for which values match (default) "Left" allow ai for which there is no matching bj "Right" allow bi for which there is no matching aj "Outer" allow both unmatched ai and bj - When a corresponding value is absent, Missing["Unmatched"] is used in its place.
- JoinAcross[{a1,…},{b1,…},{},"joinspec"] and JoinAcross[{a1,…},{b1,…},True&,"joinspec"] are effectively the same as Outer[Join,{a1,…},{b1,…}]. Since all ai match all bj, the "joinspec" is ignored.
- The option KeyCollisionFunction can be given to specify what to do with elements of ai and bj that are not specified to be joined, but nevertheless have the same key.
- Possible settings for KeyCollisionFunction include:
-
None drop both elements Left include only the left element (default) Right include only the right element func apply func to generate a pair of new keys
Examples
open all close allBasic Examples (10)
Join two associations that have the same value for the specified key:
JoinAcross[{<|"Author" -> "Mark Twain", "YearOfBirth" -> 1835|>, <|"Author" -> "Jules Verne", "YearOfBirth" -> 1828|>}, {<|"Author" -> "Mark Twain", "Title" -> "Tom Sawyer"|>, <|"Author" -> "Mark Twain", "Title" -> "Huckleberry Finn"|>}, "Author"]Do the same using Tabular objects:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Author"]JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["AuthorFirst" -> Association["ElementType" -> "String"],
"AuthorLast" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 4, 9}, "MarkJules"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 5, 10}, "TwainVerne"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{1835, 1828}, {}, None}, "ElementType" ->
"Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["AuthorFirst" -> Association["ElementType" -> "String"],
"AuthorLast" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 4}, "Mark"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 5}, "Twain"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{3, {0, 10}, "Tom Sawyer"}, {}, None},
"ElementType" -> "String"]]}}]]]], {"AuthorFirst", "AuthorLast"}]Join by different keys on the left and on the right:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Name" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 36}, "Tom SawyerFrom the Earth to the Moon"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Name" -> "Author"]Use a function to find posthumous works:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfDeath" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10}, "Mark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association["Data" -> {{1910}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"], "Publication" ->
Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20, 30},
"Mark TwainMark TwainMark Twain"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{3, {0, 10, 26, 49},
"Tom SawyerHuckleberry FinnThe Mysterious Stranger"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1876, 1884, 1916}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], #1["Author"] === #2["Author"] && #1["YearOfDeath"] < #2["Publication"]&]Use rules to avoid key collisions:
JoinAcross["Author" -> Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Name" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], "Book" -> Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Name" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Name" -> "Author"]With "Inner" join (default), combine only the matched associations:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20, 34},
"Mark TwainMark TwainEmilio Salgari"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{3, {0, 10, 26, 34},
"Tom SawyerHuckleberry FinnSandokan"}, {}, None}, "ElementType" -> "String"]]}}]]]], "Author", "Inner"]With "Left" join, include unmatched entries from the left list:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20, 34},
"Mark TwainMark TwainEmilio Salgari"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{3, {0, 10, 26, 34},
"Tom SawyerHuckleberry FinnSandokan"}, {}, None}, "ElementType" -> "String"]]}}]]]], "Author", "Left"]With "Right" join, unmatched entries from the right list are included:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20, 34},
"Mark TwainMark TwainEmilio Salgari"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{3, {0, 10, 26, 34},
"Tom SawyerHuckleberry FinnSandokan"}, {}, None}, "ElementType" -> "String"]]}}]]]], "Author", "Right"]With "Outer" join, include all unmatched entries:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20, 34},
"Mark TwainMark TwainEmilio Salgari"}, {}, None}, "ElementType" -> "String"]],
TabularColumn[Association["Data" -> {{3, {0, 10, 26, 34},
"Tom SawyerHuckleberry FinnSandokan"}, {}, None}, "ElementType" -> "String"]]}}]]]], "Author", "Outer"]Scope (1)
JoinAcross works with SQL-backed Tabular objects:
schema = RelationalDatabase[FindFile["ExampleData/ecommerce-database.sqlite"]]offices = Tabular[schema -> "offices"]employees = Tabular[schema -> "employees"]joined = JoinAcross["employees" -> employees, "offices" -> offices, "officeCode"]ToMemory[joined]Options (3)
KeyCollisionFunction (3)
When a matching key b is not used for joining, pick the left value for this key by default:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Name" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Name" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Name" -> "Author"]Use KeyCollisionFunction to specify which value of the colliding key should be returned:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Name" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Name" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Name" -> "Author", KeyCollisionFunction -> Right]Generate new keys instead of a colliding key:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Name" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Name" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Name" -> "Author", KeyCollisionFunction -> Function[x, {left[x], right[x]}]]JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Name" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Name" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Name" -> "Author", KeyCollisionFunction -> None]Properties & Relations (2)
In some cases, JoinAcross can be rewritten as ColumnwiseCombine:
JoinAcross[Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]], "Author"]ColumnwiseCombine[{Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"YearOfBirth" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 21}, "Mark TwainJules Verne"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{1835, 1828}, {}, None}, "ElementType" -> "Integer64"]]}}]]]], Tabular[Association["RawSchema" -> Association["ColumnProperties" ->
Association["Author" -> Association["ElementType" -> "String"],
"Title" -> Association["ElementType" -> "String"]], "KeyColumns" -> None,
"Backend" -> "WolframKernel"], "Options" -> {},
"BackendData" -> Association["ColumnData" -> DataStructure["ColumnTable",
{{TabularColumn[Association["Data" -> {{3, {0, 10, 20}, "Mark TwainMark Twain"}, {}, None},
"ElementType" -> "String"]], TabularColumn[Association[
"Data" -> {{3, {0, 10, 26}, "Tom SawyerHuckleberry Finn"}, {}, None},
"ElementType" -> "String"]]}}]]]]} -> "Author"]JoinAcross is equivalent to CombinedEntityClass:
EntityValue[CombinedEntityClass["Isotope", EntityClass["Element", "Period1"], "Element" -> "Entity"], {EntityProperty["Isotope", "Element"], EntityProperty["Isotope", "Name"], EntityProperty["Isotope", "AtomicMass"], EntityProperty["Element", "Entity"], EntityProperty["Element", "AtomicMass"]}, "PropertyAssociation"]//TabularJoinAcross[EntityValue["Isotope", {EntityProperty["Isotope", "Element"], EntityProperty["Isotope", "Name"], EntityProperty["Isotope", "AtomicMass"]}, "PropertyAssociation"], EntityValue[EntityClass["Element", "Period1"], {EntityProperty["Element", "Entity"], EntityProperty["Element", "AtomicMass"]}, "PropertyAssociation"], EntityProperty["Isotope", "Element"] -> EntityProperty["Element", "Entity"]]//TabularPossible Issues (1)
Keys a and b collide, even though they are used for joining:
JoinAcross[{<|a -> 1, b -> 2|>}, {<|a -> 2, b -> 1|>}, {Key[a] -> Key[b], Key[b] -> Key[a]}, "Left",
KeyCollisionFunction -> Function[x, {left[x], right[x]}]]When the keys collide, the values from the left are taken by default:
JoinAcross[{<|a -> 1, b -> 2|>}, {<|a -> 2, b -> 1|>}, {Key[a] -> Key[b], Key[b] -> Key[a]}, "Left"]Specify which values to take for colliding keys:
JoinAcross[{<|a -> 1, b -> 2|>}, {<|a -> 2, b -> 1|>}, {Key[a] -> Key[b], Key[b] -> Key[a]}, "Left", KeyCollisionFunction -> Left]Specifically pick the right values for colliding keys:
JoinAcross[{<|a -> 1, b -> 2|>}, {<|a -> 2, b -> 1|>}, {Key[a] -> Key[b], Key[b] -> Key[a]}, "Left", KeyCollisionFunction -> Right]Text
Wolfram Research (2014), JoinAcross, Wolfram Language function, https://reference.wolfram.com/language/ref/JoinAcross.html (updated 2025).
CMS
Wolfram Language. 2014. "JoinAcross." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/JoinAcross.html.
APA
Wolfram Language. (2014). JoinAcross. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/JoinAcross.html
BibTeX
@misc{reference.wolfram_2026_joinacross, author="Wolfram Research", title="{JoinAcross}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/JoinAcross.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_joinacross, organization={Wolfram Research}, title={JoinAcross}, year={2025}, url={https://reference.wolfram.com/language/ref/JoinAcross.html}, note=[Accessed: 13-June-2026]}