Skip to content

Commit 84ea04e

Browse files
authored
Merge branch 'current' into mwong-hover-images
2 parents eb22883 + 4c84b81 commit 84ea04e

File tree

5 files changed

+74
-24
lines changed

5 files changed

+74
-24
lines changed

website/blog/2023-12-15-serverless-free-tier-data-stack-with-dlt-and-dbt-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors: [euan_johnston]
77

88
hide_table_of_contents: false
99

10-
date: 2023-01-15
10+
date: 2024-01-15
1111
is_featured: false
1212
---
1313

website/docs/docs/core/connect-data-platform/profiles.yml.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ This section identifies the parts of your `profiles.yml` that aren't specific to
3131
[fail_fast](/reference/global-configs/failing-fast): <true | false>
3232
[use_experimental_parser](/reference/global-configs/parsing): <true | false>
3333
[static_parser](/reference/global-configs/parsing): <true | false>
34+
[cache_selected_only](/reference/global-configs/cache): <true | false>
35+
[printer_width](/reference/global-configs/print-output#printer-width): <integer>
36+
[log_format](/reference/global-configs/logs): <text | json | default>
3437

3538
<profile-name>:
3639
target: <target-name> # this is the default target

website/docs/reference/node-selection/syntax.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ If both the flag and env var are provided, the flag takes precedence.
158158

159159
#### Notes:
160160
- The `--state` artifacts must be of schema versions that are compatible with the currently running dbt version.
161-
- 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.
162161
- These are powerful, complex features. Read about [known caveats and limitations](/reference/node-selection/state-comparison-caveats) to state comparison.
163162

164163
### The "result" status
@@ -174,7 +173,7 @@ The following dbt commands produce `run_results.json` artifacts whose results ca
174173
After issuing one of the above commands, you can reference the results by adding a selector to a subsequent command as follows:
175174

176175
```bash
177-
# You can also set the DBT_ARTIFACT_STATE_PATH environment variable instead of the --state flag.
176+
# You can also set the DBT_STATE environment variable instead of the --state flag.
178177
dbt run --select "result:<status> --defer --state path/to/prod/artifacts"
179178
```
180179

website/docs/reference/resource-properties/freshness.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,38 @@ A freshness block is used to define the acceptable amount of time between the mo
3737

3838
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.
3939

40+
<VersionBlock firstVersion="1.7">
41+
42+
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`.
43+
44+
If a source has a `freshness:` block, dbt will attempt to calculate freshness for that source:
45+
- If a `loaded_at_field` is provided, dbt will calculate freshness via a select query (behavior prior to v1.7).
46+
- 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).
47+
48+
Currently, calculating freshness from warehouse metadata tables is supported on:
49+
- [Snowflake](/reference/resource-configs/snowflake-configs)
50+
51+
Support is coming soon to the following adapters:
52+
- [Redshift](/reference/resource-configs/redshift-configs)
53+
- [BigQuery](/reference/resource-configs/bigquery-configs)
54+
- [Spark](/reference/resource-configs/spark-configs)
55+
56+
Freshness blocks are applied hierarchically:
57+
- a `freshness` and `loaded_at_field` property added to a source will be applied to all all tables defined in that source
58+
- a `freshness` and `loaded_at_field` property added to a source _table_ will override any properties applied to the source.
59+
60+
This is useful when all of the tables in a source have the same `loaded_at_field`, as is often the case.
61+
62+
To exclude a source from freshness calculations, you have two options:
63+
- Don't add a `freshness:` block.
64+
- Explicitly set `freshness: null`.
65+
66+
## loaded_at_field
67+
(Optional on adapters that support pulling freshness from warehouse metadata tables, required otherwise.)
68+
</VersionBlock>
69+
70+
<VersionBlock lastVersion="1.6">
71+
4072
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.
4173

4274
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
4779

4880
## loaded_at_field
4981
(Required)
50-
82+
</VersionBlock>
5183
A column name (or expression) that returns a timestamp indicating freshness.
5284

5385
If using a date field, you may have to cast it to a timestamp:

website/src/components/detailsToggle/index.js

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,49 @@ import styles from './styles.module.css';
33

44
function detailsToggle({ children, alt_header = null }) {
55
const [isOn, setOn] = useState(false);
6-
const [hoverActive, setHoverActive] = useState(true);
6+
const [isScrolling, setIsScrolling] = useState(false); // New state to track scrolling
77
const [hoverTimeout, setHoverTimeout] = useState(null);
88

99
const handleToggleClick = () => {
10-
setHoverActive(true); // Disable hover when clicked
1110
setOn(current => !current); // Toggle the current state
12-
};
13-
14-
const handleMouseEnter = () => {
15-
if (isOn) return; // Ignore hover if already open
16-
setHoverActive(true); // Enable hover
17-
const timeout = setTimeout(() => {
18-
if (hoverActive) setOn(true);
19-
}, 500);
20-
setHoverTimeout(timeout);
21-
};
22-
23-
const handleMouseLeave = () => {
24-
if (!isOn) {
11+
};
12+
13+
const handleMouseEnter = () => {
14+
if (isOn || isScrolling) return; // Ignore hover if already open or if scrolling
15+
const timeout = setTimeout(() => {
16+
if (!isScrolling) setOn(true);
17+
}, 700); //
18+
setHoverTimeout(timeout);
19+
};
20+
21+
const handleMouseLeave = () => {
22+
if (!isOn) {
2523
clearTimeout(hoverTimeout);
2624
setOn(false);
27-
}
28-
};
25+
}
26+
};
27+
28+
const handleScroll = () => {
29+
setIsScrolling(true);
30+
clearTimeout(hoverTimeout);
31+
setOn(false);
32+
33+
// Reset scrolling state after a delay
34+
setTimeout(() => {
35+
setIsScrolling(false);
36+
}, 800);
37+
};
38+
39+
useEffect(() => {
40+
window.addEventListener('scroll', handleScroll);
41+
return () => {
42+
window.removeEventListener('scroll', handleScroll);
43+
};
44+
}, []);
2945

30-
useEffect(() => {
31-
return () => clearTimeout(hoverTimeout);
32-
}, [hoverTimeout]);
46+
useEffect(() => {
47+
return () => clearTimeout(hoverTimeout);
48+
}, [hoverTimeout]);
3349

3450
return (
3551
<div className='detailsToggle'>

0 commit comments

Comments
 (0)