Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Import data from two different servers based on WHILE condition

cito
8 - Asteroid

I had a similar question last year but there was one system/server (Teradata).

Today, for this question, I have two different systems/servers: Microsoft SQL Server and Teradata.

 

My first input comes from SQL Server where I have 50 records:

 

 

SELECT *
FROM dbo.table1

 

 

 

In this table (dbo.table1) I have e.g. 20 "model_numbers" and now I need to bring some additional fields from another server and table (Teradata) but this table has more than 30 million records. I would like to avoid input/load all records from the Teradata table and would like to create a condition in Teradata input WHERE "model_numbers" (from Teradata) will bi IN ("model_numbers" from SQL table).

 

 

SELECT *
FROM ted.table2
WHERE model_numbers IN (SELECT DISTINCT model_numbers FROM dbo.table1)

 

 

 

Is this possible to achieve in Alteryx when we have two different systems/servers?

Thank you in advance. 

21 REPLIES 21
dYoast
11 - Bolide

@cito 

 

A suggestion.  Put a normal input tool and connect to your Teradata.  Use the query from the dynamic input, BUT, replace the clause of ('123','234') with the string you generate from the Summarize.

 

If the normal input tool does not give the data you expect, then the replace in the Dynamic Input will not work either.  If you get the normal Input tool working properly, then you should be able to convert it to a Dynamic Input.

 

I have to agree with @apathetichell ,who is much more experienced, your configuration looks OK.

 

cito
8 - Asteroid

Finally... 😊

 

In the end, Dynamic input, Teradata original SQL with "fake" WHERE condition (SELECT ..... WHERE serial_number IN ('123','234')).
When I clicked on the "Replace a Specific String" within "Text to Replace" box was my original Teradata SQL query. I deleted everything and typed the "faked" serial_number that I put in WHERE condition '123','234' and replaced it with a concatenated field from SUM tool. 

Picture below.

 

So, what else to say except, sorry and thank you for your effort and support! 

 

cito_0-1660552920625.png

 

Labels