Using Yandex Query Language syntax in Yandex Query
In this tutorial, you will learn how to use Yandex Query Language syntax and perform operations with data in Yandex Query using an example of analytical and streaming queries.
All sample queries are run based on a ready-made dataset with New York City taxi trips for 2019-2021.
Note
Yandex Cloud provides the New York City taxi trips dataset as is. Yandex Cloud makes no representations, express or implied, warranties, or conditions pertaining to your use of the specified dataset. To the extent allowed by your local laws, Yandex Cloud shall not be liable for any loss or damage, including direct, consequential, special, indirect, incidental, or exemplary, resulting from your use of the dataset.
NYC Taxi and Limousine Commission (TLC):
The data was collected and provided to the NYC Taxi and Limousine Commission (TLC) by technology providers authorized under the Taxicab & Livery Passenger Enhancement Programs (TPEP/LPEP). The taxi trip data is not generated by the TLC, and the TLC makes no representations whatsoever about the accuracy of this data.
Take a look at the dataset source
Example of analytical queries
To create an analytical query and start the training:
- In the management console
, select the folder where you want to create a connection. - In the list of services, select Yandex Query.
- In the left-hand panel, select
Tutorial. - Click Create connection. In the Create connection section, all parameter fields are pre-filled. Enter a description (optional) and click Create. This will take you to the data binding creation screen.
- Enter the data binding description (optional) and click Create. Appropriate training resources will be created.
In the list on the left panel, choose a training section:
- Select all columns.
- Select certain fields.
- Sorting and filtering.
- Data aggregation.
- Aggregation additional conditions.
- JSON.
Example of streaming queries
To create a streaming query and start the training:
- In the management console
, select the folder where you want to create a connection. - In the list of services, select Yandex Query.
- In the left-hand panel, select
Tutorial. - Select
Streaming
. - Click Create connection. In the Create connection section, some parameter fields are pre-filled.
- Select or create a database.
- Select or create a service account.
- Click Create. This will take you to the data binding creation screen.
- Select or create a stream.
- Enter the data binding description (optional) and click Create. Appropriate training resources will be created.
In the list on the left panel, choose a training section: