Search and Replace


#1

In Looker, you can bulk search and replace across a project or a single file.

To Search and Replace Across a Project

  1. Navigate to the project where you would like to search and replace, in the LookML section of Looker.
  2. In the upper right corner, there is a Search bar. Enter your search term.
  3. You will be brought to a Search Results page. In the middle of the page is a Search bar and a Replace bar. In the Replace bar, type your replace term. Hit Replace.
  4. Every occurance of the search term will now be crossed out and replaced with the replace term. To the left of each occurance is a checkbox. Uncheck any occurances of the search term you would not like replaced. You can uncheck entire files to prevent replacement in those files. Press Select All to select all ocurrances of the string, or press Select None to select no occurances of the string.



  5. Hit Replace
  6. All selected occurances of the search term will now be replaced with the replace term.

To Search and Replace Across a Single File

1. Navigate to a LookML file in your model. Click somewhere in the LookML code and press **⌘F** (for Macs) or **Ctrl+F** (for Windows) to open the **Search** bar for that file. 1. Enter your search term. All occurances of the search term will be highlighted in the file. Press Enter to move from one occurance to the next. 1. Press **⌘F** or **Ctrl+F** a second time to open the **Replace** bar. Enter your replace term. 1. Press **Replace** to replace each occurance of the search term separately. Press **All** to replace all occurances at once.

DATEDIFF in PostgreSQL