We want to run a query in the Netezza IDE and export the results in the form of a CSV file. Is there any API which would let us do the same, using a shell or some other script?
Is there any shell available with Netezza which anyone knows about, using which I can run an SQL query and get the results in a text file or a CSV file (preferred)?
Since you have powershell among your tags, I am assuming you need a tool that works under Windows. The command line client for Netezza - nzsql - is not available for Windows but there is a couple of third-party command line sql clients/shells which you can use with with Netezza:
dbish dbi:ODBC:NZ user password
Both tools have options to output results as CSV files.