Book Image

Learning Heroku Postgres

By : Patrick Rafael de Oliveira Espake
Book Image

Learning Heroku Postgres

By: Patrick Rafael de Oliveira Espake

Overview of this book

Table of Contents (17 chapters)
Learning Heroku Postgres
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Keyword List
Index

Creating dataclips


In order to create a dataclip, it is necessary to access https://dataclips.heroku.com; this provides a web tool that allows you to create and manage your dataclips.

The Heroku dataclips web tool

To create a new dataclip, you should follow these steps:

  1. First, click on the Create Dataclip button.

  2. Then, on the next screen, enter the name of your dataclip, choose the database, and type the SQL query that returns the desired results.

  3. Finally, click on the Create Dataclip button.

    Tip

    You can use the SELECT * FROM pg_catalog.pg_tables ORDER BY tablename ASC LIMIT 5 query if you don't have data in your database. This query returns the name of the first five tables of your database in an ascending order.

The following screenshot shows the first five tables of pg_tables:

The first five tables in pg_tables

You can change your SQL query at any time. To do this, just change your query and click on the Update Query button.

Every time you change the query, a new version is automatically created...