You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/use-cases/AI_ML/data-exploration/marimo-notebook.md
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ Then click `Import dataset`:
58
58
59
59
ClickHouse will automatically create the `pp_complete` table in the `default` database and fill the table with 28.92 million rows of price point data.
60
60
61
-
In order to reduce the likelihood of exposing your credentials, we recommend to add your Cloud username and password as environment variables on your local machine.
61
+
In order to reduce the likelihood of exposing your credentials, we recommend you add your Cloud username and password as environment variables on your local machine.
62
62
From a terminal run the following command to add your username and password as environment variables:
63
63
64
64
### Setting up credentials {#setting-up-credentials}
@@ -125,11 +125,8 @@ You should see the result shown underneath the cell you just ran:
125
125
## Exploring the data {#exploring-the-data}
126
126
127
127
With the UK price paid data set up and chDB up and running in a Marimo notebook, we can now get started exploring our data.
128
-
129
128
Let's imagine we are interested in checking how price has changed with time for a specific area in the UK such as the capital city, London.
130
-
131
-
ClickHouse's [remoteSecure](/docs/sql-reference/table-functions/remote) function allows you to easily retrieve the data from ClickHouse Cloud.
132
-
129
+
ClickHouse's [`remoteSecure`](/docs/sql-reference/table-functions/remote) function allows you to easily retrieve the data from ClickHouse Cloud.
133
130
You can instruct chDB to return this data in process as a Pandas data frame - which is a convenient and familiar way of working with data.
134
131
135
132
### Querying ClickHouse Cloud data {#querying-clickhouse-cloud-data}
@@ -159,7 +156,7 @@ df.head()
159
156
160
157
In the snippet above, `chdb.query(query, "DataFrame")` runs the specified query and outputs the result as a Pandas DataFrame.
161
158
162
-
In the query we are using the `remoteSecure` function to connect to ClickHouse Cloud.
159
+
In the query we are using the [`remoteSecure`](/sql-reference/table-functions/remote) function to connect to ClickHouse Cloud.
163
160
164
161
The `remoteSecure` functions takes as parameters:
165
162
- a connection string
@@ -170,11 +167,9 @@ The `remoteSecure` functions takes as parameters:
170
167
As a security best practice, you should prefer using environment variables for the username and password parameters rather than specifying them directly in the function, although this is possible if you wish.
171
168
172
169
The `remoteSecure` function connects to the remote ClickHouse Cloud service, runs the query and returns the result.
173
-
174
170
Depending on the size of your data, this could take a few seconds.
175
171
176
172
In this case we return an average price point per year, and filter by `town='LONDON'`.
177
-
178
173
The result is then stored as a DataFrame in a variable called `df`.
0 commit comments