Desktop productivity for business analysts and programmers

Convert complex SQL query to Enterprise Guide process flow

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Convert complex SQL query to Enterprise Guide process flow

Hi community members,

 

We have started to use Enterprise Guide (v. 7.15) based on data imported from CSV files. These files were generated from an SQL client and are the results of sometimes quite complex SQL queries (multiple tables joined together, multiple unions, etc). I was wondering if there is a way to take the SQL statement and convert it somehow into an Enterprise Guide process flow?

 

Your response is appreciated!


Accepted Solutions
Solution
‎02-01-2018 04:27 AM
Super User
Super User
Posts: 9,211

Re: Convert complex SQL query to Enterprise Guide process flow

Posted in reply to barry_van_dijk

It is hard to say.  What I can say is:

You can connect to databases via proc sql in SAS.

You can use any ANSI SQL statement directly in SAS proc sql

 

So with that, if the database is available to your SAS session, and your SQL from the database is plain ANSI SQL without special database functions and such like, then it should be perfectly feasible to copy the SQL over and run it from SAS rather than on the database.  If you have database specific functions and such like then you can use pass-through which sends the whole SQL to the database for processing, and then receives the results back into a dataset.  (Note I speak mainly of SAS coding, I don't remember much about the front end of EGuide).

View solution in original post


All Replies
Solution
‎02-01-2018 04:27 AM
Super User
Super User
Posts: 9,211

Re: Convert complex SQL query to Enterprise Guide process flow

Posted in reply to barry_van_dijk

It is hard to say.  What I can say is:

You can connect to databases via proc sql in SAS.

You can use any ANSI SQL statement directly in SAS proc sql

 

So with that, if the database is available to your SAS session, and your SQL from the database is plain ANSI SQL without special database functions and such like, then it should be perfectly feasible to copy the SQL over and run it from SAS rather than on the database.  If you have database specific functions and such like then you can use pass-through which sends the whole SQL to the database for processing, and then receives the results back into a dataset.  (Note I speak mainly of SAS coding, I don't remember much about the front end of EGuide).

Super User
Posts: 5,827

Re: Convert complex SQL query to Enterprise Guide process flow

Posted in reply to barry_van_dijk

Apart from excellent advice by @RW9, I just would like to stress that Enterprise Guide is aimed as an ETL tool. I'm saying this since I sense that you wish to structure up your logic in a graphical interface, and perhaps overtime use that for documentation and maintenance reasons.

I f you have many jobs that you wish to treat this way, you might want to look at SAS DI Studio instead.

Data never sleeps
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 111 views
  • 2 likes
  • 3 in conversation