diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 00000000..7f6b4734 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,75 @@ +name: Check PR before merge +on: + pull_request: + branches: + - gh-pages + +jobs: + check-links: + # The check is advisory. It won't prevent merge even if it's broken + continue-on-error: true + # These permissions are needed to interact with GitHub's OIDC Token endpoint. + permissions: + id-token: write + contents: read + issues: read + # permission needed to post a comment on the PR + pull-requests: write + + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Check there are no 404 links + id: check404 + run: | + set -xeuo pipefail + result_file=$(mktemp) + set +e + scripts/check-links.sh > "$result_file" + rv=$? + set -e + if [[ "$rv" != 0 ]]; then + cat "$result_file" + { + # Abusing the unique name of the file as an EOF marker + echo "output<<$result_file" + cat "$result_file" + echo "$result_file" + } >> $GITHUB_OUTPUT + fi + exit "$rv" + + - name: Find Comment + id: fc + uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0 + if: always() + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: "github-actions[bot]" + body-includes: "Link Check Status:" + + - name: Post a comment on failure + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + if: failure() + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + # $\color{red}{\text{🧨 Link Check Status: FAILURE}}$ + ``` + ${{ steps.check404.outputs.output }} + ``` + edit-mode: replace + + - name: Post a comment on success + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + if: success() + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + # $\color{green}{\text{πŸ‘ Link Check Status: SUCCESS}}$ + thumbs up guy meme + edit-mode: replace diff --git a/.gitignore b/.gitignore index 3872b408..62c89355 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -.github/workflows/ .idea/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..8a97a241 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +start-local: + scripts/start-local.sh + +check-links: + scripts/check-links.sh diff --git a/docs/Gemfile b/docs/Gemfile index 8a8d4323..9d78cd9f 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -32,3 +32,7 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] # Site quality checker gem "html-proofer" +gem 'rake' +gem "webrick", "~> 1.8" + +gem "activesupport", ">= 6.1.7.5" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 1f219b79..9f3fa0a4 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.6.1) + activesupport (6.1.7.5) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) base64 (0.1.1) @@ -16,7 +16,7 @@ GEM coffee-script-source (1.11.1) colorator (1.1.0) commonmarker (0.23.10) - concurrent-ruby (1.2.0) + concurrent-ruby (1.2.2) dnsruby (1.61.9) simpleidn (~> 0.1) em-websocket (0.5.3) @@ -34,12 +34,12 @@ GEM ffi (1.15.5) forwardable-extended (2.6.0) gemoji (3.0.1) - github-pages (226) + github-pages (228) github-pages-health-check (= 1.17.9) - jekyll (= 3.9.2) + jekyll (= 3.9.3) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.2.0) + jekyll-commonmark-ghpages (= 0.4.0) jekyll-default-layout (= 0.1.4) jekyll-feed (= 0.15.1) jekyll-gist (= 1.5.0) @@ -73,10 +73,10 @@ GEM jemoji (= 0.12.0) kramdown (= 2.3.2) kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.3) + liquid (= 4.0.4) mercenary (~> 0.3) minima (= 2.5.1) - nokogiri (>= 1.13.4, < 2.0) + nokogiri (>= 1.13.6, < 2.0) rouge (= 3.26.0) terminal-table (~> 1.4) github-pages-health-check (1.17.9) @@ -97,13 +97,13 @@ GEM typhoeus (~> 1.3) yell (~> 2.0) http_parser.rb (0.8.0) - i18n (0.9.5) + i18n (1.14.1) concurrent-ruby (~> 1.0) - jekyll (3.9.2) + jekyll (3.9.3) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) - i18n (~> 0.7) + i18n (>= 0.7, < 2) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 2.0) kramdown (>= 1.17, < 3) @@ -119,11 +119,11 @@ GEM coffee-script-source (~> 1.11.1) jekyll-commonmark (1.4.0) commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.2.0) - commonmarker (~> 0.23.4) + jekyll-commonmark-ghpages (0.4.0) + commonmarker (~> 0.23.7) jekyll (~> 3.9.0) jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 4.0) + rouge (>= 2.0, < 5.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) jekyll-feed (0.15.1) @@ -211,7 +211,7 @@ GEM rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - liquid (4.0.3) + liquid (4.0.4) listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) @@ -220,10 +220,12 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.17.0) + minitest (5.19.0) + nokogiri (1.16.5-arm64-darwin) + racc (~> 1.4) nokogiri (1.16.5-x86_64-linux) racc (~> 1.4) - octokit (4.25.1) + octokit (4.23.0) faraday (>= 1, < 3) sawyer (~> 0.9) parallel (1.22.1) @@ -232,6 +234,7 @@ GEM public_suffix (4.0.7) racc (1.7.3) rainbow (3.1.1) + rake (13.0.6) rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) @@ -254,29 +257,33 @@ GEM strscan (3.1.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - thread_safe (0.3.6) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.10) - thread_safe (~> 0.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) unf (0.1.4) unf_ext unf_ext (0.0.8.2) unicode-display_width (1.8.0) + webrick (1.8.1) yell (2.2.2) - zeitwerk (2.6.6) + zeitwerk (2.6.11) PLATFORMS + arm64-darwin-21 x86_64-linux DEPENDENCIES + activesupport (>= 6.1.7.5) github-pages html-proofer jekyll-feed (~> 0.12) jekyll-seo-tag + rake tzinfo (~> 1.2) tzinfo-data wdm (~> 0.1.1) + webrick (~> 1.8) BUNDLED WITH - 2.2.31 + 2.4.13 diff --git a/docs/developing-with-firebolt/firebolt-rest-api.md b/docs/developing-with-firebolt/firebolt-rest-api.md index 5cf8db01..01244c61 100644 --- a/docs/developing-with-firebolt/firebolt-rest-api.md +++ b/docs/developing-with-firebolt/firebolt-rest-api.md @@ -313,8 +313,8 @@ This returns (`...` indicates areas of JSON omitted from this example): Ingesting data using the Firebolt REST API requires the following steps: -1. [Create an external table](./firebolt-rest-api.html/#create-an-external-table) -2. [Create a fact table and import data](./firebolt-rest-api.html/#create-a-fact-table-and-import-data) +1. [Create an external table](#create-an-external-table) +2. [Create a fact table and import data](#create-a-fact-table-and-import-data) ### Create an external table diff --git a/docs/general-reference/data-types.md b/docs/general-reference/data-types.md index ad7a23e8..5e2a9b9d 100644 --- a/docs/general-reference/data-types.md +++ b/docs/general-reference/data-types.md @@ -76,7 +76,7 @@ For historic reasons, if you set the setting `standard_conforming_strings` to `f >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](./release-notes/release-notes-archive.md#db-version-322). Firebolt supports three date and timestamp data types: diff --git a/docs/general-reference/date-data-type.md b/docs/general-reference/date-data-type.md index a5ac4062..fe212992 100644 --- a/docs/general-reference/date-data-type.md +++ b/docs/general-reference/date-data-type.md @@ -18,7 +18,7 @@ This topic describes the Firebolt implementation of the `DATE` data type. >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](./release-notes/release-notes-archive.md#db-version-322). * Topic ToC {:toc} diff --git a/docs/general-reference/release-notes/release-notes-archive.md b/docs/general-reference/release-notes/release-notes-archive.md index 52d421c0..e8d95757 100755 --- a/docs/general-reference/release-notes/release-notes-archive.md +++ b/docs/general-reference/release-notes/release-notes-archive.md @@ -60,13 +60,13 @@ Reading of Parquet/ORC integer columns will now not be allowed if the external t **New comparison operators** -[New comparison operators](../general-reference/operators.md#comparison) `IS DISTINCT FROM` and `IS NOT DISTINCT FROM` have been added. +[New comparison operators](../operators.md#comparison) `IS DISTINCT FROM` and `IS NOT DISTINCT FROM` have been added. ### Enhancements, changes and new integrations {: .no_toc} **Support for nullable arrays** -Support has been added to allow the [ANY_MATCH](../sql-reference/functions-reference/any-match.md) lambda function to work with nullable arrays. +Support has been added to allow the [ANY_MATCH](../../sql-reference/functions-reference/any-match.md) lambda function to work with nullable arrays. ### Resolved issues @@ -86,13 +86,13 @@ Support has been added to allow the [ANY_MATCH](../sql-reference/functions-refer **New comparison operators** -[New comparison operators](../general-reference/operators.md#comparison) `IS DISTINCT FROM` and `IS NOT DISTINCT FROM` have been added. +[New comparison operators](../operators.md#comparison) `IS DISTINCT FROM` and `IS NOT DISTINCT FROM` have been added. ### Enhancements, changes and new integrations {: .no_toc} **Support for nullable arrays** -Support has been added to allow the [ANY_MATCH](../sql-reference/functions-reference/any-match.md) lambda function to work with nullable arrays. +Support has been added to allow the [ANY_MATCH](../../sql-reference/functions-reference/any-match.md) lambda function to work with nullable arrays. ### Resolved issues @@ -111,7 +111,7 @@ Support has been added to allow the [ANY_MATCH](../sql-reference/functions-refer **EXPLAIN ANALYZE now available for detailed query metrics** -You can now use the [EXPLAIN command](../sql-reference/commands/explain.md) to execute `EXPLAIN (ANALYZE) ` without executing the query. It shows how query processing is distributed over the nodes of an engine. +You can now use the [EXPLAIN command](../../sql-reference/commands/explain.md) to execute `EXPLAIN (ANALYZE) ` without executing the query. It shows how query processing is distributed over the nodes of an engine. ### Enhancements, changes and new integrations @@ -119,7 +119,7 @@ You can now use the [EXPLAIN command](../sql-reference/commands/explain.md) to e **PERCENTILE_CONT and PERCENTILE_DISC now return Postgres-compliant results** -[PERCENTILE_CONT](../../sql_reference/functions-reference/window/percentile-cont-window.md) for decimal input now returns DOUBLE PRECISION instead of NUMERIC data type. +[PERCENTILE_CONT](../../sql-reference/functions-reference/percentile-cont-window.md) for decimal input now returns DOUBLE PRECISION instead of NUMERIC data type. **Virtual column 'source_file_timestamp' uses new data type** @@ -131,7 +131,7 @@ Use `source_file_timestamp - NOW()` instead of `DATE_DIFF('second', source_file_ **New function added** -A new alias `ARRAY_TO_STRING` has been added to function [ARRAY_JOIN](../sql-reference/functions-reference/array-join.md). +A new alias `ARRAY_TO_STRING` has been added to function [ARRAY_JOIN](../../sql-reference/functions-reference/array-join.md). ## DB version 3.28 **September 2023** @@ -160,13 +160,13 @@ A new alias `ARRAY_TO_STRING` has been added to function [ARRAY_JOIN](../sql-ref {: .no_toc} * **Add `URL_DECODE` and `URL_ENCODE` SQL functions** -- [URL_ENCODE](../sql-reference/functions-reference/url_encode.md) percent-encodes all non _unreserved characters_; for example, ```SELECT CONCAT('https://www.firebolt.io/?', URL_ENCODE('example_id=1&hl=en'));``` returns: `https://www.firebolt.io/?example_id%3D1%26hl%3Den` -- [URL_DECODE](../sql-reference/functions-reference/url_decode.md) decodes percent-encoded characters; for example, ```SELECT URL_DECODE('https://www.firebolt.io/?example_id%3D1%26hl%3Den');``` +- [URL_ENCODE](../../sql-reference/functions-reference/url_encode.md) percent-encodes all non _unreserved characters_; for example, ```SELECT CONCAT('https://www.firebolt.io/?', URL_ENCODE('example_id=1&hl=en'));``` returns: `https://www.firebolt.io/?example_id%3D1%26hl%3Den` +- [URL_DECODE](../../sql-reference/functions-reference/url_decode.md) decodes percent-encoded characters; for example, ```SELECT URL_DECODE('https://www.firebolt.io/?example_id%3D1%26hl%3Den');``` returns: `https://www.firebolt.io/?example_id=1&hl=en` * **New GENERATE_SERIES function** -Support has been added for the [GENERATE_SERIES function](../sql-reference/functions-reference/generate-series.md) to generate a list of values based on the start, stop, and optional configurable increment step. +Support has been added for the [GENERATE_SERIES function](../../sql-reference/functions-reference/generate-series.md) to generate a list of values based on the start, stop, and optional configurable increment step. ### Enhancements, changes, and new integrations {: .no_toc} @@ -187,7 +187,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **New setting to limit rows in result** - [A new setting](../general-reference/system-settings.md#limit-the-number-of-result-rows) `max_result_rows` controls the limit of rows in result sets. The default value of the `max_result_rows` setting is 0. + [A new setting](../system-settings.md#limit-the-number-of-result-rows) `max_result_rows` controls the limit of rows in result sets. The default value of the `max_result_rows` setting is 0. ### Enhancements, changes and new integrations {: .no_toc} @@ -201,7 +201,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Added support for `BYTEA` inputs in the `LENGTH` function** - The [`LENGTH`](../sql-reference/functions-reference/length-string.md) function now accepts an input of `BYTEA` type. The function returns the number of bytes of an input byte array. For behaviors of converting `TEXT` strings to `BYTEA`, please refer to [BYTEA data type](../general-reference/bytea-data-type.md). + The [`LENGTH`](../../sql-reference/functions-reference/length-string.md) function now accepts an input of `BYTEA` type. The function returns the number of bytes of an input byte array. For behaviors of converting `TEXT` strings to `BYTEA`, please refer to [BYTEA data type](../bytea-data-type.md). ### Resolved issues {: .no_toc} @@ -221,16 +221,16 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Deprecation of `catalog` metadata schema** - Support for the `catalog` schema is being phased out in favor of [information_schema views](../general-reference/information-schema/information-schema-and-usage-views.md). To ensure a smooth transition, please update code to use `information_schema` - for example, any query currently reading from `catalog.query_history` or `catalog.running_queries` should be modified to query from `information_schema.query_history` or `information_schema.running_queries`. **Please note, all column names in `information_schema` views are lowercase** - for example, `START_TIME` from `catalog.query_history` is now named `start_time` in the `information_schema.query_history` view. + Support for the `catalog` schema is being phased out in favor of [information_schema views](../information-schema/information-schema-and-usage-views.md). To ensure a smooth transition, please update code to use `information_schema` - for example, any query currently reading from `catalog.query_history` or `catalog.running_queries` should be modified to query from `information_schema.query_history` or `information_schema.running_queries`. **Please note, all column names in `information_schema` views are lowercase** - for example, `START_TIME` from `catalog.query_history` is now named `start_time` in the `information_schema.query_history` view. * **Information schema updated** - Added columns to the [information_schema.databases view](../general-reference/information-schema/databases.md): + Added columns to the [information_schema.databases view](../information-schema/databases.md): * `compressed_size` * `uncompressed_size` * `description` - Added columns to the [information_schema.engines view](../general-reference/information-schema/engines.md): + Added columns to the [information_schema.engines view](../information-schema/engines.md): * `engine_type` * `auto_stop` * `url` @@ -256,26 +256,26 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Added support for functions `HLL_COUNT_BUILD`, `HLL_COUNT_EXTRACT` and `HLL_COUNT_MERGE_PARTIAL`** - [`HLL_COUNT_BUILD`](../sql-reference/functions-reference/hll-count-build.md) uses the HLL++ algorithm and allows you to control the set sketch size precision, aggregating input values to an HLL++ sketch represented as the `BYTEA` data type. Later individual sketches can be merged to a single sketch using the aggregate function [`HLL_COUNT_MERGE_PARTIAL`](../sql-reference/functions-reference/hll-count-merge-partial.md), or the estimated cardinality extracted (to get the final estimated distinct count value) using the [`HLL_COUNT_EXTRACT`](../sql-reference/functions-reference/hll-count-extract.md) scalar function. + [`HLL_COUNT_BUILD`](../../sql-reference/functions-reference/hll-count-build.md) uses the HLL++ algorithm and allows you to control the set sketch size precision, aggregating input values to an HLL++ sketch represented as the `BYTEA` data type. Later individual sketches can be merged to a single sketch using the aggregate function [`HLL_COUNT_MERGE_PARTIAL`](../../sql-reference/functions-reference/hll-count-merge-partial.md), or the estimated cardinality extracted (to get the final estimated distinct count value) using the [`HLL_COUNT_EXTRACT`](../../sql-reference/functions-reference/hll-count-extract.md) scalar function. * **Added support for service accounts** - Service account users (Beta) are now available. Read more about using service accounts [here.](../managing-your-account/service-accounts.md) + Service account users (Beta) are now available. Read more about using service accounts [here.](../../managing-your-account/service-accounts.md) * **Added support for new function PARAM** - Use the new [`PARAM` function](../sql-reference/functions-reference/param.md) to reference values of query parameters. + Use the new [`PARAM` function](../../sql-reference/functions-reference/param.md) to reference values of query parameters. * **Added support for `VACUUM` command** - The [`VACUUM` command](../sql-reference/commands/vacuum.md) is now generally available, for use in production workflows. + The [`VACUUM` command](../../sql-reference/commands/vacuum.md) is now generally available, for use in production workflows. ### Enhancements, changes and new integrations {: .no_toc} * **Change to `SUBSTRING` function** - The [`SUBSTRING` function](../sql-reference/functions-reference/substring.md) with updated behavior is now available and is no longer an alias for the [`SUBSTR (legacy)`](../sql-reference/functions-reference/substr.md) function. With the `SUBSTRING` function, negative offsets are treated as offset 1, thus starting at the beginning of the input string. With the `SUBSTR (legacy)` function, negative `offset` values indicate an offset from the end of the input string. With the new `SUBSTRING` function, for index values less than 1, the length is decreased by the difference between 1 and the index value. Negative `length` values are no longer allowed, and indexing is now 1-based, rather than 0-based as with the `SUBSTR (legacy)` function. + The [`SUBSTRING` function](../../sql-reference/functions-reference/substring.md) with updated behavior is now available and is no longer an alias for the [`SUBSTR (legacy)`](../../sql-reference/functions-reference/substr.md) function. With the `SUBSTRING` function, negative offsets are treated as offset 1, thus starting at the beginning of the input string. With the `SUBSTR (legacy)` function, negative `offset` values indicate an offset from the end of the input string. With the new `SUBSTRING` function, for index values less than 1, the length is decreased by the difference between 1 and the index value. Negative `length` values are no longer allowed, and indexing is now 1-based, rather than 0-based as with the `SUBSTR (legacy)` function. * **Added UTF-8 validation for text fields** @@ -288,7 +288,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Unsupported functions behavior** - Functions not found in the [Firebolt SQL reference](../sql-reference/functions-reference/index.md) will be blocked. If you have scripts using these functions, please work with your Customer Success team to implement supported functions. + Functions not found in the [Firebolt SQL reference](../../sql-reference/functions-reference/index.md) will be blocked. If you have scripts using these functions, please work with your Customer Success team to implement supported functions. ### Resolved issues {: .no_toc} @@ -313,11 +313,11 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Added support for functions REGEXP\_EXTRACT and REGEXP\_EXTRACT\_ALL** - Use these functions to extract matching patterns within an input expression. The [REGEXP\_EXTRACT](../sql-reference/functions-reference/regexp-extract.md) function extracts the first match only (from the left), [REGEXP\_EXTRACT\_ALL](../sql-reference/functions-reference/regexp-extract-all.md) function extracts all the matches. + Use these functions to extract matching patterns within an input expression. The [REGEXP\_EXTRACT](../../sql-reference/functions-reference/regexp-extract.md) function extracts the first match only (from the left), [REGEXP\_EXTRACT\_ALL](../../sql-reference/functions-reference/regexp-extract-all.md) function extracts all the matches. * **System Engine (Beta)** - Use the new [system engine](../working-with-engines/system-engine.md) to run metadata-related queries without having to start a separate engine. The system engine is always available in all databases to select and use. + Use the new [system engine](../../working-with-engines/system-engine.md) to run metadata-related queries without having to start a separate engine. The system engine is always available in all databases to select and use. {: .note} System engine is currently only available for accounts that have a single region enabled. @@ -366,7 +366,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **DATE and TIMESTAMP names available for new data types** - A new option enables the use of familiar type names `DATE` and `TIMESTAMP` as default for the new expanded date and timestamp data types, with synonyms `PGDATE` and `TIMESTAMPNTZ`. `TIMESTAMPTZ` remains the same as a new type added. If you are a new customer starting on DB version 3.22, these new date and timestamp type names will be enabled by default. For more information, see [Date and timestamp data types](../general-reference/data-types.md/#date-and-timestamp). + A new option enables the use of familiar type names `DATE` and `TIMESTAMP` as default for the new expanded date and timestamp data types, with synonyms `PGDATE` and `TIMESTAMPNTZ`. `TIMESTAMPTZ` remains the same as a new type added. If you are a new customer starting on DB version 3.22, these new date and timestamp type names will be enabled by default. For more information, see [Date and timestamp data types](../data-types.md/#date-and-timestamp). {: .warning} >For existing customers before DB version 3.22: @@ -375,7 +375,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil >* To ingest from an existing table into a new table using the new types, simply cast a column of type `DATE` to `PGDATE` and a column of type >`TIMESTAMP` to `TIMESTAMPNTZ`. >* To ingest into a new table using the new types from external data, create an external table with the new types. > - >See [Date and timestamp (legacy)](../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions) for information about how to adjust scripts for supported functions. + >See [Date and timestamp (legacy)](../legacy-date-timestamp.md#legacy-date-and-timestamp-functions) for information about how to adjust scripts for supported functions. For existing customers before DB version 3.22, data must be reingested using the new types and scripts updated to use supported functions **before this option is enabled**. Please contact your Customer Success team to enable the `DATE` and `TIMESTAMP` synonymns for new types once you have reingested and adjusted scripts. @@ -390,11 +390,11 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Added support for `UPDATE` and `DELETE` commands** - Data manipulation commands [`UPDATE`](../sql-reference/commands/update.md) and [`DELETE`](../sql-reference/commands/delete.md) are generally available, for use in production workflows. + Data manipulation commands [`UPDATE`](../../sql-reference/commands/update.md) and [`DELETE`](../../sql-reference/commands/delete.md) are generally available, for use in production workflows. * **Added support for `NUMERIC` data type** - The [`NUMERIC` data type](../general-reference/numeric-data-type.md) (synonym: `DECIMAL`) is now generally available, for use in production workflows. + The [`NUMERIC` data type](../numeric-data-type.md) (synonym: `DECIMAL`) is now generally available, for use in production workflows. ### Enhancements, changes, and new integrations {: .no_toc} @@ -405,12 +405,12 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **UI option to explain queries (UI release)** - A new option in the UI supports [explaining statements](../using-the-sql-workspace/using-explain-to-analyze-query-execution.md#opening-visual-explain-after-you-run-a-query) for single and multi-statement scripts. - ![](../assets/images/explain_query_icon.png) + A new option in the UI supports [explaining statements](../../using-the-sql-workspace/using-explain-to-analyze-query-execution.md#opening-visual-explain-after-you-run-a-query) for single and multi-statement scripts. + ![](../../assets/images/explain_query_icon.png) * **Visual explain temporarily limited to text view** - Text view for [visual explain](../using-the-sql-workspace/using-explain-to-analyze-query-execution.md#opening-visual-explain-after-you-run-a-query) will be the only supported view temporarily while improvements to visual explain are developed. Other views will be added back in the future. + Text view for [visual explain](../../using-the-sql-workspace/using-explain-to-analyze-query-execution.md#opening-visual-explain-after-you-run-a-query) will be the only supported view temporarily while improvements to visual explain are developed. Other views will be added back in the future. ### Resolved issues {: .no_toc} @@ -439,7 +439,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Data manipulation commands now available** (Beta release) - Beta support is now available for data manipulation commands [UPDATE](../sql-reference/commands/update.md) and [DELETE](../sql-reference/commands/delete.md). A [VACUUM](../sql-reference/commands/vacuum.md) has also been added to optimize frequently updated tables. + Beta support is now available for data manipulation commands [UPDATE](../../sql-reference/commands/update.md) and [DELETE](../../sql-reference/commands/delete.md). A [VACUUM](../../sql-reference/commands/vacuum.md) has also been added to optimize frequently updated tables. For more information and known limitations in the beta release, please see linked documentation. @@ -461,7 +461,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Parquet, Avro and ORC support added for new data types** - These file types can now be used to ingest new `PGDATE`, `TIMSTAMPNTZ` and `TIMESTAMPTZ` data types. For more information see [data type documention](../general-reference/data-types.md#date-and-time). + These file types can now be used to ingest new `PGDATE`, `TIMSTAMPNTZ` and `TIMESTAMPTZ` data types. For more information see [data type documention](../data-types.md#date-and-time). Starting in the next version, you will have the option to use the type names `DATE` and `TIMESTAMP` instead of new type names `PGDATE` and `TIMESTAMPNTZ`, but data must be reingested using the new types before this option is enabled. `TIMESTAMPTZ` will remain the same, as that is a new type added. See [here](release-notes-archive.md#db-version-3200) for instructions to reingest. Please raise any questions or feedback with your Customer Success team. @@ -483,11 +483,11 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil The following new and updated functions can now be used with new data types `PGDATE`, `TIMESTAMPTZ`, and `TIMESTAMPNTZ`. - * [TO_CHAR](../sql-reference/functions-reference/to-char-new.md) - * [CURRENT_PGDATE](../sql-reference/functions-reference/current-pgdate.md) - * [LOCALTIMESTAMPNTZ](../sql-reference/functions-reference/localtimestampntz.md) - * [CURRENT_TIMESTAMPTZ](../sql-reference/functions-reference/current-timestamptz.md) - * [TO_TIMESTAMPTZ](../sql-reference/functions-reference/to-timestamptz.md) + * [TO_CHAR](../../sql-reference/functions-reference/to-char-new.md) + * [CURRENT_PGDATE](../../sql-reference/functions-reference/current-pgdate.md) + * [LOCALTIMESTAMPNTZ](../../sql-reference/functions-reference/localtimestampntz.md) + * [CURRENT_TIMESTAMPTZ](../../sql-reference/functions-reference/current-timestamptz.md) + * [TO_TIMESTAMPTZ](../../sql-reference/functions-reference/to-timestamptz.md) {: .warning} >**To use the new data types, new external and dimension/fact tables must be created. Reingest will be required to recognize new precision.** @@ -498,14 +498,14 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Changed NULL behavior of `CONCAT` function** - NULL inputs to [the `CONCAT` function](../sql-reference/functions-reference/concat.md) are now treated as empty strings, therefore any NULL inputs are ignored. When all inputs are NULL, the result will be an empty string. When using `||`, any NULL input still results in a NULL output. + NULL inputs to [the `CONCAT` function](../../sql-reference/functions-reference/concat.md) are now treated as empty strings, therefore any NULL inputs are ignored. When all inputs are NULL, the result will be an empty string. When using `||`, any NULL input still results in a NULL output. {: .warning} >If you are using the `CONCAT` function on strings with NULL inputs and you don't want NULL values to be ignored, you will need to use the `||` function instead. * **Additional syntax for ARRAY data type names** - Syntax options for defining columns with [the `ARRAY` data type](../general-reference/data-types.md#array) have been updated to include `[]` and ` ARRAY`. Array element type is nullable when using the new syntax options. + Syntax options for defining columns with [the `ARRAY` data type](../data-types.md#array) have been updated to include `[]` and ` ARRAY`. Array element type is nullable when using the new syntax options. For example, the following three queries will create tables with the same `demo_array` column of type `ARRAY` of nullable `TEXT`. @@ -526,7 +526,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Added flag support for `REGEXP_LIKE`** - The [`REGEXP_LIKE` function](../sql-reference/functions-reference/regexp-like.md) now supports an optional `` input, to allow additional controls over the regular's expression matching behavior. + The [`REGEXP_LIKE` function](../../sql-reference/functions-reference/regexp-like.md) now supports an optional `` input, to allow additional controls over the regular's expression matching behavior. For example, the `i` flag causes the regular expression matching in the following query to be case-insensitive. Without this flag, the query would not find a match and would return `0`. @@ -537,11 +537,11 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Parquet and ORC support added for binary data type** - Binary type data from external Parquet or ORC file types will now be ingested directly with [the data type `BYTEA`](../general-reference/bytea-data-type.md#importing-bytea-from-external-source). Previously, data were ingested as type `TEXT` and then converted to data type `BYTEA`. + Binary type data from external Parquet or ORC file types will now be ingested directly with [the data type `BYTEA`](../bytea-data-type.md#importing-bytea-from-external-source). Previously, data were ingested as type `TEXT` and then converted to data type `BYTEA`. * **Export all results from the SQL Workspace** (UI release) - [Exporting the entire results section](../using-the-sql-workspace/using-the-sql-workspace.md#exporting-results-to-a-local-hard-drive) from the SQL Workspace in CSV or JSON format is now supported. + [Exporting the entire results section](../../using-the-sql-workspace/using-the-sql-workspace.md#exporting-results-to-a-local-hard-drive) from the SQL Workspace in CSV or JSON format is now supported. * **Renamed column from `information_schema.tables`** @@ -566,7 +566,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Export all results from the SQL Workspace** - [Exporting the entire results section](../using-the-sql-workspace/using-the-sql-workspace.md#exporting-results-to-a-local-hard-drive) from the SQL Workspace in CSV or JSON format is now supported. + [Exporting the entire results section](../../using-the-sql-workspace/using-the-sql-workspace.md#exporting-results-to-a-local-hard-drive) from the SQL Workspace in CSV or JSON format is now supported. * **Renamed column from `information_schema.tables`** @@ -594,9 +594,9 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil Added support for new date and timestamp data types: - * [PGDATE](../general-reference/date-data-type.md) - * [TIMESTAMPNTZ](../general-reference/timestampntz-data-type.md) - * [TIMESTAMPTZ](../general-reference/timestamptz-data-type.md) + * [PGDATE](../date-data-type.md) + * [TIMESTAMPNTZ](../timestampntz-data-type.md) + * [TIMESTAMPTZ](../timestamptz-data-type.md) The new data types use an improved memory layout providing a much higher supported range, now extending from `0001-01-01[ 00:00:00.000000]` to `9999-12-31[ 23:59:59.999999]`. This change also extends the syntax for specifying intervals used for arithmetic with dates and timestamps. In addition to the previously supported interval syntax, you can now also write `interval 'N' unit`, where `N` is a possibly signed integer, and `unit` is one of `year`, `month`, `day`, `hour`, `minute`, or `second`, matched case-insensitively. @@ -611,11 +611,11 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **New setting for time zone** - [New setting](../general-reference/system-settings.md#set-time-zone) `time_zone` controls the session time zone. The default value of the `time_zone` setting is UTC. + [New setting](../system-settings.md#set-time-zone) `time_zone` controls the session time zone. The default value of the `time_zone` setting is UTC. * **New keyboard shortcuts** (UI release) - Use new [keyboard shortcuts](../using-the-sql-workspace/keyboard-shortcuts-for-sql-workspace.md) in the SQL workspace to cancel a query, or go to a specific line in your script. + Use new [keyboard shortcuts](../../using-the-sql-workspace/keyboard-shortcuts-for-sql-workspace.md) in the SQL workspace to cancel a query, or go to a specific line in your script. * Cancel a running script with **Ctrl + Alt + k** for Windows & Linux, or **⌘ + Option + k** for Mac * Go to a desired line with **Ctrl + l** for Windows & Linux, or **⌘ + l** for Mac @@ -625,7 +625,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Improved join index performance** - [Join indexes](../using-indexes/using-join-indexes.md) just got better: profit from their extreme performance benefits without any configuration. Moreover, there is no more need to manually create or refresh – the results are always up to date even if the underlying data changed. With this optimization, we've seen real-world, production queries run 200x faster. + [Join indexes](../../using-indexes/using-indexes.md) just got better: profit from their extreme performance benefits without any configuration. Moreover, there is no more need to manually create or refresh – the results are always up to date even if the underlying data changed. With this optimization, we've seen real-world, production queries run 200x faster. To see how this works, let’s look at an example. Say we have the following query pattern which is run hundreds of times per second with different values for `l.player_id` and `l.date`: @@ -653,7 +653,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Added syntax option for setting TYPE options in CREATE EXTERNAL TABLE** - Added the option to set type options for S3 source files at the same level as `TYPE` is set. [Type option](../sql-reference/commands/create-external-table.md#type) can now be defined as in the example below: + Added the option to set type options for S3 source files at the same level as `TYPE` is set. [Type option](../../sql-reference/commands/create-external-table.md#type) can now be defined as in the example below: ```sql CREATE EXTERNAL TABLE ex_table( ... ) @@ -672,7 +672,7 @@ TRUE and FALSE are now accepted as valid `BOOLEAN` values when ingesting CSV fil * **Default DECIMAL scale changed** - The default scale for the `DECIMAL` [data type](../general-reference/decimal-data-type.md) has been updated from 0 to 9. + The default scale for the `DECIMAL` [data type](../decimal-data-type.md) has been updated from 0 to 9. ## DB version 3.17.0 @@ -687,28 +687,28 @@ February 2023 * **Added support for GROUP BY ALL** - Instead of explicitly listing all grouping elements in the `GROUP BY` clause, [use `GROUP BY ALL`](../sql-reference/commands/select.md#group-by-all) to automatically infer them from the `SELECT` list. + Instead of explicitly listing all grouping elements in the `GROUP BY` clause, [use `GROUP BY ALL`](../../sql-reference/commands/select.md#group-by-all) to automatically infer them from the `SELECT` list. * **New BYTEA data type** - Use the new [`BYTEA` data type](../general-reference/bytea-data-type.md) to store binary data, like images, other multimedia files, or raw bytes of information. + Use the new [`BYTEA` data type](../bytea-data-type.md) to store binary data, like images, other multimedia files, or raw bytes of information. -* **New functions [ENCODE](../sql-reference/functions-reference/encode.md) and [DECODE](../sql-reference/functions-reference/decode.md)** +* **New functions [ENCODE](../../sql-reference/functions-reference/encode.md) and [DECODE](../../sql-reference/functions-reference/decode.md)** - Use [these functions](../sql-reference/functions-reference/index.md#bytea-functions) with the new `BYTEA` data type to encode binary data into a SQL expression of type `TEXT`, and decode from type `TEXT` to type `BYTEA`. + Use [these functions](../../sql-reference/functions-reference/index.md#bytea-functions) with the new `BYTEA` data type to encode binary data into a SQL expression of type `TEXT`, and decode from type `TEXT` to type `BYTEA`. * **Added support for EXCLUDE columns in SELECT ** - [Added support for `EXCLUDE` columns in SELECT *](../sql-reference/commands/select.md#select-wildcard) to define which columns to exclude from a SELECT wildcard expansion. + [Added support for `EXCLUDE` columns in SELECT *](../../sql-reference/commands/select.md#select-wildcard) to define which columns to exclude from a SELECT wildcard expansion. * **New setting for parsing literal strings** - [New setting](../general-reference/system-settings.md#enable-parsing-for-literal-strings) `standard_conforming_strings` controls whether strings are parsed without escaping, treating backslashes literally. + [New setting](../system-settings.md#enable-parsing-for-literal-strings) `standard_conforming_strings` controls whether strings are parsed without escaping, treating backslashes literally. * **New keyboard shortcuts** (UI release) - Use new [keyboard shortcuts](../using-the-sql-workspace/keyboard-shortcuts-for-sql-workspace.md) in the SQL workspace to save and close scripts, and expand or collapse the results pane. + Use new [keyboard shortcuts](../../using-the-sql-workspace/keyboard-shortcuts-for-sql-workspace.md) in the SQL workspace to save and close scripts, and expand or collapse the results pane. * Close the current script in the SQL workspace with **Ctrl + Alt + x** for Windows & Linux, or **⌘ + Option + x** for Mac * Close all scripts in the SQL workspace with **Ctrl + Alt + g** for Windows & Linux, or **⌘ + Option + g** for Mac @@ -721,23 +721,23 @@ February 2023 * **Added support for CREATE TABLE as an alias for CREATE FACT TABLE** - [Added support for `CREATE TABLE` syntax](../sql-reference/commands/create-fact-dimension-table.md), with the default as fact table. `PRIMARY INDEX` is now also optional for fact tables. + [Added support for `CREATE TABLE` syntax](../../sql-reference/commands/create-fact-dimension-table.md), with the default as fact table. `PRIMARY INDEX` is now also optional for fact tables. * **Added support for the DECIMAL data type with the ARRAY\_SORT function** - [ARRAY_SORT](../sql-reference/functions-reference/array-sort.md) has been added as a function supporting the [DECIMAL data type](../general-reference/decimal-data-type.md#supported-functions-beta-release). + [ARRAY_SORT](../../sql-reference/functions-reference/array-sort.md) has been added as a function supporting the [DECIMAL data type](../decimal-data-type.md#supported-functions-beta-release). * **Minimize results in the SQL workspace** (UI release) The results pane in the SQL workspace can now be minimized. Expand or collapse by double-clicking on the "Results" pane header, using the height control button to drag and change the size of the pane as desired, or using the keyboard shortcut **Ctrl + Alt + e** for Windows & Linux, or **⌘ + Option + e** for Mac. - ![](../assets/images/release-notes/expandcollapse.gif) + ![](../../assets/images/release-notes/expandcollapse.gif) * **Primary index columns highlighted in columns object viewer** (UI release) The columns pane in the object viewer now highlights columns that are part of a table's primary index, making it easier to identify primary indexes and the order of the columns in the primary index. - ![](../assets/images/release-notes/pihighlight.png) + ![](../../assets/images/release-notes/pihighlight.png) ### Resolved issues {: .no_toc} @@ -758,7 +758,7 @@ February 2023 * **Added support for CSV TYPE options on ingest** (DB version 3.14.0) - Added support for additional TYPE options for the [CREATE EXTERNAL TABLE command](../sql-reference/commands/create-external-table.md#type), to allow configuration for ingesting different CSV file formats. Some of these options may be available in previous versions. + Added support for additional TYPE options for the [CREATE EXTERNAL TABLE command](../../sql-reference/commands/create-external-table.md#type), to allow configuration for ingesting different CSV file formats. Some of these options may be available in previous versions. * `[ALLOW_DOUBLE_QUOTES = {TRUE|FALSE}]`, `[ALLOW_SINGLE_QUOTES = {TRUE|FALSE}]`: Define that unescaped double or single quotes in CSV input file will not cause an error to be generated on ingest. @@ -794,24 +794,24 @@ February 2023 * **Added support for functions** (DB version 3.13.0) - * [FIRST_VALUE](../sql-reference/functions-reference/first-value.md): Returns the first value evaluated in the specified window frame. - * [NTH_VALUE](../sql-reference/functions-reference/nth-value.md): Returns the value evaluated of the nth row of the specified window frame (starting at the first row). - * [NTILE](../sql-reference/functions-reference/ntile.md): Divides an ordered data set equally into a specified number of buckets. - * [CUME\_DIST](../sql-reference/functions-reference/cume-dist.md): Calculates the relative rank (cumulative distribution) of the current row in relation to other rows in the same partition within an ordered data set. - * [PERCENT\_RANK](../sql-reference/functions-reference/percent-rank.md): Calculates the relative rank of the current row within an ordered data set. - * [PERCENTILE\_CONT (aggregation function)](../sql-reference/functions-reference/percentile-cont.md): Calculates a percentile, assuming a continuous distribution of values. - * [PERCENTILE\_CONT (window function)](../sql-reference/functions-reference/percentile-cont-window.md): Calculates a percentile over a partition, assuming a continuous distribution of values. - * [PERCENTILE\_DISC (aggregation function)](../sql-reference/functions-reference/percentile-disc.md): Returns a percentile for an ordered data set, equal to a specific column value. - * [PERCENTILE\_DISC (window function)](../sql-reference/functions-reference/percentile-disc-window.md): Returns a percentile over a partition for an ordered data set, equal to a specific column value. + * [FIRST_VALUE](../../sql-reference/functions-reference/first-value.md): Returns the first value evaluated in the specified window frame. + * [NTH_VALUE](../../sql-reference/functions-reference/nth-value.md): Returns the value evaluated of the nth row of the specified window frame (starting at the first row). + * [NTILE](../../sql-reference/functions-reference/ntile.md): Divides an ordered data set equally into a specified number of buckets. + * [CUME\_DIST](../../sql-reference/functions-reference/cume-dist.md): Calculates the relative rank (cumulative distribution) of the current row in relation to other rows in the same partition within an ordered data set. + * [PERCENT\_RANK](../../sql-reference/functions-reference/percent-rank.md): Calculates the relative rank of the current row within an ordered data set. + * [PERCENTILE\_CONT (aggregation function)](../../sql-reference/functions-reference/percentile-cont.md): Calculates a percentile, assuming a continuous distribution of values. + * [PERCENTILE\_CONT (window function)](../../sql-reference/functions-reference/percentile-cont-window.md): Calculates a percentile over a partition, assuming a continuous distribution of values. + * [PERCENTILE\_DISC (aggregation function)](../../sql-reference/functions-reference/percentile-disc.md): Returns a percentile for an ordered data set, equal to a specific column value. + * [PERCENTILE\_DISC (window function)](../../sql-reference/functions-reference/percentile-disc-window.md): Returns a percentile over a partition for an ordered data set, equal to a specific column value. * **Added support for TRUNCATE TABLE command** (DB version 3.11.0) - Use the [TRUNCATE TABLE](../sql-reference/commands/truncate-table.md) command to remove all rows from a table. + Use the [TRUNCATE TABLE](../../sql-reference/commands/truncate-table.md) command to remove all rows from a table. * **Added support for DECIMAL data type** (DB version 3.13.0) - Beta support for the [DECIMAL](decimal-data-type.md) data type is coming in version 3.13. + Beta support for the [DECIMAL](../decimal-data-type.md) data type is coming in version 3.13. {: .warning} In previous versions, DECIMAL type columns are stored as DOUBLE type. Therefore, this change may require your action. Restart analytics engines before general purpose engines to use this new feature, and see below for additional actions. @@ -824,7 +824,7 @@ February 2023 * If your table defined with columns as DECIMAL are recreated periodically (by your ELT process), new columns will be defined as DECIMAL(38,0) – default precision and scale. If you don’t want to switch to the DECIMAL data type for the existing data flows, you can change your ELT flows and replace the DECIMAL keyword with DOUBLE. - * If you are using a function with a DECIMAL type in your ELT process, ensure that function is [supported for the DECIMAL data type](decimal-data-type.md#supported-functions-beta-release). + * If you are using a function with a DECIMAL type in your ELT process, ensure that function is [supported for the DECIMAL data type](../decimal-data-type.md#supported-functions-beta-release). * To change the data type of columns defined as DECIMAL but stored as DOUBLE, you will need to recreate the table with the new definition (column defined as DECIMAL(p,s)). To avoid precision loss, we highly recommend re-ingesting the data from the source (i.e., via external table) rather than casting values to decimal from the existing table (i.e., `INSERT INTO new_table(d) SELECT CAST(d as DECIMAL(38,9)) FROM old_table;`). @@ -850,7 +850,7 @@ February 2023 * **Information schema updated** (DB version 3.13.0) - Added `cpu_usage_us` and `cpu_delay_us` columns to the [information_schema.query_history view](../general-reference/information-schema/query-history-view.md). + Added `cpu_usage_us` and `cpu_delay_us` columns to the [information_schema.query_history view](../information-schema/query-history-view.md). ### Resolved issues {: .no_toc} @@ -869,7 +869,7 @@ February 2023 * **Added support for functions REGEXP\_REPLACE and REGEXP\_REPLACE\_ALL** **(DB version 3.11.0)** - Use these functions to replace matching patterns in the input with a replacement. The [REGEXP\_REPLACE](../sql-reference/functions-reference/regexp-replace.md) function replaces the first match only (from the left), [REGEXP\_REPLACE\_ALL](../sql-reference/functions-reference/regexp-replace.md) function replaces all the matches. + Use these functions to replace matching patterns in the input with a replacement. The [REGEXP\_REPLACE](../../sql-reference/functions-reference/regexp-replace.md) function replaces the first match only (from the left), [REGEXP\_REPLACE\_ALL](../../sql-reference/functions-reference/regexp-replace.md) function replaces all the matches. ### Enhancements, changes and new integrations {: .no_toc} @@ -882,7 +882,7 @@ February 2023 * **Updated syntax to generate an aggregating index** **(DB version 3.11.0)** - The [CREATE AGGREGATING INDEX](../sql-reference/commands/create-aggregating-index.md) command will now generate the aggregating index, without using the additional AND GENERATE clause. + The [CREATE AGGREGATING INDEX](../../sql-reference/commands/create-aggregating-index.md) command will now generate the aggregating index, without using the additional AND GENERATE clause. * **Added support for window function frame definitions** **(DB version 3.11.0)** @@ -892,12 +892,12 @@ February 2023 * **VERSION() function now available** **(DB version 3.8.0)** - Query the engine version using the new [VERSION()](../sql-reference/functions-reference/version.md) function. Engine version is also now available as a column in the [information\_schema.engines](../general-reference/information-schema/engines.md) view. + Query the engine version using the new [VERSION()](../../sql-reference/functions-reference/version.md) function. Engine version is also now available as a column in the [information\_schema.engines](../information-schema/engines.md) view. * **Information schema updated** **(DB version 3.8.0)** - System-defined tables metadata can now be queried via the [information\_schema.tables](../general-reference/information-schema/tables.md) view. + System-defined tables metadata can now be queried via the [information\_schema.tables](../information-schema/tables.md) view. ## August 2022 @@ -920,7 +920,7 @@ February 2023 query\_history and running\_queries views can now be queried via the information\_schema. - For more information, see [Information schema for query history](../general-reference/information-schema/query-history-view.md) and [Information schema for running queries](../general-reference/information-schema/running-queries.md). + For more information, see [Information schema for query history](../information-schema/query-history-view.md) and [Information schema for running queries](../information-schema/running-queries.md). * **Added support for Multi-factor authentication (MFA)** **(Beta)** @@ -931,9 +931,9 @@ February 2023 **To enable MFA for a Firebolt user or group of users** choose the **User Management** icon in the navigation pane. If the icon isn't available, you don't have Account Admin permissions. - ![User management icon](../assets/images/user-management.png) + ![User management icon](../../assets/images/user-management.png) - For more information, see [Configuring MFA for users (Beta)](../managing-your-account/managing-users.md#configuring-mfa-for-users-beta). + For more information, see [Configuring MFA for users (Beta)](../../managing-your-account/managing-users.md#configuring-mfa-for-users-beta). * **Added support for the hll\_count\_distinct(input, [, precision]) function** **(DB version 3.7.0)** @@ -945,7 +945,7 @@ February 2023 * **Added new data type aliases** **(DB version 3.7.0)** - Data type aliases have been added for `REAL`, `FLOAT4`, `FLOAT8`, `INT4`, `INT8`, and `FLOAT(p)`. For more information on data types and their aliases (synonyms), see [Data types](data-types.md). + Data type aliases have been added for `REAL`, `FLOAT4`, `FLOAT8`, `INT4`, `INT8`, and `FLOAT(p)`. For more information on data types and their aliases (synonyms), see [Data types](../data-types.md). * **Updated INFORMATION_SCHEMA.COLUMNS** **(DB version 3.8.0)** @@ -956,20 +956,20 @@ February 2023 Added a status indicator in the browser tab so when multiple tabs are open in the browser, you can switch to a different tab and still track the status of your running script. The status adds a color coded indicator dot to the Firebolt icon in the tab. A green dot indicates the script completed successfully. The status remains in the tab for one minute after the script completes running. - For more information about this new status indicator, and running scripts, see [Running scripts and working with results](../using-the-sql-workspace/using-the-sql-workspace.md#running-scripts-and-working-with-results). + For more information about this new status indicator, and running scripts, see [Running scripts and working with results](../../using-the-sql-workspace/using-the-sql-workspace.md#running-scripts-and-working-with-results). - ![](../assets/images/release-notes/script-status.gif) + ![](../../assets/images/release-notes/script-status.gif) * **Added dark mode** Firebolt now supports an additional color theme - dark mode. You can toggle between light and dark modes in the UI. Select the toggle at the bottom of the left navigation pane to turn dark mode on and off. - ![](../assets/images/release-notes/dark-mode-toggle.gif) + ![](../../assets/images/release-notes/dark-mode-toggle.gif) * **Added support for IP allowed & blocked lists** **(Beta)** - Allows access to your Firebolt account from specific IP addresses. For more information, see [Allowing and blocking source IP addresses for users (Beta)](../managing-your-account/managing-users.md#allowing-and-blocking-source-ip-addresses-for-users-beta) + Allows access to your Firebolt account from specific IP addresses. For more information, see [Allowing and blocking source IP addresses for users (Beta)](../../managing-your-account/managing-users.md#allowing-and-blocking-source-ip-addresses-for-users-beta) * **Added support for server-side asynchronous querying on the Python SDK** @@ -1002,11 +1002,11 @@ February 2023 The billing breakdown in the engine dashboard can now show billing or running time. - ![Billing time](../assets/images/release-notes/billing-time.png) + ![Billing time](../../assets/images/release-notes/billing-time.png) * **Added an optional `` parameter to the `TO_DATE` and `TO_TIMESTAMP` functions** - The `` parameter allows you to use a string literal, as shown in [DATE_FORMAT](../sql-reference/functions-reference/date-format.md), to specify the format of the string to convert. This hint helps the date-time parser to improve performance. For more information, see [TO_DATE](../sql-reference/functions-reference/to-date.md) and [TO_TIMESTAMP](../sql-reference/functions-reference/to-timestamp.md). + The `` parameter allows you to use a string literal, as shown in [DATE_FORMAT](../../sql-reference/functions-reference/date-format.md), to specify the format of the string to convert. This hint helps the date-time parser to improve performance. For more information, see [TO_DATE](../../sql-reference/functions-reference/to-date.md) and [TO_TIMESTAMP](../../sql-reference/functions-reference/to-timestamp.md). ### Resolved issues {: .no_toc} @@ -1053,17 +1053,17 @@ February 2023 {: .no_toc} * You can now use the help menu to check the Firebolt service status page. - ![Status Page](../assets/images/firebolt-service-status.png) + ![Status Page](../../assets/images/firebolt-service-status.png) -* Added support for `CREATE AND GENERATE AGGREGATING INDEX IF NOT EXISTS`. For more information, see [CREATE AGGREGATING INDEX](../sql-reference/commands/create-aggregating-index.md). +* Added support for `CREATE AND GENERATE AGGREGATING INDEX IF NOT EXISTS`. For more information, see [CREATE AGGREGATING INDEX](../../sql-reference/commands/create-aggregating-index.md). -* Added an information schema view for indexes. The view is available for each database and contains one row for each index. For more information, see [Information schema for indexes](../general-reference/information-schema/indexes.md). +* Added an information schema view for indexes. The view is available for each database and contains one row for each index. For more information, see [Information schema for indexes](../information-schema/indexes.md). -* Added `ARRAY_AGG` as an alias of `NEST`. For more information, see [NEST](../sql-reference/functions-reference/nest.md). +* Added `ARRAY_AGG` as an alias of `NEST`. For more information, see [NEST](../../sql-reference/functions-reference/nest.md). * You can now concatenate strings, numbers, and arrays using the `||` operator without exlicitly casting elements. -* Added `TO_TEXT` as an alias of `TO_STRING`. For more information, see [TO_STRING](../sql-reference/functions-reference/to-string.md). +* Added `TO_TEXT` as an alias of `TO_STRING`. For more information, see [TO_STRING](../../sql-reference/functions-reference/to-string.md). * An improved approach to Window functions is available for Beta testing by request. For more information, contact Firebolt Support. @@ -1111,16 +1111,16 @@ February 2023 {: .no_toc} * **Added support for `CREATE OR REPLACE VIEW` statement** - The `IF NOT EXISTS` and `OR REPLACE` options are incompatible when creating a view. For more information, see [CREATE VIEW](../sql-reference/commands/create-view.md). + The `IF NOT EXISTS` and `OR REPLACE` options are incompatible when creating a view. For more information, see [CREATE VIEW](../../sql-reference/commands/create-view.md). * **Added `ALTER DATABASE` statement** - Allows you to change the engine configuration and the database description. For more information, see [ALTER DATABASE](../sql-reference/commands/alter-database.md). + Allows you to change the engine configuration and the database description. For more information, see [ALTER DATABASE](../../sql-reference/commands/alter-database.md). * **Added `TO_CHAR` function** - Converts a timestamp or a numeric type to strings in a format that you specify. For more information, see [TO_CHAR](../sql-reference/functions-reference/to-char.md). + Converts a timestamp or a numeric type to strings in a format that you specify. For more information, see [TO_CHAR](../../sql-reference/functions-reference/to-char.md). * **Materialized CTEs (Beta)** - Added an optimization hint to support caching large, computationally expensive CTE results in memory for reuse to increase query performance. For more information, see [SELECT](../sql-reference/commands/select.md#materialized-common-table-expressions-beta). + Added an optimization hint to support caching large, computationally expensive CTE results in memory for reuse to increase query performance. For more information, see [SELECT](../../sql-reference/commands/select.md#materialized-common-table-expressions-beta). * **Added support for SET statements passed via SQL in the Python SDK** @@ -1128,7 +1128,7 @@ February 2023 {: .no_toc} * **Engine specs are now Firebolt-specific** - Firebolt engine spec names have changed from AWS EC2 names to Firebolt-specific names—for example, **M4**. This change simplifies engine specs and aligns them with Firebolt usage and deployment. This is the first step toward improving the overall engine selection and usage experience, allowing Firebolt to update underlying hardware more quickly and automatically. For more information, see [Working with engines](../working-with-engines/index.md). + Firebolt engine spec names have changed from AWS EC2 names to Firebolt-specific names—for example, **M4**. This change simplifies engine specs and aligns them with Firebolt usage and deployment. This is the first step toward improving the overall engine selection and usage experience, allowing Firebolt to update underlying hardware more quickly and automatically. For more information, see [Working with engines](../../working-with-engines/index.md). * **Expanded application of aggregating indexes** The query optimizer now uses aggregating indexes in more cases to improve performance. @@ -1145,7 +1145,7 @@ February 2023 * Fixed an issue where complex join conditions could fail when evaluating `NULL` values. -* Fixed an issue that caused [dropping partitions by date extraction](../working-with-partitions.md#partition-and-drop-by-date-extraction) to fail. +* Fixed an issue that caused [dropping partitions by date extraction](../../working-with-partitions.md#partition-and-drop-by-date-extraction) to fail. * Fixed an issue that caused `DROP AGGREGATING INDEX` to run slower than expected. @@ -1168,7 +1168,7 @@ February 2023 In the SQL workspace, you can now select a portion of an error message to copy. -![Select partial error message](../assets/images/relnote_select_partial_error.png) +![Select partial error message](../../assets/images/relnote_select_partial_error.png) ## March 15, 2022 @@ -1179,10 +1179,10 @@ In the SQL workspace, you can now select a portion of an error message to copy. {: .no_toc} * **Visual explain** - Use the new visual explain feature to analyze query execution plans. Different display formats and navigation options enhance your ability to quickly analyze and diagnose complex queries. For more information, see [Analyze query execution plans with visual explain](../using-the-sql-workspace/using-explain-to-analyze-query-execution.md). + Use the new visual explain feature to analyze query execution plans. Different display formats and navigation options enhance your ability to quickly analyze and diagnose complex queries. For more information, see [Analyze query execution plans with visual explain](../../using-the-sql-workspace/using-explain-to-analyze-query-execution.md). * **COPY TO statement (Beta)** - Use the new `COPY TO (Beta)` statement to export query results to an Amazon S3 location in CSV, TSV, JSON, or Parquet file formats. Configuration options allow you to choose file output options. For more information, see [COPY TO (Beta)](../sql-reference/commands/copy-to.md). + Use the new `COPY TO (Beta)` statement to export query results to an Amazon S3 location in CSV, TSV, JSON, or Parquet file formats. Configuration options allow you to choose file output options. For more information, see [COPY TO (Beta)](../../sql-reference/commands/copy-to.md). * **Firebolt CLI now available** Run SQL and manage databases and engines in Firebolt directly from the command line. Use interactive mode or invoke commands from scripts. For more information, see [firebolt-cli](https://pypi.org/project/firebolt-cli/) on PyPI. @@ -1195,13 +1195,13 @@ In the SQL workspace, you can now select a portion of an error message to copy. Provides a database driver for Node.js applications to connect to Firebolt and run queries more easily. For more information, see [Firebolt Node.js SDK](https://www.npmjs.com/package/firebolt-sdk) on npm. * **Information schema for views** - For more information, see [Information schema for views](/information-schema/views.md). + For more information, see [Information schema for views](../information-schema/views.md). * **Information schema for engines** - For more information, see [Information schema for engines](/information-schema/engines.md). + For more information, see [Information schema for engines](../information-schema/engines.md). * **Added `ATAN2(,)`** - Added the two-argument arc tangent function [ATAN2](../sql-reference/functions-reference/atan2.md). + Added the two-argument arc tangent function [ATAN2](../../sql-reference/functions-reference/atan2.md). ### Enhancements, changes, and resolved issues {: .no_toc} @@ -1213,7 +1213,7 @@ In the SQL workspace, you can now select a portion of an error message to copy. Firebolt now supports Parquet list fields with a period (`.`) in the name. In addition, Parquet nested lists are now supported. * **catalog.query_history limited to 14 days** - Queries older than 14 days are no longer available when querying [catalog.query_history](/information-schema/query-history-view.md). + Queries older than 14 days are no longer available when querying [catalog.query_history](../information-schema/query-history-view.md). * **Firebolt dbt adapter** * **Improved connection method** – The Firebolt dbt adapter now connects to Firebolt using the Python SDK instead of JDBC. JDBC and the JRE are no longer required. @@ -1381,7 +1381,7 @@ You can now use a keyboard shortcut to create a new script in the SQL workspace ### What’s new {: .no_toc} -* You can now quickly investigate statistics for query results in the SQL Workspace. Statistics such as the number of unique values, number of empty values, min/max/median and other quartiles, data ranges, top/bottom numbers, and more are available. Click the expansion arrow to the left of the header row to see statistics. For more information, see [Viewing query statistics with results](../using-the-sql-workspace/using-the-sql-workspace.md#viewing-query-statistics-with-results) in Firebolt documentation. +* You can now quickly investigate statistics for query results in the SQL Workspace. Statistics such as the number of unique values, number of empty values, min/max/median and other quartiles, data ranges, top/bottom numbers, and more are available. Click the expansion arrow to the left of the header row to see statistics. For more information, see [Viewing query statistics with results](../../using-the-sql-workspace/using-the-sql-workspace.md#viewing-query-statistics-with-results) in Firebolt documentation. * You can now sort and filter data values on any column in your query result-set in the SQL Workspace. diff --git a/docs/general-reference/timestampntz-data-type.md b/docs/general-reference/timestampntz-data-type.md index d6d97ae7..88f33920 100644 --- a/docs/general-reference/timestampntz-data-type.md +++ b/docs/general-reference/timestampntz-data-type.md @@ -18,7 +18,7 @@ This topic describes the Firebolt implementation of the `TIMESTAMP` data type. >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](./release-notes/release-notes-archive.md#db-version-322). * Topic ToC {:toc} diff --git a/docs/general-reference/timestamptz-data-type.md b/docs/general-reference/timestamptz-data-type.md index 51217b81..87b160ff 100644 --- a/docs/general-reference/timestamptz-data-type.md +++ b/docs/general-reference/timestamptz-data-type.md @@ -18,7 +18,7 @@ This topic describes the Firebolt implementation of the `TIMESTAMPTZ` data type. >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](legacy-date-timestamp.md), or instructions to reingest your data to use the new types [here](./release-notes/release-notes-archive.md#db-version-322). * Topic ToC {:toc} diff --git a/docs/sql-reference/functions-reference/current-date.md b/docs/sql-reference/functions-reference/current-date.md index 508fd1e8..83d4e94b 100644 --- a/docs/sql-reference/functions-reference/current-date.md +++ b/docs/sql-reference/functions-reference/current-date.md @@ -12,7 +12,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). # CURRENT_DATE diff --git a/docs/sql-reference/functions-reference/current-pgdate.md b/docs/sql-reference/functions-reference/current-pgdate.md index 39e453e0..2eba459e 100644 --- a/docs/sql-reference/functions-reference/current-pgdate.md +++ b/docs/sql-reference/functions-reference/current-pgdate.md @@ -14,7 +14,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use this function under the name [CURRENT_DATE()](./current-date.md). diff --git a/docs/sql-reference/functions-reference/current-timestamp.md b/docs/sql-reference/functions-reference/current-timestamp.md index 881889ad..ddca4dc1 100644 --- a/docs/sql-reference/functions-reference/current-timestamp.md +++ b/docs/sql-reference/functions-reference/current-timestamp.md @@ -15,7 +15,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation. - >If this query returns a result, you are already using the redesigned date and timestamp types and can use this function under the name [CURRENT_TIMESTAMPTZ()](./current-timestamptz.md), or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns a result, you are already using the redesigned date and timestamp types and can use this function under the name [CURRENT_TIMESTAMPTZ()](./current-timestamptz.md), or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). Returns the current year, month, day and time as a `TIMESTAMP` value, formatted as YYYY-MM-DD hh:mm:ss. diff --git a/docs/sql-reference/functions-reference/current-timestamptz.md b/docs/sql-reference/functions-reference/current-timestamptz.md index 8cc8d81d..3b87bd1d 100644 --- a/docs/sql-reference/functions-reference/current-timestamptz.md +++ b/docs/sql-reference/functions-reference/current-timestamptz.md @@ -12,7 +12,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). # CURRENT_TIMESTAMP diff --git a/docs/sql-reference/functions-reference/date-format.md b/docs/sql-reference/functions-reference/date-format.md index a9c4a5e8..12fbc15b 100644 --- a/docs/sql-reference/functions-reference/date-format.md +++ b/docs/sql-reference/functions-reference/date-format.md @@ -14,7 +14,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [TO_CHAR](./to-char-new.md) function instead. diff --git a/docs/sql-reference/functions-reference/date-trunc-new.md b/docs/sql-reference/functions-reference/date-trunc-new.md index 633aacb4..db4d2bd0 100644 --- a/docs/sql-reference/functions-reference/date-trunc-new.md +++ b/docs/sql-reference/functions-reference/date-trunc-new.md @@ -14,7 +14,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). Truncates a value (``) of type `PGDATE`, `TIMESTAMPNTZ`, or `TIMESTAMPTZ` to the selected precision (``). diff --git a/docs/sql-reference/functions-reference/date-trunc.md b/docs/sql-reference/functions-reference/date-trunc.md index 1a25776c..c76b4477 100644 --- a/docs/sql-reference/functions-reference/date-trunc.md +++ b/docs/sql-reference/functions-reference/date-trunc.md @@ -14,7 +14,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [DATE_TRUNC](./date-trunc-new.md) function instead. Truncates a value (``) of type `DATE`, `TIMESTAMP`, or `TIMESTAMPTZ` to the selected precision (``). diff --git a/docs/sql-reference/functions-reference/extract-new.md b/docs/sql-reference/functions-reference/extract-new.md index cb2c9d46..d5217cd5 100644 --- a/docs/sql-reference/functions-reference/extract-new.md +++ b/docs/sql-reference/functions-reference/extract-new.md @@ -14,7 +14,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). Retrieves the time unit, such as `year` or `hour`, from a `PGDATE`, `TIMESTAMPNTZ`, or `TIMESTAMPTZ` value. diff --git a/docs/sql-reference/functions-reference/extract.md b/docs/sql-reference/functions-reference/extract.md index 371b40f2..19d333bf 100644 --- a/docs/sql-reference/functions-reference/extract.md +++ b/docs/sql-reference/functions-reference/extract.md @@ -14,7 +14,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Retrieves the time unit, such as `year` or `hour`, from a `DATE`, `TIMESTAMP`, or `TIMESTAMPTZ` value. diff --git a/docs/sql-reference/functions-reference/index.md b/docs/sql-reference/functions-reference/index.md index b3bdceec..b874a82c 100644 --- a/docs/sql-reference/functions-reference/index.md +++ b/docs/sql-reference/functions-reference/index.md @@ -208,7 +208,7 @@ For more information about using Lambda functions, see [Manipulating arrays with >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to reingest your data to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to reingest your data to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). * [CURRENT_DATE](current-date.md) diff --git a/docs/sql-reference/functions-reference/to-char-new.md b/docs/sql-reference/functions-reference/to-char-new.md index 2578f0cf..e98125de 100644 --- a/docs/sql-reference/functions-reference/to-char-new.md +++ b/docs/sql-reference/functions-reference/to-char-new.md @@ -14,7 +14,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). Converts a value of type `DATE`, `TIMESTAMP`, or `TIMESTAMPTZ` to a formatted string. diff --git a/docs/sql-reference/functions-reference/to-char.md b/docs/sql-reference/functions-reference/to-char.md index 21e8ad84..3ee68b73 100644 --- a/docs/sql-reference/functions-reference/to-char.md +++ b/docs/sql-reference/functions-reference/to-char.md @@ -14,7 +14,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [TO_CHAR](./to-char-new.md) function instead. Converts a `TIMESTAMP` data type to a formatted string. diff --git a/docs/sql-reference/functions-reference/to-date-new.md b/docs/sql-reference/functions-reference/to-date-new.md index f5c74929..24c7ceca 100644 --- a/docs/sql-reference/functions-reference/to-date-new.md +++ b/docs/sql-reference/functions-reference/to-date-new.md @@ -14,7 +14,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). > >If you have not yet switched to the new timestamp types, this function is available under the name `TO_PGDATE`. diff --git a/docs/sql-reference/functions-reference/to-date.md b/docs/sql-reference/functions-reference/to-date.md index 9ba8ce21..e85c224e 100644 --- a/docs/sql-reference/functions-reference/to-date.md +++ b/docs/sql-reference/functions-reference/to-date.md @@ -14,7 +14,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [TO_DATE](./to-date-new.md) function instead. Converts a string to `DATE` type using optional formatting. diff --git a/docs/sql-reference/functions-reference/to-day-of-week.md b/docs/sql-reference/functions-reference/to-day-of-week.md index b4ec7662..ae85074c 100644 --- a/docs/sql-reference/functions-reference/to-day-of-week.md +++ b/docs/sql-reference/functions-reference/to-day-of-week.md @@ -14,7 +14,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a date or timestamp to a number representing the day of the week (Monday is 1, and Sunday is 7). diff --git a/docs/sql-reference/functions-reference/to-day-of-year.md b/docs/sql-reference/functions-reference/to-day-of-year.md index 8afe58e9..bbe606d4 100644 --- a/docs/sql-reference/functions-reference/to-day-of-year.md +++ b/docs/sql-reference/functions-reference/to-day-of-year.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a date or timestamp to a number containing the number for the day of the year. diff --git a/docs/sql-reference/functions-reference/to-hour.md b/docs/sql-reference/functions-reference/to-hour.md index d32370f0..91034531 100644 --- a/docs/sql-reference/functions-reference/to-hour.md +++ b/docs/sql-reference/functions-reference/to-hour.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a date or timestamp to a number containing the hour. diff --git a/docs/sql-reference/functions-reference/to-minute.md b/docs/sql-reference/functions-reference/to-minute.md index cee1fc8f..c96f1f7c 100644 --- a/docs/sql-reference/functions-reference/to-minute.md +++ b/docs/sql-reference/functions-reference/to-minute.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a timestamp (any date format we support) to a number containing the minute. diff --git a/docs/sql-reference/functions-reference/to-month.md b/docs/sql-reference/functions-reference/to-month.md index f649b1d5..7103268c 100644 --- a/docs/sql-reference/functions-reference/to-month.md +++ b/docs/sql-reference/functions-reference/to-month.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a date or timestamp (any date format we support) to a number containing the month. diff --git a/docs/sql-reference/functions-reference/to-quarter.md b/docs/sql-reference/functions-reference/to-quarter.md index ac94aaff..b9ccc9ce 100644 --- a/docs/sql-reference/functions-reference/to-quarter.md +++ b/docs/sql-reference/functions-reference/to-quarter.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a date or timestamp (any date format we support) to a number containing the quarter. diff --git a/docs/sql-reference/functions-reference/to-second.md b/docs/sql-reference/functions-reference/to-second.md index db7310b6..a7898e55 100644 --- a/docs/sql-reference/functions-reference/to-second.md +++ b/docs/sql-reference/functions-reference/to-second.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a timestamp (any date format we support) to a number containing the second. diff --git a/docs/sql-reference/functions-reference/to-timestamp-new.md b/docs/sql-reference/functions-reference/to-timestamp-new.md index 2bea0864..a39064ce 100644 --- a/docs/sql-reference/functions-reference/to-timestamp-new.md +++ b/docs/sql-reference/functions-reference/to-timestamp-new.md @@ -14,7 +14,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/egacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/egacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). Converts a string to `TIMESTAMPTZ` type (i.e., timestamp with time zone) using format. diff --git a/docs/sql-reference/functions-reference/to-timestamp.md b/docs/sql-reference/functions-reference/to-timestamp.md index 93f51c7e..3a929043 100644 --- a/docs/sql-reference/functions-reference/to-timestamp.md +++ b/docs/sql-reference/functions-reference/to-timestamp.md @@ -14,7 +14,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/egacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/egacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). Converts a string to `TIMESTAMPTZ` type (i.e., timestamp with time zone) using format. diff --git a/docs/sql-reference/functions-reference/to-timestamptz.md b/docs/sql-reference/functions-reference/to-timestamptz.md index abce7862..3f6a0235 100644 --- a/docs/sql-reference/functions-reference/to-timestamptz.md +++ b/docs/sql-reference/functions-reference/to-timestamptz.md @@ -14,7 +14,7 @@ parent: SQL functions >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. >If this query returns a result, you are using the redesigned date and timestamp types and can continue with this documentation. - >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are using the legacy date and timestamp types and can find [legacy documentation here](../../general-reference/legacy-date-timestamp.md#legacy-date-and-timestamp-functions), or instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). Converts the number of seconds since the Unix epoch to a `TIMESTAMPTZ` value. diff --git a/docs/sql-reference/functions-reference/to-unix-timestamp.md b/docs/sql-reference/functions-reference/to-unix-timestamp.md index 9d71b2a1..cca7b85a 100644 --- a/docs/sql-reference/functions-reference/to-unix-timestamp.md +++ b/docs/sql-reference/functions-reference/to-unix-timestamp.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a string to a UNIX timestamp. diff --git a/docs/sql-reference/functions-reference/to-unixtime.md b/docs/sql-reference/functions-reference/to-unixtime.md index 7d0a6a4f..99c54704 100644 --- a/docs/sql-reference/functions-reference/to-unixtime.md +++ b/docs/sql-reference/functions-reference/to-unixtime.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. For `DATETIME` arguments: this function converts the value to its internal numeric representation (Unix Timestamp). For `TEXT` arguments: this function parses `DATETIME` from a string and returns the corresponding Unix timestamp. diff --git a/docs/sql-reference/functions-reference/to-week.md b/docs/sql-reference/functions-reference/to-week.md index 9ec09a1b..2846c9a8 100644 --- a/docs/sql-reference/functions-reference/to-week.md +++ b/docs/sql-reference/functions-reference/to-week.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a date or timestamp to a number representing the week. This function defines week 1 of a calendar year as the first full week of a calendar year starting on a Sunday. diff --git a/docs/sql-reference/functions-reference/to-weekiso.md b/docs/sql-reference/functions-reference/to-weekiso.md index 5d01f1f6..d558d462 100644 --- a/docs/sql-reference/functions-reference/to-weekiso.md +++ b/docs/sql-reference/functions-reference/to-weekiso.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts any supported date or timestamp data type to a number representing the week of the year. This function adheres to the [ISO 8601](https://www.wikipedia.org/wiki/ISO_week_date) standards for numbering weeks, meaning week 1 of a calendar year is the first week with 4 or more days in that year. diff --git a/docs/sql-reference/functions-reference/to-year.md b/docs/sql-reference/functions-reference/to-year.md index 4f7f53cc..2fb06e7e 100644 --- a/docs/sql-reference/functions-reference/to-year.md +++ b/docs/sql-reference/functions-reference/to-year.md @@ -13,7 +13,7 @@ parent: SQL functions > >If you worked with Firebolt before DB version 3.22, you might still be using the legacy date and timestamp types. >Determine which types you are using by executing the query `SELECT EXTRACT(CENTURY FROM DATE '2023-03-16');`. - >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../release-notes/release-notes-archive.html#db-version-322). + >If this query returns an error, you are still using the legacy date and timestamp types and can continue with this documentation, or find instructions to use the new types [here](../../general-reference/release-notes/release-notes-archive.md#db-version-322). >If this query returns a result, you are already using the redesigned date and timestamp types and can use the [EXTRACT](./extract-new.md) function instead. Converts a date or timestamp (any date format we support) to a number containing the year. diff --git a/scripts/_common.sh b/scripts/_common.sh new file mode 100644 index 00000000..9b678ca5 --- /dev/null +++ b/scripts/_common.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +set -euo pipefail + +SIGINT_SIGNO=$(kill -l SIGINT) + +function _cleanup() { + trap - EXIT SIGINT SIGTERM + local root_dir="${1?}" + local tmp_file="${2?}" + local exit_code="${3?}" + shift + local compose_dir="$root_dir/scripts/docker" + local compose_file="$compose_dir/compose.yml" + ( + cd "$root_dir" + if [[ "$exit_code" != 0 ]]; then + /bin/echo -e "\n\n## Jekyll logs ##########################################\n" + docker ps -q -a --filter "label=log-filter=firebolt-docs-staging" --latest | xargs -n 1 docker logs -t --details + fi + docker compose -f "$compose_file" --env-file "$tmp_file" down + rm "$tmp_file" + ) + if [[ "$exit_code" == $(( SIGINT_SIGNO + 128 )) ]]; + then exit 0 + fi +} + +function _base_compose() { + local root_dir="${1?}" + shift + local compose_dir="$root_dir/scripts/docker" + local compose_file="$compose_dir/compose.yml" + + ( + cd "$root_dir" + local tmp_file + tmp_file=$(mktemp) + cat < "$tmp_file" +USER_ID=$(id -u) +USER_NAME=$(id -un) +EOF + trap '_cleanup "$root_dir" "$tmp_file" "$?"' SIGINT SIGTERM EXIT + docker compose -f "$compose_file" --env-file "$tmp_file" --project-directory "$root_dir" "$@" + ) +} + +function build_all() { + local root_dir="${1?}" + shift + _base_compose "$root_dir" build "$@" +} + +function run() { + local root_dir="${1?}" + shift + _base_compose "$root_dir" run --rm --remove-orphans "$@" +} diff --git a/scripts/check-links.sh b/scripts/check-links.sh new file mode 100755 index 00000000..c5024a1a --- /dev/null +++ b/scripts/check-links.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -euo pipefail + +# Function to resolve real paths using readlink +resolve_path() { + local path="$1" + cd "$(dirname "$path")" + echo "$(pwd -P)/$(basename "$path")" +} + +SCRIPT_DIR="$(resolve_path "${BASH_SOURCE[0]}")" +SCRIPT_DIR="$(dirname "$SCRIPT_DIR")" +ROOT_DIR="$(resolve_path "${SCRIPT_DIR}/..")" + +. "$SCRIPT_DIR/_common.sh" +build_all "$ROOT_DIR" -q >& 2 +run "$ROOT_DIR" link-check diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile new file mode 100644 index 00000000..0977bde4 --- /dev/null +++ b/scripts/docker/Dockerfile @@ -0,0 +1,27 @@ +FROM ruby:3.2.4-slim-bookworm +RUN apt update -q && apt install -q -y --no-install-recommends build-essential ruby-dev curl + +#FROM ruby:3.2.4-alpine +#RUN apk add build-base bash curl + +WORKDIR /www/docs +COPY docs/Gemfile docs/Gemfile.lock ./ +RUN bundle install --quiet + +ARG user_id +ARG user_name + +RUN adduser --system --uid $user_id $user_name && chown -R "$user_name" /www +USER $user_name + +COPY docs /www/docs + +ARG host +ARG port +ARG repo_url + +ENV PAGES_REPO_NWO=$repo_url +ENV JK_HOST=$host +ENV JK_PORT=$port +ENV JK_GARBAGE_COLLECT="rm -rf /www/docs/_site /www/docs/.jekyll-metadata" +CMD bash -c "trap '$JK_GARBAGE_COLLECT' EXIT SIGINT SIGTERM; bundle exec jekyll serve -H $JK_HOST -P $JK_PORT --incremental --config _config.yml" diff --git a/scripts/docker/compose.yml b/scripts/docker/compose.yml new file mode 100644 index 00000000..608bc7e1 --- /dev/null +++ b/scripts/docker/compose.yml @@ -0,0 +1,41 @@ +version: '3.8' + +services: + docs-server: + labels: + log-filter: firebolt-docs-staging + build: &build-firebolt-docs + context: . + args: &build-args-firebolt-docs + host: docs-server + port: 80 + user_id: "${USER_ID}" + user_name: "${USER_NAME}" + repo_url: git@github.com/firebolt-analytics/firebolt-docs-staging.git + dockerfile: ./scripts/docker/Dockerfile + healthcheck: + test: "curl -f http://localhost >/dev/null || exit 1" + interval: 15s + retries: 40 + extra_hosts: + - "docs-server:0.0.0.0" + + link-check: + image: raviqqe/muffet:2.10.2 + command: ["--color=never", "--max-response-body-size=100000000", "--include=http://docs-server", "http://docs-server"] + depends_on: + docs-server: + condition: service_healthy + + localhost-firebolt-docs: + build: + <<: *build-firebolt-docs + args: + <<: *build-args-firebolt-docs + host: 0.0.0.0 + port: 8080 + ports: + - "8080:8080" + extra_hosts: + - "localhost:127.0.0.1" + diff --git a/scripts/start-local.sh b/scripts/start-local.sh new file mode 100755 index 00000000..4fbc99aa --- /dev/null +++ b/scripts/start-local.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -euo pipefail + +# Function to resolve real paths using readlink +resolve_path() { + local path="$1" + cd "$(dirname "$path")" + echo "$(pwd -P)/$(basename "$path")" +} + +SCRIPT_DIR="$(resolve_path "${BASH_SOURCE[0]}")" +SCRIPT_DIR="$(dirname "$SCRIPT_DIR")" +ROOT_DIR="$(resolve_path "${SCRIPT_DIR}/..")" + +. "$SCRIPT_DIR/_common.sh" + +run "$ROOT_DIR" --build -P -v "$ROOT_DIR:/www" localhost-firebolt-docs