diff --git a/docs/en/sql/index.asciidoc b/docs/en/sql/index.asciidoc index 8949a438391..b223492b487 100644 --- a/docs/en/sql/index.asciidoc +++ b/docs/en/sql/index.asciidoc @@ -2,6 +2,8 @@ [[xpack-sql]] = SQL Access +:jdbc-tests: {docdir}/../../sql/jdbc/src/test/resources + [partintro] -- Overview @@ -11,4 +13,6 @@ Overview include::sql-query-dsl.asciidoc[] include::sql-rest.asciidoc[] include::sql-jdbc.asciidoc[] -include::sql-cli.asciidoc[] \ No newline at end of file +include::sql-cli.asciidoc[] + +:jdbc-tests!: diff --git a/docs/en/sql/sql-query-dsl.asciidoc b/docs/en/sql/sql-query-dsl.asciidoc index 0b6a35e5a54..27982fd8f72 100644 --- a/docs/en/sql/sql-query-dsl.asciidoc +++ b/docs/en/sql/sql-query-dsl.asciidoc @@ -2,4 +2,12 @@ [[sql-query-dsl]] == SQL Query DSL -Content \ No newline at end of file +Content + +Example! + + +["source","sql",subs="attributes,callouts,macros"] +-------------------------------------------------- +include-tagged::{jdbc-tests}/select.sql-spec[wildcardWithOrder] +-------------------------------------------------- diff --git a/sql/jdbc/src/test/resources/select.sql-spec b/sql/jdbc/src/test/resources/select.sql-spec index c5d14422dbe..76562a07c86 100644 --- a/sql/jdbc/src/test/resources/select.sql-spec +++ b/sql/jdbc/src/test/resources/select.sql-spec @@ -3,7 +3,9 @@ // wildcardWithOrder -SELECT * FROM "test_emp" ORDER BY emp_no; +// tag::wildcardWithOrder +SELECT * FROM test_emp ORDER BY emp_no; +// end::wildcardWithOrder column SELECT last_name FROM "test_emp" ORDER BY emp_no; columnWithAlias