Using the Query Builder

In this Chapter

YQL Query Builder Overview

To aid in building YQL statements (queries), the YQL console includes a simple query builder tool. This tool allows you to customize and explore YQL statements.

Note

This simple query builder is intended to explore and test simple statements. It does not currently support more advanced statements that include sub-queries, multiple Open Data Tables, or projection.

Features of YQL query builder include:

  • Tabs for each table within a statement: Each Open Data Table used within a given statement is shown as as a separate tab.
  • Limit and tail functions: Easily add functions to get the first or last number of results.
  • Table metadata: Click “show table info” to see metadata within each Open Data Table.

Query Builder Usage

This section describes how to use the various aspects of the query builder.

Loading a Query

  1. To run the query builder, first test a YQL statement in the console.

    Below the statement box and above the results, a tab appears for each Open Data Table that is required to complete the statement.

    YQL Query Builder image0

  2. Click on a tab associated with an Open Data Table to load the query builder for that table.

    YQL Query Builder image1

Entering Values

After you load a query, you are presented with a form that contains fields for each required binding.

  1. Type values for each required field.

  2. Below the required bindings, you can also click AddKey to add optional bindings to the statement. Click on the X icon next to a binding to remove it.

    YQL Query Builder Delete Key image2

  3. Click TEST within the query builder to run the updated YQL statement.

Using the Query Builder

In this Chapter

YQL Query Builder Overview

To aid in building YQL statements (queries), the YQL console includes a simple query builder tool. This tool allows you to customize and explore YQL statements.

YQL Query Builder

Note

This simple query builder is intended to explore and test simple statements. It does not currently support more advanced statements that include sub-queries, multiple Open Data Tables, or projection.

Features of YQL query builder include:

  • Tabs for each table within a statement: Each Open Data Table used within a given statement is shown as as a separate tab.
  • Limit and tail functions: Easily add functions to get the first or last number of results.
  • Table metadata: Click “show table info” to see metadata within each Open Data Table.

Query Builder Usage

This section describes how to use the various aspects of the query builder.

Loading a Query

  1. To run the query builder, first test a YQL statement in the console.

    Below the statement box and above the results, a tab appears for each Open Data Table that is required to complete the statement.

    YQL Query Builder image3

  2. Click on a tab associated with an Open Data Table to load the query builder for that table.

    YQL Query Builder image4

Entering Values

After you load a query, you are presented with a form that contains fields for each required binding.

  1. Type values for each required field.

  2. Below the required bindings, you can also click AddKey to add optional bindings to the statement. Click on the X icon next to a binding to remove it.

    YQL Query Builder Delete Key image5

  3. Click TEST within the query builder to run the updated YQL statement.