Supressing query text in FluidShell

by Nov 4, 2014

Hi,

I am using shell variables to script my queries and enable their re-use. I would like to send output to a log file to compare runs and check for errors. When I paste sql into FluidShell, or source myfile.sql the query is always echo’ed to the output.

My Options->FluidShell has Echo commands off. what am I missing to get only the sql results echo’ed to the log file?

Apologies for screen shots attached, but code is in a secure virtual environment. The first example shows FluidShell executing sql via source’ing the set of SQL commands to create temp tables. I dont want the sql statements being echo’ed to the shell. If I redirect output ‘> mylog.log’ the sql appears and makes it harder to track just the count statements. The 2nd image shows another line of sql for counts appearing and the result. I would like only the result text to appear in the shell or in a log.

I know how to suppress the other output with CMD_GO_SHOW_QUERY_STATS.

Thanks

Attachments.zip

Response

Niels Gron over 8 years ago
Can you be more specific on what you are doing and the results?

See my example below which doesn’t have the problem you are describing :

/Users/niels$:1> select Country, Region, Primary_Lang from CIA_Factbook limit 5
/Users/niels$:2> go > cia_factbook.txt
/Users/niels$:1> cat cia_factbook.txt

Country Region Primary_Lang
———- ——— —————
Afghanistan Middle East Afghan Persian or Dari
Akrotiri Eastern Mediterranean English
Albania Southeastern Europe Albanian
Algeria Northern Africa Arabic
American Samoa Oceania Samoan

5 record(s) selected [Fetch MetaData: 0ms] [Fetch Data: 0ms]

[Executed: 10/22/2014 9:04:31 AM] [Execution: 1ms]

Niels Gron over 8 years ago
You can do a “man source” to see the options of the source command. One of the options is “-e” for echo. You can do a “source -e false myfile.sql”.