-
Notifications
You must be signed in to change notification settings - Fork 19
Setting up Google Spreadsheets
###Setting up Google Spreadsheets Dataset
Create a config-local.properties file and place it in a /tmp dir, all properties discussed below need to be added to your config-local.properties file. The default values file is a good starting point:
https://github.com/Netflix/q/blob/master/src/main/resources/config.properties
Create a new google project
https://console.developers.google.com
If the previous step doesn’t take you to “IAM & Admin” tab, go to this URL:
https://console.developers.google.com/iam-admin/iam/iam-zero
Service Accounts -> Create key (this is the service account email you will use to access the Google spreadsheets):
Generate P12 key and Save to your computer. Note that after pushing the Create button the key is downloaded to your computer.
The Google app name goes into this property in your config-local.properties file:
search.query.testing.googleAppName=query-testing
Use the google email service account for which you created the key in the previous step. The email address goes into this property in your config-local.properties file:
search.query.testing.serviceAccountEmail=query-testing@appspot.gserviceaccount.com
Specify the name and location of the downloaded p12 key in your config-local.properties file:
search.query.testing.p12KeyFileName=CHANGE-ME.p12
search.query.testing.googleSheetsKeyDir=data/g_sheets/
Create a new google spreadsheet for the data input. Add the created above account to it with VIEW access. Specify the name of your new spreadsheet in this property:
search.query.testing.inputQueriesSheet=query-testing-framework-input
Copy this table as an example of the data input into your new spreadsheet:
id | title_en | title_localized | q_regular | q_regular | q_misspelled |
---|---|---|---|---|---|
1 | Fuller House | Huset fullt – igen | Huset fullt | huset | |
2 | Friends | Vänner | Vänne | Vanner | |
3 | VANish | VANish | van |
Note, that the name of the tab in the input spreadsheet (defaults to ‘Sheet1’) must match one of the valid dataset ids specified in the properties, for our example, it’s ‘swedish-video’:
search.query.testing.validDataSetsId=swedish-video
Create two more spreadsheets for the results summary and details (do not rename the tab names for these). Assign your created email to these spreadsheets with EDIT access. Specify the names in these properties:
search.query.testing.sumReportSheet=query-testing-framework-results-sum
search.query.testing.detailReportSheet=query-testing-framework-results-details
The document type explicit field has to be maintained for search filtering. The field name can be set by this property, it needs to exist in the configuration of the search engine:
search.query.testing.docTypeFieldName=query-testing-type