...
- Click Add New Query to open the Add New Query screen.
- Enter Q1 as the query id in the Query ID field.
In the Datasource field, select the datasource for which you are going to write a query. Select the datasource for the Google spreadsheet that you created previously.
You can directly specify the details of the spreadsheet as shown below.
Worksheet Number 1
You want the query to get the data from Sheet1 in the Google spreadsheet.Start reading from 2
You enter 2 because the 1st row of the spreadsheet is the header. The data is available from row 2 onwards.Rows to read 5
The data in this row will be fetched by the query.Headers available true Header row 1
You enter 1 because the 1st row of the spreadsheet includes the header.Define Output Mapping:
Now, let's specify how the data fetched from the datasource should be displayed in the output. The Google spreadsheet we are using contains several columns with customer data. We will create output mappings for the following columns: ID, CustomerNumber, CustomerName, and City.Output type Select XML.
You can select XML, JSON, or RDF. We will use XML for this tutorial.Grouped by element Enter Customers.
This is the XML element that groups the query result.Row Name Enter Customer.
This is the XML element that groups each individual result.Add New Output Mapping Follow the steps given below to add a new output mapping:
Click Add New Output Mapping to start creating the output mapping for the customerNumber column. Enter values as shown below:
Mapping Type Element Name Datasource Type Datasource Column Name Parameter Type Schema Type elementcustomerNumbercolumncustomerNumberSCALARstring- Click Add to save the output mapping. You will now have one output mapping listed for the query.
Now, add output mappings for the following:
Mapping Type Output Filed Name Datasource Type Datasource Column Name Parameter Type Schema Type attributecustomerNamecolumncustomerNameSCALARstringattributecitycolumncitySCALARstringYou will now have the following output mappings listed for the query:
- Click Main Configuration to return to the Query screen.
- Click Save.
- Click Next to go to the Operations screen.
...

