> For the complete documentation index, see [llms.txt](https://digitalgarden.batamladen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://digitalgarden.batamladen.com/notes/query-languages/kql/search-or-extend-or-getschema.md).

# search | extend | getschema

### search

the search command searches the whole table, not specific fields.

It can also search whole databases.

It takes a lot of resources. Thats why search is best used with a specific timeframe defined using\
`| where TimeGenerated ...`

#### syntax&#x20;

```
search "String_of_interes"
```

### examples

```
search "Google"
```

#### search in specific table

```
VMConnections
| search "Google"
```

The query above is the same as using has

```
VMConnections
| where * has "Google"
```

#### search in a specific table and field

```
VMConnections
| search Website: "Google"
```

```
VMConnections
| search Website: "Google" or IP: "192.168.15.*"
```

#### other example

```
VMConnections
| search "*Google"
```

```
VMConnections
| search "Google*"
```

```
VMConnections
| search "*Google*"
```

#### search for word and display all table names where its found

<pre><code>search "Google"
<strong>| distinct $table    //shows unique tables where google is found
</strong></code></pre>

#### search for word in specific tables

```
search in (table1, table2) "Google"
```

***

### extend

extend command is used to create a new field that does not exist.\
We learned before how to rename a field, this includes the smilar process.

In the example below we see fields "Quantity" and "QuantityUnit"

<figure><img src="/files/U0wVBvxlmBQPGqWbTDwA" alt=""><figcaption></figcaption></figure>

Lets create a ne field called "GB", where we will use the Quantity field and divide it with 1000, and put the new values in our new field GB.

```
Usage
| extend GB=Quantity/1000
```

***

### getschema

getschema command is used to get the datatypes from the fields, and more info about a specific table in general.

Its good for troubleshooting.

<figure><img src="/files/zhAwhYEh95Xdkpf9Gebm" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://digitalgarden.batamladen.com/notes/query-languages/kql/search-or-extend-or-getschema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
