You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling the join method in a chain doesn't work properly.
E.g.
query_A = Dataset.get_by_full_path('~/ds_A').query()
query_B = Dataset.get_by_full_path('~/ds_B').query()
print('\nquery_a:\n')
for i in query_A:
print(i)
print('\nquery_b:\n')
for i in query_B:
print(i)
print("\nquery_join = query_a.join(query_b, prefix='a_'): \n")
query_join = query_A.join(query_B, key='name', prefix='a_')
for item in query_join:
print(item)
print("\nquery_c = query_join.join(query_b, prefix='b_'): \n")
for item in query_join.join(query_B, key='name', prefix='b_'):
print(item)
The result of the query_c is not good because it has only 6 records instead of 14. Why 14? query_join has 6 records and if we go through them and check how many records from query_b are matched with each record from query_join by key name, we will get the following results:
record: 1
record: 2
record: 2
record: 3
record: 3
record: 3
which is 14 in total.
The text was updated successfully, but these errors were encountered:
nikolamaric
changed the title
Chaining join methods doesn't return an ecxpected result
Chaining join methods doesn't return an expected result
Oct 8, 2020
Seems that we do not have this issue, as multiple left joins do not work in the way I described in the previous comment, therefore I am closing the issue.
Calling the
join
method in a chain doesn't work properly.E.g.
returns the following results:
The result of the
query_c
is not good because it has only 6 records instead of 14. Why 14?query_join
has 6 records and if we go through them and check how many records fromquery_b
are matched with each record fromquery_join
by keyname
, we will get the following results:which is 14 in total.
The text was updated successfully, but these errors were encountered: