Civis allows you to export the result set of a SQL query as a CSV file that you can download locally to your computer. It is recommended to use Google Chrome as your browser to achieve the best functionality.
Getting Started
- Go to Data.
- Under the Exports section, click on File - 'Export to a local CSV using a SQL Script'. That will open a new job where you can export to a local CSV using SQL.
Setting Up the Export Using a Script
- Put the SQL code whose result set you would like to export into the code box in the center of the page.
- Once your SQL is ready, click Run in the top-right corner of the page.
- When the SQL successfully completes, click History to open up the run history pane, click on the ID of the run, and click on Outputs to reveal the CSV. Click on the CSV file name to download it locally.
Note that all SQL Scripts will appear on the Scripts index, regardless of whether they were created through Scripts or Exports.
Scheduling Your Export
If you'd like to set your export to run on a schedule, click on the three dots in the top-right corner of the page. From there you can click on Automate to have the export run on a schedule of your choosing, or choose Add to Workflow to incorporate it into a workflow. For more information about job automation, see the Script Automation help documentation.
Other Options
Query Pane
CSVs can be exported directly from the Query Pane. After clicking Run for your query, you can choose Export Full Results at the top of the Preview pane.
Programmatic
CSVs can also be created programmatically via the Civis API. See this help article for more information.
Comments
0 comments
Please sign in to leave a comment.