Skip to content

Commit 4a5251f

Browse files
github-automation-metabaseMetabase Docs bot
andauthored
[auto] adding content to emb-691-adjust-rspack-configs->master (#392)
Co-authored-by: Metabase Docs bot <[email protected]>
1 parent c3f1239 commit 4a5251f

File tree

8 files changed

+5438
-8
lines changed

8 files changed

+5438
-8
lines changed

_docs/master/developers-guide/devenv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ There is also an option to reload changes on save without hot reloading if you p
8888
$ yarn build-watch
8989
```
9090

91-
Some systems may have trouble detecting changes to frontend files. You can enable filesystem polling by uncommenting the `watchOptions` clause in `webpack.config.js`. If you do this it may be worth making git ignore changes to webpack config, using `git update-index --assume-unchanged webpack.config.js`
91+
Some systems may have trouble detecting changes to frontend files. You can enable filesystem polling by uncommenting the `watchOptions` clause in `rspack.main.config.js`. If you do this it may be worth making git ignore changes to webpack config, using `git update-index --assume-unchanged rspack.main.config.js`
9292

9393
We exclude ESLint loader in dev mode for seven times quicker initial builds by default. You can enable it by exporting an environment variable:
9494

_docs/master/embedding/sdk/upgrade.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
version: master
3+
has_magic_breadcrumbs: true
4+
show_category_breadcrumb: true
5+
show_title_breadcrumb: true
6+
category: Embedding
7+
title: 'Upgrading Metabase and the Embedded analytics SDK'
8+
source_url: 'https://github.com/metabase/metabase/blob/master/docs/embedding/sdk/upgrade.md'
9+
layout: new-docs
10+
summary: 'How to upgrade your Metabase and Embedded analytics SDK versions, test the changes, and check for breaking changes that might affect your app.'
11+
---
12+
13+
# Upgrading Metabase and the Embedded analytics SDK
14+
15+
Here's a basic overview of the steps you'll want to take when upgrading your SDK.
16+
17+
## 1. Read the release post and changelog for both Metabase and the Embedded analytics SDK
18+
19+
- [Release posts](/releases) give a good overview of what's in each release, and call out breaking changes (which are rare).
20+
- [Metabase changelogs](/changelog) list Metabase changes.
21+
- [Embedded analytics SDK changelogs](/changelog/55) list changes specific to the SDK package.
22+
23+
Check for any relevant changes, especially breaking changes that require you to update your application's code. If there are breaking changes, we'll have docs that'll walk you through what changes you'll need to make and why.
24+
25+
## 2. Test the upgrade
26+
27+
When upgrading to a new major version, you'll want to upgrade both Metabase and the SDK version in parallel, as having Metabase and the SDK major versions out of sync can cause errors.
28+
29+
### Spin up the new version of Metabase for testing
30+
31+
You can do this locally or in a dev instance. If your testing setup involves a lot of test user accounts, getting a [development instance](../../installation-and-operation/development-instance) could be more cost-effective.
32+
33+
See [upgrading Metabase](../../installation-and-operation/upgrading-metabase).
34+
35+
### Upgrade the SDK with npm or yarn
36+
37+
You'll want to test the changes locally first, as there may be breaking changes that require you to upgrade your application code.
38+
39+
Check out a new branch in your application and install the next stable version, either with npm or yarn:
40+
41+
Via npm:
42+
43+
```bash
44+
npm install @metabase/embedding-sdk-react@{next-major-version-number}-stable
45+
```
46+
47+
For example, if you were upgrading to version 55 of the SDK:
48+
49+
```bash
50+
npm install @metabase/embedding-sdk-react@55-stable
51+
```
52+
53+
If you're using yarn:
54+
55+
```bash
56+
yarn add @metabase/embedding-sdk-react@{next-major-version-number}-stable
57+
```
58+
59+
See more on [SDK versions](./version).
60+
61+
### If there are breaking changes, make the necessary changes to your application code
62+
63+
Breaking changes are rare, but if you do need to make changes, we'll mention it in the release notes for the new major version and have docs that walk you through the changes.
64+
65+
Update or add tests for any application code changes that you make.
66+
67+
### Deploy to your staging environment
68+
69+
Before deploying your app to your staging environment, make sure you've tested your app locally (manually, as well as running any automated tests).
70+
71+
If all goes well with your local tests, deploy to your staging environment. Check that the Metabase embeds in your staging app are still working as expected, and perform any other testing you normally do with your application with respect to your embedded analytics.
72+
73+
## 3. Deploy to production
74+
75+
If everything is working in staging, you're ready to deploy to production.
76+
77+
Be sure to deploy your application changes and upgrade your Metabase in parallel so that the SDK version and the Metabase version stay in sync.
78+
79+
### If your instance is on Metabase Cloud, you'll need to request an upgrade
80+
81+
If you're on Metabase Cloud, your instance version is pinned, so you'll need to request an upgrade by [contacting support](/help-premium).
82+
83+
We'll coordinate with you so that your instance is upgraded when you deploy the changes to your application.
Binary file not shown.

_docs/master/questions/query-builder/expressions-list.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ For an introduction to expressions, check out the [overview of custom expression
6464
- [concat](./expressions/concat)
6565
- [contains](#contains)
6666
- [date](#date)
67+
- [datetime](#datetime)
6768
- [doesNotContain](#doesnotcontain)
6869
- [domain](#domain)
6970
- [endsWith](#endswith)
@@ -107,6 +108,8 @@ For an introduction to expressions, check out the [overview of custom expression
107108
- [quarterName](#quartername)
108109
- [relativeDateTime](#relativedatetime)
109110
- [second](#second)
111+
- [timeSpan](#timespan)
112+
- [today](#today)
110113
- [week](#week)
111114
- [weekday](#weekday)
112115
- [year](#year)
@@ -434,7 +437,7 @@ Example: `sqrt([Hypotenuse])`.
434437

435438
Databases that don't support `sqrt`: SQLite.
436439

437-
Related: [Power](#power).
440+
Related: [power](#power).
438441

439442
## String functions
440443

@@ -501,9 +504,12 @@ Related: [datetime](#datetime)
501504

502505
> Available on PostgreSQL, MySQL/MariaDB, BigQuery, Redshift, ClickHouse, and Snowflake
503506
504-
Converts a datetime string to a datetime.
507+
Converts a datetime string or bytes to a datetime.
505508

506-
Syntax: `datetime(column)`
509+
Syntax: `datetime(value, mode)`
510+
511+
- `value`: The string, bytes, or number to convert to a datetime.
512+
- `mode`: Optional. The mode indicating the format. One of: `"simple"`, `"iso"`, `"simpleBytes"`, `"isoBytes"`, `"unixSeconds"`, `"unixMilliseconds"`, `"unixMicroseconds"`, `"unixNanoseconds"`. Default is `"iso"`.
507513

508514
Example: `datetime("2025-03-20 12:45:04")`
509515

@@ -938,6 +944,16 @@ Syntax: `timeSpan(number, text)`
938944

939945
Example: `[Orders → Created At] + timeSpan(7, "day")` will return the date 7 days after the `Created At` date.
940946

947+
### today
948+
949+
Returns the current date (without time).
950+
951+
Syntax: `today()`
952+
953+
Example: `today()` would return the current date, such as `2025-05-04`.
954+
955+
Related: [now](#now).
956+
941957
### [week](./expressions/week)
942958

943959
Takes a datetime and returns the week as an integer.

_site/docs/master/developers-guide/devenv.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4917,7 +4917,7 @@ <h2 id="frontend-development">Frontend development</h2>
49174917
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>yarn build-watch
49184918
</code></pre></div></div>
49194919

4920-
<p>Some systems may have trouble detecting changes to frontend files. You can enable filesystem polling by uncommenting the <code class="language-plaintext highlighter-rouge">watchOptions</code> clause in <code class="language-plaintext highlighter-rouge">webpack.config.js</code>. If you do this it may be worth making git ignore changes to webpack config, using <code class="language-plaintext highlighter-rouge">git update-index --assume-unchanged webpack.config.js</code></p>
4920+
<p>Some systems may have trouble detecting changes to frontend files. You can enable filesystem polling by uncommenting the <code class="language-plaintext highlighter-rouge">watchOptions</code> clause in <code class="language-plaintext highlighter-rouge">rspack.main.config.js</code>. If you do this it may be worth making git ignore changes to webpack config, using <code class="language-plaintext highlighter-rouge">git update-index --assume-unchanged rspack.main.config.js</code></p>
49214921

49224922
<p>We exclude ESLint loader in dev mode for seven times quicker initial builds by default. You can enable it by exporting an environment variable:</p>
49234923

0 commit comments

Comments
 (0)