From 089c1d1d76b36ef6b054969cfc94c3141db7e3d9 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 28 Apr 2021 18:16:55 -0500 Subject: [PATCH] bug fix ... --- pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.py b/pipeline.py index 78559cb..5759696 100644 --- a/pipeline.py +++ b/pipeline.py @@ -287,7 +287,7 @@ class Components : SQL = [ "SELECT :fields FROM ", "(SELECT ROW_NUMBER() OVER() AS row_number,* FROM :target.:table) x","INNER JOIN", - "(SELECT ROW_NUMBER() OVER() AS row_number, :unique_field FROM :source.:table) y", + "(SELECT ROW_NUMBER() OVER() AS row_number, :unique_field FROM :source.:table ORDER BY RAND()) y", "ON y.row_number = x.row_number" ] SQL = " ".join(SQL).replace(":fields",",".join(fields)).replace(":table",table).replace(":source",source).replace(":target",target)