diff --git a/website/blog/2023-12-15-serverless-free-tier-data-stack-with-dlt-and-dbt-core.md b/website/blog/2023-12-15-serverless-free-tier-data-stack-with-dlt-and-dbt-core.md index 7e63b6e1c6d..d2c6652d883 100644 --- a/website/blog/2023-12-15-serverless-free-tier-data-stack-with-dlt-and-dbt-core.md +++ b/website/blog/2023-12-15-serverless-free-tier-data-stack-with-dlt-and-dbt-core.md @@ -7,7 +7,7 @@ authors: [euan_johnston] hide_table_of_contents: false -date: 2023-01-15 +date: 2024-01-15 is_featured: false --- diff --git a/website/docs/docs/core/connect-data-platform/profiles.yml.md b/website/docs/docs/core/connect-data-platform/profiles.yml.md index f8acb65f3d2..c9a66010a50 100644 --- a/website/docs/docs/core/connect-data-platform/profiles.yml.md +++ b/website/docs/docs/core/connect-data-platform/profiles.yml.md @@ -31,6 +31,9 @@ This section identifies the parts of your `profiles.yml` that aren't specific to [fail_fast](/reference/global-configs/failing-fast): [use_experimental_parser](/reference/global-configs/parsing): [static_parser](/reference/global-configs/parsing): + [cache_selected_only](/reference/global-configs/cache): + [printer_width](/reference/global-configs/print-output#printer-width): + [log_format](/reference/global-configs/logs): : target: # this is the default target diff --git a/website/docs/reference/node-selection/syntax.md b/website/docs/reference/node-selection/syntax.md index 22946903b7d..61b53ea5ebd 100644 --- a/website/docs/reference/node-selection/syntax.md +++ b/website/docs/reference/node-selection/syntax.md @@ -158,7 +158,6 @@ If both the flag and env var are provided, the flag takes precedence. #### Notes: - The `--state` artifacts must be of schema versions that are compatible with the currently running dbt version. -- The path to state artifacts can be set via the `--state` flag or `DBT_ARTIFACT_STATE_PATH` environment variable. If both the flag and env var are provided, the flag takes precedence. - These are powerful, complex features. Read about [known caveats and limitations](/reference/node-selection/state-comparison-caveats) to state comparison. ### The "result" status @@ -174,7 +173,7 @@ The following dbt commands produce `run_results.json` artifacts whose results ca After issuing one of the above commands, you can reference the results by adding a selector to a subsequent command as follows: ```bash -# You can also set the DBT_ARTIFACT_STATE_PATH environment variable instead of the --state flag. +# You can also set the DBT_STATE environment variable instead of the --state flag. dbt run --select "result: --defer --state path/to/prod/artifacts" ``` diff --git a/website/docs/reference/resource-properties/freshness.md b/website/docs/reference/resource-properties/freshness.md index f332f5a1b8f..0b017991d68 100644 --- a/website/docs/reference/resource-properties/freshness.md +++ b/website/docs/reference/resource-properties/freshness.md @@ -37,6 +37,38 @@ A freshness block is used to define the acceptable amount of time between the mo In the `freshness` block, one or both of `warn_after` and `error_after` can be provided. If neither is provided, then dbt will not calculate freshness snapshots for the tables in this source. + + +In most cases, the `loaded_at_field` is required. Some adapters support calculating source freshness from the warehouse metadata tables and can exclude the `loaded_at_field`. + +If a source has a `freshness:` block, dbt will attempt to calculate freshness for that source: +- If a `loaded_at_field` is provided, dbt will calculate freshness via a select query (behavior prior to v1.7). +- If a `loaded_at_field` is _not_ provided, dbt will calculate freshness via warehouse metadata tables when possible (new in v1.7 on supported adapters). + +Currently, calculating freshness from warehouse metadata tables is supported on: +- [Snowflake](/reference/resource-configs/snowflake-configs) + +Support is coming soon to the following adapters: +- [Redshift](/reference/resource-configs/redshift-configs) +- [BigQuery](/reference/resource-configs/bigquery-configs) +- [Spark](/reference/resource-configs/spark-configs) + +Freshness blocks are applied hierarchically: +- a `freshness` and `loaded_at_field` property added to a source will be applied to all all tables defined in that source +- a `freshness` and `loaded_at_field` property added to a source _table_ will override any properties applied to the source. + +This is useful when all of the tables in a source have the same `loaded_at_field`, as is often the case. + +To exclude a source from freshness calculations, you have two options: +- Don't add a `freshness:` block. +- Explicitly set `freshness: null`. + +## loaded_at_field +(Optional on adapters that support pulling freshness from warehouse metadata tables, required otherwise.) + + + + Additionally, the `loaded_at_field` is required to calculate freshness for a table. If a `loaded_at_field` is not provided, then dbt will not calculate freshness for the table. Freshness blocks are applied hierarchically: @@ -47,7 +79,7 @@ This is useful when all of the tables in a source have the same `loaded_at_field ## loaded_at_field (Required) - + A column name (or expression) that returns a timestamp indicating freshness. If using a date field, you may have to cast it to a timestamp: diff --git a/website/src/components/detailsToggle/index.js b/website/src/components/detailsToggle/index.js index 076d053846c..d1ee63c8a38 100644 --- a/website/src/components/detailsToggle/index.js +++ b/website/src/components/detailsToggle/index.js @@ -3,33 +3,49 @@ import styles from './styles.module.css'; function detailsToggle({ children, alt_header = null }) { const [isOn, setOn] = useState(false); - const [hoverActive, setHoverActive] = useState(true); + const [isScrolling, setIsScrolling] = useState(false); // New state to track scrolling const [hoverTimeout, setHoverTimeout] = useState(null); const handleToggleClick = () => { - setHoverActive(true); // Disable hover when clicked setOn(current => !current); // Toggle the current state -}; - -const handleMouseEnter = () => { - if (isOn) return; // Ignore hover if already open - setHoverActive(true); // Enable hover - const timeout = setTimeout(() => { - if (hoverActive) setOn(true); - }, 500); - setHoverTimeout(timeout); -}; - -const handleMouseLeave = () => { - if (!isOn) { + }; + + const handleMouseEnter = () => { + if (isOn || isScrolling) return; // Ignore hover if already open or if scrolling + const timeout = setTimeout(() => { + if (!isScrolling) setOn(true); + }, 700); // + setHoverTimeout(timeout); + }; + + const handleMouseLeave = () => { + if (!isOn) { clearTimeout(hoverTimeout); setOn(false); - } -}; + } + }; + + const handleScroll = () => { + setIsScrolling(true); + clearTimeout(hoverTimeout); + setOn(false); + + // Reset scrolling state after a delay + setTimeout(() => { + setIsScrolling(false); + }, 800); + }; + + useEffect(() => { + window.addEventListener('scroll', handleScroll); + return () => { + window.removeEventListener('scroll', handleScroll); + }; + }, []); -useEffect(() => { - return () => clearTimeout(hoverTimeout); -}, [hoverTimeout]); + useEffect(() => { + return () => clearTimeout(hoverTimeout); + }, [hoverTimeout]); return (