Join across data sources - how? #440
Unanswered
stevenhorner
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have read the documentation joins dozens of times but I can't get the join across data sources to work between 2 SQL Server DBs. I have both sources added and everything worked on each source individually as expected but if I try a join between 2 data sources it only ever returns all records and all fields from the left side.
This is an example:
sq '@dev.hdSettings:d | join(@preprod.hdSettings:p, .d.InstanceID == .p.InstanceID) | .d.Title, .p.AppURL'I've tried many variations on this but no matter what I do I can not get a join between the 2 SQL Servers to work. In the example above there is only one record and both of them have an InstanceID of
0.Here are some other examples, all just return all records and fields from the left side, they don't even only show the specified fields:
sq '@preprod.hdSettings:a, @dev.hdSettings:b | join(.InstanceID) | .a.Title'sq '@preprod.hdSettings:a | join(@dev.hdSettings:b, .InstanceID) | .InstanceID, .a.Title, .b.Title'What am I doing wrong, the documentation gives examples of cross joining multiple data sources of different types of DB?
Also noticed that if I do a diff across the 2 data sources, the first specified @dev one below is only shown:
sq diff @dev.hdSettings @preprod.hdSettings --dataBeta Was this translation helpful? Give feedback.
All reactions