| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 | [discrete][[esql-from]]=== `FROM`The `FROM` source command returns a table with data from a data stream, index,or alias.**Syntax**[source,esql]----FROM index_pattern [METADATA fields]----*Parameters*`index_pattern`::A list of indices, data streams or aliases. Supports wildcards and date math.`fields`::A comma-separated list of <<esql-metadata-fields,metadata fields>> to retrieve.*Description*The `FROM` source command returns a table with data from a data stream, index,or alias. Each row in the resulting table represents a document. Each columncorresponds to a field, and can be accessed by the name of that field.[NOTE]====By default, an {esql} query without an explicit <<esql-limit>> uses an implicitlimit of 1000. This applies to `FROM` too. A `FROM` command without `LIMIT`:[source,esql]----FROM employees----is executed as:[source,esql]----FROM employees| LIMIT 1000----====*Examples*[source,esql]----FROM employees----You can use <<api-date-math-index-names,date math>> to refer to indices, aliasesand data streams. This can be useful for time series data, for example to accesstoday's index:[source,esql]----FROM <logs-{now/d}>----Use comma-separated lists or wildcards to <<esql-multi-index, query multiple data streams, indices,or aliases>>:[source,esql]----FROM employees-00001,other-employees-*----Use the format `<remote_cluster_name>:<target>` to <<esql-cross-clusters, query data streams and indiceson remote clusters>>:[source,esql]----FROM cluster_one:employees-00001,cluster_two:other-employees-*----Use the optional `METADATA` directive to enable <<esql-metadata-fields,metadata fields>>:[source,esql]----FROM employees METADATA _id----Use enclosing double quotes (`"`) or three enclosing double quotes (`"""`) to escape index namesthat contain special characters:[source,esql]----FROM "this=that", """this[that"""----
 |