Skip to content

Commit 3b1bcd7

Browse files
Daniel Illenbergergitbook-bot
authored andcommitted
GITBOOK-119: No subject
1 parent f4e833f commit 3b1bcd7

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

pgml-cms/docs/introduction/apis/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## Introduction
44

5-
PostgresML adds extensions to the PostgreSQL database, as well as providing separate Client SDKs in JavaScript and Python that leverage the database to implement common ML & AI use cases. 
5+
PostgresML adds extensions to the PostgreSQL database, as well as providing separate Client SDKs in JavaScript and Python that leverage the database to implement common ML & AI use cases.
66

7-
The extensions provide all of the ML & AI functionality via SQL APIs, like training and inference. They are designed to be used directly for all ML practitioners who implement dozens of different use cases on their own machine learning models. 
7+
The extensions provide all of the ML & AI functionality via SQL APIs, like training and inference. They are designed to be used directly for all ML practitioners who implement dozens of different use cases on their own machine learning models.
88

99
We also provide Client SDKs that implement the best practices on top of the SQL APIs, to ease adoption and implement common application use cases in applications, like chatbots or search engines.
1010

1111
## SQL Extensions
1212

13-
Postgres is designed to be _**extensible**_. This has created a rich open-source ecosystem of additional functionality built around the core project. Some [extensions](https://www.postgresql.org/docs/current/contrib.html) are include in the base Postgres distribution, but others are also available via the [PostgreSQL Extension Network](https://pgxn.org/). \
13+
Postgres is designed to be _**extensible**_. This has created a rich open-source ecosystem of additional functionality built around the core project. Some [extensions](https://www.postgresql.org/docs/current/contrib.html) are include in the base Postgres distribution, but others are also available via the [PostgreSQL Extension Network](https://pgxn.org/).\
1414
\
1515
There are 2 foundational extensions included in a PostgresML deployment that provide functionality inside the database through SQL APIs.
1616

@@ -27,8 +27,3 @@ These SDKs delegate all work to the extensions running in the database, which mi
2727

2828
Learn more about developing with the [client-sdks](client-sdks/ "mention")
2929

30-
31-
32-
33-
34-
##

pgml-cms/docs/introduction/getting-started/import-your-data/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Machine learning always depends on input data, whether it's generating text with pretrained LLMs, training a retention model on customer data, or predicting session abandonment in real time. Just like any PostgreSQL database, PostgresML can be configured as the authoritative application data store, a streaming replica from some other primary, or use foreign data wrappers to query another data host on demand. Depending on how frequently your data changes and where your authoritative data resides, different methodologies imply different tradeoffs.
44

5-
PostgresML can easily ingest data from your existing data stores. 
5+
PostgresML can easily ingest data from your existing data stores.
66

77
## Static data
88

@@ -20,4 +20,3 @@ Importing data from online databases can be done with foreign data wrappers. Hos
2020
[foreign-data-wrapper.md](foreign-data-wrapper.md)
2121
{% endcontent-ref %}
2222

23-
####

pgml-cms/docs/introduction/getting-started/import-your-data/csv.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ If you're using a Postgres database already, you can export any table as CSV wit
2020
psql -c "\copy your_table TO '~/Desktop/your_table.csv' CSV HEADER"
2121
```
2222

23-
If you're using another data store, it should almost always provide a CSV export functionality, since CSV is the most commonly used data format in machine learning.
23+
If you're using another data store, it should almost always provide a CSV export functionality, since CSV is the most commonly used data format in machine learning.
2424

2525
### Create table in Postgres
2626

2727
Creating a table in Postgres with the correct schema is as easy as:
2828

29-
```
29+
```sql
3030
CREATE TABLE your_table (
3131
name TEXT,
3232
age INTEGER,
@@ -48,6 +48,6 @@ We took our export command and changed `TO` to `FROM`, and that's it. Make sure
4848

4949
If your data changed, repeat this process again. To avoid duplicate entries in your table, you can truncate (or delete) all rows beforehand:
5050

51-
```
51+
```sql
5252
TRUNCATE your_table;
5353
```

pgml-cms/docs/introduction/getting-started/import-your-data/foreign-data-wrapper.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Once you have them, we can setup our live foreign data wrapper connection. All f
1616

1717
To connect to your database from PostgresML, first create a corresponding `SERVER`:
1818

19-
```
19+
```sql
2020
CREATE SERVER live_db
2121
FOREIGN DATA WRAPPER postgres_fdw
2222
OPTIONS (
@@ -30,7 +30,7 @@ Replace `Host`, `Port` and `Database name` with details you've collected in the
3030

3131
Once you have a `SERVER`, let's authenticate to your database:
3232

33-
```
33+
```sql
3434
CREATE USER MAPPING
3535
FOR CURRENT_USER
3636
SERVER live_db
@@ -42,7 +42,7 @@ OPTIONS (
4242

4343
Replace `Postgres user` and `Postgres password` with details collected in the previous step. If everything went well, we'll be able to validate that everything is working with just one query:
4444

45-
```
45+
```sql
4646
SELECT * FROM dblink(
4747
'live_db',
4848
'SELECT 1 AS one'
@@ -55,7 +55,7 @@ You can now execute any query you want on your live database from inside your Po
5555

5656
Instead of creating temporary tables for each query, you can import your entire schema into PostgresML using foreign data wrappers:
5757

58-
```
58+
```sql
5959
CREATE SCHEMA live_db_tables;
6060

6161
IMPORT FOREIGN SCHEMA public
@@ -65,7 +65,7 @@ INTO live_db_tables;
6565

6666
All your tables from your `public` schema are now available in the `live_db_tables` schema. You can read and write to those tables as if they were hosted in PostgresML. For example, if you have a table called `users`, you could access it with:
6767

68-
```
68+
```sql
6969
SELECT * FROM live_db_tables.users LIMIT 1;
7070
```
7171

@@ -75,7 +75,7 @@ That's it, your PostgresML database is directly connected to your production dat
7575

7676
To speed up access to your data, you can cache it in PostgresML by copying it from a foreign table into a regular table. Taking the example of the `users` table:
7777

78-
```
78+
```sql
7979
CREATE TABLE public.users (LIKE live_db_tables.users);
8080
INSERT INTO public.users SELECT * FROM live_db_tables.users;
8181
```

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy