How To: Get the results of Presto Query which also includes headers

Description:

This article describes the appropriate parameters which can be used when you want to also include the COLUMN HEADERS while downloading the results of a PRESTO query.

Generally, if you are using the Qubole UI, there is already an option to "Include Header" on the top right corner on the History panel corresponding to the Command ID.

For a Presto Query, these parameters are required when you try to download the results using the following API call

http://docs.qubole.com/en/latest/rest-api/command_api/view-command-results.html

NOTE: The parameters described below will work only with PRESTO queries. There are different parameters to be used depending upon the Presto Version the cluster is using. These parameters are to be used at query level on Analyze UI while composing a Presto query.

How To:

Presto Version - 0.142

set session cli.headers=true;
<presto_query>;

Presto Version - 0.157

set session cli_headers=true;
<presto_query>;

Have more questions? Submit a request

Comments

Powered by Zendesk