Possible to create a queries in Make when integratin to PostgreSQL

Hi guys!
My business manager that I am going to do a automation business project ask me a question and I would like to understand if there is an answer to it.
Can I create a SQL queries in Make including multiple Join between tables?
I saw that there is a module of PostgreSQL called : Execute a query


Please let me know what do you think?

Yes you can basically do anything within the command that you would do within PostgreSQl terminal.

I only use snowflake but I’m assuming the same thing I have had no problems doing joins or complex queries with the module. I would just understand possible data limitations on the number of rows or size of the data set the api can return.

Can you give me example what is the syntax that I need to do?


I have for example two tables
Customer_item and customer and I want to create a query:
Select * from customer_item where customer_id ='something"
Or how can I write join?
What do I need to write in the command section?

Exactly the same SQL you would write in postgreSQL.

Below is an example

SELECT customer_item.*, customer.customer_name 
FROM customer_item 
JOIN customer 
ON customer_item.customer_id = customer.customer_id 
WHERE customer_item.customer_id = 'something';

HI @Mr.Make
So it’s work!!! :slight_smile:

But I have a question , please :slight_smile:
If I want to do this Join do I need to create two modules as I created in the image?
One for every table?
In addition I run the scenario and he made me a lots of operations and it’s stuck… do you know why?
Something scary…

If you show me the reasoning why it is stuck. Show me the warning error.

You can do the join in one module just use the SQL.

Hi @Mr.Make
When I connecting the Module PostgreSQL - “Execute a query (advanced)” to the first module of type "Select row(s) from table it’s ok.
image

But once I run it by itself as you said I get a warning:
“The module is not connected to the data flow”

Do you know why?
I can’t connected to the first module because than the query run a lots of time and it’s take , it’s run lots of operations.
Thank you