Commit graph

222 commits

Author SHA1 Message Date
James Rodewig
39ae8d07ae
[DOCS] Update Kibana dev console screenshots for new EUI theme (#75626)
Changes:

* Updates the Kibana dev console screenshots to use the new EUI theme
* Corrects an example SQL query in one screenshot. The previous screenshot used `_/sql`, which is not a valid URI.
2021-07-22 09:40:03 -04:00
James Rodewig
6b102733b4 [DOCS] Retitle 'SQL access' page to 'SQL' 2021-07-21 09:57:22 -04:00
James Rodewig
ea635d67a6
[DOCS] SQL: Add formal API docs (#75506)
Adds formal API docs for the following APIs:

* Clear SQL cursor
* SQL search
* SQL translate

Other changes:

* Removes and redirects the "Supported REST parameters section." This is now covered in the SQL search API docs.
* Updates a few related xrefs.

Closes #75085
2021-07-21 08:04:21 -04:00
James Rodewig
77c0302ea9 Fix TOC order 2021-07-19 13:48:57 -04:00
James Rodewig
83be31b1f6 [DOCS] Remove leading slashes 2021-07-19 13:42:41 -04:00
James Rodewig
a9ed7dc1eb
[DOCS] Document async SQL APIs (#75078)
Adds formal API docs and JSON specs for the following APIs:

* Get async SQL search
* Get async SQL search status
* Delete async SQL search

Closes #74845
2021-07-12 10:12:02 -04:00
James Rodewig
75c585c0f1
[DOCS] Mute snippet tests for #75069 (#75237) 2021-07-12 09:50:18 -04:00
James Rodewig
0f5a0e711e
[DOCS] SQL: Document async SQL search (#74975) (#75037)
Documents async SQL search functionality.

I plan to add formal API documentation for the async APIs with a later PR.

Relates to #73991 and #74845.
# Conflicts:
#	docs/reference/release-notes/highlights.asciidoc
2021-07-07 09:07:03 -04:00
debadair
29bb8fd67e
[DOCS] Add info about GET/POST to the API conventions. (#74529)
* [DOCS] Add info about GET/POST to the API conventions.

* Fixed anchor

* Added redirect

* Incorporated review suggestions
2021-06-30 09:24:42 -07:00
James Rodewig
47adf545c4
[DOCS] SQL: Document null handling for functions (#74444)
Closes #74193.
2021-06-23 11:11:26 -04:00
James Rodewig
853f2436ee
[DOCS] SQL: Move null handling to arg descriptions (#74255)
https://github.com/elastic/elasticsearch/pull/74201 documents `null` handling  to the arg descriptions of several string functions.

This PR moves pre-existing docs for `null` handling and similar edge case handling for string functions to arg descriptions for consistency.

Relates to #74193
2021-06-17 15:50:02 -04:00
James Rodewig
5fc6d73aa5
[DOCS] SQL: Document null handing for string functions (#74201) 2021-06-16 14:21:08 -04:00
James Rodewig
8a899419bc [DOCS] Change multi field to multi-field 2021-06-15 11:40:03 -04:00
Bogdan Pintea
522283c90e
SQL: Add ODBC proxy support documentation (#73263)
This documents how to configure the proxy support for ODBC.
It also removes the documentation of the connection string values, these
are now all covered by the GUI settings.

Co-authored-by: Andrei Stefan <astefan@users.noreply.github.com>
2021-05-20 16:56:02 +02:00
James Rodewig
8dddca77aa
[DOCS] Remove and redirect frozen index overview content (#72990)
Changes:

* Removes and adds redirects for the frozen indices [overview][0], [best
  practices][1], [search][2], and [monitoring][3] pages.
* Removes glossary terms related to frozen indices.
* Updates several xrefs to point to the freeze index API docs.

Relates to elastic/elasticsearch#72946 and elastic/elasticsearch#70192.

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/7.12/frozen-indices.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/best_practices.html
[2]: https://www.elastic.co/guide/en/elasticsearch/reference/master/searching_a_frozen_index.html
[3]: https://www.elastic.co/guide/en/elasticsearch/reference/master/monitoring_frozen_indices.html
2021-05-12 12:54:20 -04:00
James Rodewig
07fade1d27
[DOCS] EQL/SQL: Document runtime_fields parameter (#71487) 2021-04-19 09:15:12 -04:00
James Rodewig
693807a6d3
[DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
Adam Locke
8dd563134c
[DOCS] Overhaul TLS security docs (#68946)
* Removing security overview and condensing.

* Adding new security file.

* Minor changes.

* Removing link to pass build.

* Adding minimal security page.

* Adding minimal security page.

* Changes to intro.

* Add basic and basic + http configurations.

* Lots of changes, removed files, and redirects.

* Moving some AD and LDAP sections, plus more redirects.

* Redirects for SAML.

* Updating snippet languages and redirects.

* Adding another SAML redirect.

* Hopefully fixing the ci/2 error.

* Fixing another broken link for SAML.

* Adding what's next sections and some cleanup.

* Removes both security tutorials from the TOC.

* Adding redirect for removed tutorial.

* Add graphic for Elastic Security layers.

* Incorporating reviewer feedback.

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-minimal-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/index.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup-https.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Apply suggestions from code review

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>

* Additional changes from review feedback.

* Incorporating reviewer feedback.

* Incorporating more reviewer feedback.

* Clarify that TLS is for authenticating nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify security between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify that TLS is between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Update title for configuring Kibana with a password

Co-authored-by: Tim Vernum <tim@adjective.org>

* Move section for enabling passwords between Kibana and ES to minimal security.

* Add section for transport description, plus incorporate more reviewer feedback.

* Moving operator privileges lower in the navigation.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
Co-authored-by: Tim Vernum <tim@adjective.org>
2021-03-25 11:54:39 -04:00
Bogdan Pintea
925f1645cf
SQL: Enforce and document dedicated client version compatibility (#70451)
* Implement dedicated client version compatibility

Add further dedicated client (xDBC, CLI) compatibility rules and
document these. A client is version-compatible with the server if:
- it supports version compatibility (past or on 7.7.0); and
- it's not on a version newer than server's; and
- it's major version is at most one unit behind server's.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-22 11:17:51 +01:00
Andrei Stefan
bf1b7a36b5
SQL: Adapt the limitations page to the new "fields" API usage (#69616)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-02 17:19:32 +02:00
Marios Trivyzas
c5cd7e51ef
SQL: [Docs] Use the most common yyyy year pattern in examples (#69407)
To avoid confusion for the users replace the `YYYY` and `uuuu` year
patterns in the examples of `DATETIME_FORMAT/PARSE` with the most common
`yyyy` to avoid any confusion for users that might just copy paste those
queries for their own use case.

Relates to #68030
2021-02-23 13:48:03 +01:00
James Rodewig
31fc59efdf
[DOCS] Fix capitalization for Query DSL (#69236) 2021-02-18 18:57:19 -05:00
James Rodewig
9b88ae92e6
[DOCS] Fix typos for duplicate words (#69125) 2021-02-17 10:34:20 -05:00
Marios Trivyzas
45677a385b
QL: Eliminate internal type DATETIME_NANOS (#68220)
Moving towards grouping of data types in the field caps API
the internal data type `DATETIME_NANOS` introduced for `date_nanos`
support is eliminated.

Relates: #67722
Follows: #67666
2021-02-10 18:15:54 +01:00
Andrei Stefan
ee5cc5442a
QL: "fields" api implementation in QL (#68802)
* Integrate "fields" API into QL (#68467)
* QL: retry SQL and EQL requests in a mixed-node (rolling upgrade) cluster (#68602)
* Adapt nested fields extraction from "fields" API output to the new un-flattened structure (#68745)
2021-02-10 11:17:10 +02:00
Andras Palinkas
a3dbdae2ef
SQL: Test and fix the NULL handling of the String functions (#68379)
Fixed the inconsistencies regarding NULL argument handling.
NULL literal vs NULL field value as function arguments in some case
resulted in different function return values.

Functions should return with the same value no matter if the argument(s)
came from a field or from a literal.

The introduced integration test tests if function calls with same
argument values (regardless of literal/field) will return with the
same output (also checks if newly added functions are added to the
testcases).

Fixed the following functions:
* Insert: NULL start, length and replacement arguments (as fields) also
result in NULL return value instead of returning the input.
* Locate: NULL pattern results in NULL return value, NULL optional start
argument handled the same as missing start argument
* Replace: NULL pattern and replacement results in NULL instead of
returning the input
* Substring: NULL start or length results in NULL instead of returning
the input

Fixes #58907
2021-02-05 12:30:37 -05:00
James Rodewig
0b4b59c784
[DOCS] Fix typo (#68362) (#68380)
Co-authored-by: Jaskaran Bindra <jskrnbindra@gmail.com>
2021-02-02 09:45:30 -05:00
Marios Trivyzas
bbf3cbfcfa
QL: Implement support for date_nanos ES type. (#67666)
Use an internal new DataType DATETIME_NANOS which is not exposed
and therefore cannot be used for CASTing. DATETIME is used instead
and the precision of both DATETIME and TIME has been promoted from
3 to 9, providing transparency to all datetime functionality regardless
of millis or nanos precision.

Moreover, CURRENT_TIMESTAMP/CURRENT_TIME can now return precision up
to 6 fractional digits of a second with the use of Clock.

Closes: #38562

Co-authored-by: Bogdan Pintea <bogdan.pintea@elastic.co>
2021-01-29 11:07:29 +01:00
Andras Palinkas
f855e5235c
SQL: Implement TO_CHAR() function (#66486)
SQL: Implement the TO_CHAR() function

* The implementation is according to PostgreSQL 13 specs:
https://www.postgresql.org/docs/13/functions-formatting.html
* Tested against actual output from PostgreSQL 13 using randomized inputs
* All the Postgres formats are supported, there is also partial supports
 for the modifiers (`FM` and `TH` are supported)
* Random unit test data generator script in case we need to upgrade the
 formatter in the future
* Documentation
* Integration tests

Co-authored-by: Michał Wąsowicz <mwasowicz7@gmail.com>
Co-authored-by: Andras Palinkas <andras.palinkas@elastic.co>
2021-01-20 18:32:10 -05:00
Bogdan Pintea
638402c387
Abort sorting in case of local agg sort queue overflow (#65687)
In case the local agg sorter queue gets full and no limit has been provided,
the local sorter will now erroneously call the failure callback for every
single row in the original rowset that's left over the local queue limit
(instead for just the first one).  The failure response is dispatched in any
case, so this is relatively harmless.  The sorter continues iterating on the
original response fetching subsequent pages. In case of correct Elasticsearch
behaviour, this is also harmless, it'll just trigger a number of internal
exceptions. However, in case of a pagination defect in Elasticsearch (like
GH#65685, where the same search_after is returned), this will result in an
effective spin loop, potentially rendering eventually the node unresponsive.

This PR simply breaks both the inner loop iterating over the current unsorted
rowset, as well as the outer one, iterating over the left pages.

It also fixes an outdated documentation limitation.
2020-12-03 19:19:15 +01:00
Andras Palinkas
e242eb6a43
SQL: Add method args to PERCENTILE/PERCENTILE_RANK (#65026)
* Adds the capability to have functions with two optional arguments
* Adds two new optional arguments to `PERCENTILE()` and
  `PERCENTILE_RANK()` functions, namely the method and
  method_parameter which can be: 1) `tdigest` and a double `compression`
  parameter or 2) `hdr` and an integer representing the
  `number_of_digits` parameter.
* Integration tests
* Documentation updates

Closes #63567
2020-11-24 14:17:56 -05:00
Bogdan Pintea
6a92b3ec7c
SQL: Remove constant_keyword from SQL docs (#64709)
* Remove constant_keyword from SQL docs

`constant_keyword` removed as distinct type from SQL in #60524.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-11-06 20:07:30 +01:00
Andras Palinkas
190d9fe3de
SQL: Escaped wildcard (*) not accepted in LIKE (#63428)
For a query like `SELECT name FROM test WHERE name LIKE ''%c*'` ES SQL
generates an error. `*` is not a special character in a `LIKE` construct
and it's expected to not needing to be escaped, so the previous query
should work as is.
In the LIKE pattern any `*` character was treated as invalid character
and the usage of `%` or `_` was suggested instead. But `*` is a valid,
acceptable non-wildcard on the right side of the `LIKE` operator.

Fix: #55108
2020-10-13 09:38:35 -04:00
Binu R J
da511f4e03
SQL: Implement FORMAT function (#55454)
Implement FORMAT according to the SQL Server spec: https://docs.microsoft.com/en-us/sql/t-sql/functions/format-transact-sql?view=sql-server-ver15#ExampleD by translating to the java.time patterns used in DATETIME_FORMAT.

Closes: #54965

Co-authored-by: Marios Trivyzas <matriv@users.noreply.github.com>
Co-authored-by: Bogdan Pintea <bogdan.pintea@elastic.co>
Co-authored-by: Andrei Stefan <astefan@users.noreply.github.com>
2020-09-21 15:32:11 +02:00
Bogdan Pintea
2bc4d7eb19
SQL: Document Maven Central as a JDBC repository (#62618)
* Add Maven Central as a JDBC repository

Document Maven Central as a JDBC repository.
2020-09-21 12:55:04 +02:00
James Rodewig
f881a695e1
[DOCS] Add redirects for wildcard and constant keyword (#61815) 2020-09-01 15:32:35 -04:00
James Rodewig
a94e5cb7c4
[DOCS] Replace Wikipedia links with attribute (#61171) 2020-08-17 09:44:24 -04:00
Bogdan Pintea
fb6baa85aa
SQL: Update documentation on Tableau integration (#60890)
* Update docs on Tableau Desktop integration

Update the docs on how to integrate with Tableau Desktop, now using the
dedicated connector in conjunction with the JDBC driver.

* Add docs for connecting with Tableau Server

Add the steps required to connecto to Elasticsearch for Tableau Server.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-08-17 12:10:15 +02:00
Alexander Reelsen
c7ac9e7073
[DOCS] http -> https, remove outdated plugin docs (#60380)
Plugin discovery documentation contained information about installing
Elasticsearch 2.0 and installing an oracle JDK, both of which is no
longer valid.

While noticing that the instructions used cleartext HTTP to install
packages, this commit replaces HTTPs links instead of HTTP where possible.

In addition a few community links have been removed, as they do not seem
to exist anymore.
2020-07-31 15:58:38 -04:00
James Rodewig
aec26b1a23
[DOCS] Move search pagination content to one page (#60515) 2020-07-31 11:43:06 -04:00
Bogdan Pintea
3a8b00cc74
SQL: Add option to provide the delimiter for the CSV format (#59907)
* Add option to provide the delimiter to the CSV fmt

This adds the option to provide the desired character as the separator
for the CSV format (the default remains comma).
A set of characters are excluded though - like CR, LF, `"` - to avoid
slipping onto the CSV-dialects slope. The tab is also forbidden, the
user needs to choose the "tsv" format explicitely.

Update the doc to make it clear that the textual CSV, TSV and TXT
formats pass the cursor back to the user through the Cursor HTTP header.
2020-07-29 16:08:39 +02:00
James Rodewig
2774cd6938
[DOCS] Swap [float] for [discrete] (#60124)
Changes instances of `[float]` in our docs for `[discrete]`.

Asciidoctor prefers the `[discrete]` tag for floating headings:
https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/#blocks
2020-07-23 11:48:22 -04:00
Emily Li
8d0cb3b893 Fix grammar mistake in SQL data type docs. (#60028)
Remove an extra 'when'.
2020-07-21 16:15:43 -07:00
James Rodewig
80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
Patrick Jiang(白泽)
647a413d9b
SQL: Implement DATE_PARSE function for parsing strings into DATE values (#57391)
Implement DATE_PARSE(<date_str>, <pattern_str>) function
which allows to parse a date string according to the specified
pattern into a date object. The patterns allowed are those of
java.time.format.DateTimeFormatter.

Closes #54962

Co-authored-by: Marios Trivyzas <matriv@users.noreply.github.com>
2020-07-16 15:33:46 +02:00
Bogdan Pintea
8b29817b49
Add sample versions of standard deviation and variance functions (#59093)
* Add STDDEV_SAMP, VAR_SAMP

This commit adds the sampling variations of the standard deviation and
variance agg functions.
2020-07-09 08:22:01 +02:00
James Rodewig
483bab2281
[DOCS] Add data streams to API conventions (#58695)
Updates the existing API conventions docs to make them aware of data
streams.

Co-authored-by: debadair <debadair@elastic.co>
2020-06-30 17:06:17 -04:00
Bogdan Pintea
94eb5a05e7
SQL: fix handling of escaped chars in JDBC connection string (#58429)
* Fix: preserve URI query and fragment char escaping

This commit fixes an issue emerging when the connection string URI
contains escaped characters.

The original URI is pre-parsed in order to re-assemble a new URI having
the optional elements filled in with defaults. The new URI has been
using however the unescaped query and fragment parts. So if these
contained any escaped `&` or `=` (such as in the password option value),
the unescaping would reveal them and make them later interfere with the
options parsing.

The commit changes that, so that the new URI be built from the unescaped
"raw" parts of the original URI.
2020-06-26 10:19:44 +02:00
Marios Trivyzas
9d6b679a5d
SQL: [Docs] Fix TIME_PARSE documentation (#58182)
TIME_PARSE works correctly if both date and time parts are specified,
and a TIME object (that contains only time is returned).

Adjust docs and add a unit test that validates the behavior.

Follows: #55223
2020-06-18 12:35:58 +02:00
Marios Trivyzas
6c86c919e1
SQL: Implement TRIM function (#57518)
Add `TRIM` function which combines the functionality of both
`LTRIM` and `RTRIM` by stripping both leading and trailing
whitespaces.

Refers to #41195
2020-06-03 14:24:30 +02:00