Skip to content

Commit

Permalink
Merge pull request #1755 from dolthub/gitbook-dev
Browse files Browse the repository at this point in the history
prod
  • Loading branch information
tbantle22 authored Oct 2, 2023
2 parents 884e90a + 6868137 commit 1337bf2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
4 changes: 2 additions & 2 deletions content/guides/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ You can dump the database `test` as follows:
mysqldump --databases test -P 3306 -h 0.0.0.0 -u root -p > dump.sql
```
**Note**: Using the `--databases` flag will cause `mysqldump` to include a command to create the database for you if it doesn't exist yet. Without this flag, you will need to ensure you have already created your database (e.g. `create database test;`) before you can load in the `mysqldump` file.
**Note**: Using the `--databases` flag will cause `mysqldump` to include a command to create the database for you if it doesn't exist yet. Without this flag, you will need to ensure you have already created your database (e.g. `create database test;`) before you can load in the `mysqldump` file.
To load into dolt:
Expand All @@ -170,7 +170,7 @@ dolt sql < dump.sql
## Hosted Dolt Deployments
Importing data into a [Hosted Dolt](https://www.hosted.doltdb.com) deployment can be done using the deployment's default configuration. Let's say you've dumped an existing MySQL database using `mysqldump` and want to import that dump into your Hosted Dolt deployment.
Importing data into a [Hosted Dolt](https://hosted.doltdb.com) deployment can be done using the deployment's default configuration. Let's say you've dumped an existing MySQL database using `mysqldump` and want to import that dump into your Hosted Dolt deployment.
Navigate to the "Configuration" tab of your Hosted deployment dashboard, and make sure that the box `behavior_auto_commit` is checked. This will automatically create SQL `COMMIT`s after every statement is executed, ensuring the data is persisted after each import statement is executed.
Expand Down
12 changes: 6 additions & 6 deletions content/products/dolthub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ This documentation will walk you through discovering data on DoltHub, cloning a

# DoltHub API

DoltHub has [an API](./dolthub-api/README.md) you can script against. The documentation covers:
DoltHub has [an API](./api/README.md) you can script against. The documentation covers:

1. [Authentication](./dolthub-api/authentication.md)
2. [SQL API](./dolthub-api/sql.md) - Used to make read or write SQL queries to a DoltHub database
3. [CSV API](./dolthub-api/csv.md) - Used to download CSV format files of DoltHub tables
4. [Database API](./dolthub-api/database.md) - Used to interact with DoltHub databases and pull requests
5. [Hooks](./dolthub-api/hooks.md) - Used to receive change events to your DoltHub databases
1. [Authentication](./api/authentication.md)
2. [SQL API](./api/sql.md) - Used to make read or write SQL queries to a DoltHub database
3. [CSV API](./api/csv.md) - Used to download CSV format files of DoltHub tables
4. [Database API](./api/database.md) - Used to interact with DoltHub databases and pull requests
5. [Hooks](./api/hooks.md) - Used to receive change events to your DoltHub databases

# Guides

Expand Down
7 changes: 4 additions & 3 deletions content/products/dolthub/api/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ res.json()

This shows our repository metadata as a dictionary:

```json
```js
{'query_execution_status': 'Success',
'query_execution_message': '',
'repository_owner': 'dolthub',
Expand All @@ -42,7 +42,7 @@ res.json()

This yields the results as JSON, with both schema and data:

```json
```js
{'query_execution_status': 'RowLimit',
'query_execution_message': '',
'repository_owner': 'dolthub',
Expand Down Expand Up @@ -72,6 +72,7 @@ This yields the results as JSON, with both schema and data:
.
.
.
]}
```

As a reminder, this API is in Alpha version, and we will continue to flesh this out, as well as improve query performance, over time.
Expand Down Expand Up @@ -191,4 +192,4 @@ merge_json = merge_res.json()
pollOperation(merge_json['operation_name'])
```

You can learn more about using the writable SQL API [here](https://www.dolthub.com/blog/2022-01-12-sql-api-writes/).
You can learn more about using the writable SQL API [here](https://www.dolthub.com/blog/2022-01-12-sql-api-writes/).
30 changes: 18 additions & 12 deletions content/reference/sql/version-control/remotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Retrying in 2

This command opens a web browser to DoltHub's credentials page where it will populate the Public Key field with a newly generated public key. In this example that public key is `pub key: l5bfb43fmqu8u8b59m8fp5cb8o1jcpt8281u94t80us35u6fgavg`.

On the credentials page, we just need to provide a description for our new key and click "Add".
On the credentials page, we just need to provide a description for our new key and click "Add".

![Add Dolt client credentials](../../../../content/.gitbook/assets/add_getting_started_creds.png)

Expand Down Expand Up @@ -90,7 +90,7 @@ And the data from our local Dolt server is now available on DoltHub.com!

## Pushing from Dolt running in a container

In the example above, the local Dolt client and running Dolt server were successfully authenticated against DoltHub.com because neither was running in a containerized environment.
In the example above, the local Dolt client and running Dolt server were successfully authenticated against DoltHub.com because neither was running in a containerized environment.

As a result, both the client and server were able to reference the same local directory Dolt uses to manage its global state. This directory can be set by defining `DOLT_ROOT_PATH`, but by default, is created at `$HOME/.dolt`. This directory houses global (client and server) configuration as well as all remote credentials, which are located in `$HOME/.dolt/creds`.

Expand All @@ -106,34 +106,40 @@ Sync functionality is supported via the [`clone`](../../cli.md#dolt-clone), [`fe

[DoltHub](https://www.dolthub.com) is a remote operated by DoltHub Inc. Public repositories are free. Private repositories are free up to a Gigabyte. After a Gigabyte, private repositories are $50 a month and scale up in cost after 100GB. DoltHub adds a web GUI to your remotes along with Forks, Pull Requests, and Issues.

See the [Getting Started Guide for DoltHub](../../../introduction/getting-started/data-sharing.md) on how to get started with a DoltHub remote.
See the [Getting Started Guide for DoltHub](../../../products/dolthub/data-sharing.md) on how to get started with a DoltHub remote.

## DoltLab

[DoltLab](https://www.doltlab.com) is a version of [DoltHub](https://www.dolthub.com) you can deploy in your own network. It looks very similar to DoltHub. See the [DoltLab Guide](../../../guides/doltlab/installation.md) if you are interested in using DoltLab as a remote.
[DoltLab](https://www.doltlab.com) is a version of [DoltHub](https://www.dolthub.com) you can deploy in your own network. It looks very similar to DoltHub. See the [DoltLab Guide](../../../products/doltlab/installation.md) if you are interested in using DoltLab as a remote.

## Filesystem

Filesystem based remotes allow you to push/pull data from any location that can be accessed via the filesystem. This may be a directory on your local disk, or any other storage location that can be mounted to the filesystem. To add a filesystem based remote use a URL with the `file://` protocol.

**Linux / OSX Examples**

* Adding a remote
- Adding a remote

```
dolt remote add origin file:///Users/brian/datasets/menus
dolt remote add origin file:///Users/brian/datasets/menus
```
* Cloning

- Cloning

```
dolt clone file:///Users/brian/datasets/menus
```

**Windows Examples**

* Adding a remote
- Adding a remote

```
dolt remote add origin file:///c:/Users/brian/datasets/menus
```
* Cloning

- Cloning

```
dolt clone file:///c:/Users/brian/datasets/menus
```
Expand All @@ -147,7 +153,7 @@ key with the name "db".

![Create a Dynamo Table with a primary key of: db](../../../.gitbook/assets/create_dynamo_table.png)

This single DynamoDB table can be used for multiple unrelated remote repositories. Once you have a DynamoDB table, and an S3 bucket setup you can add an AWS remote using a URL with the protocol `aws://`. To add a remote named "origin" to my "menus" repository using an S3 bucket named `dolt_remotes_s3_storage` and a DynamoDB table named `dolt_dynamo_table` you would run:
This single DynamoDB table can be used for multiple unrelated remote repositories. Once you have a DynamoDB table, and an S3 bucket setup you can add an AWS remote using a URL with the protocol `aws://`. To add a remote named "origin" to my "menus" repository using an S3 bucket named `dolt_remotes_s3_storage` and a DynamoDB table named `dolt_dynamo_table` you would run:

```
dolt remote add origin aws://[dolt_dynamo_table:dolt_remotes_s3_storage]/menus
Expand All @@ -165,7 +171,7 @@ In order to initialize your system to be able to connect to your AWS cloud resou
dolt remote add --aws-creds-profile prod-profile --aws-region us-west-2 origin aws://[dolt_dynamo_table:dolt_remotes_s3_storage]/menus
```

or
or

```
dolt clone --aws-creds-profile prod-profile --aws-region us-west-2 origin aws://[dolt_dynamo_table:dolt_remotes_s3_storage]/menus
Expand Down Expand Up @@ -198,4 +204,4 @@ origin https://doltremoteapi.dolthub.com/Dolthub/menus
remotesrv --http-port 1234 --dir ./remote_storage
```

This starts a server listening on port 50051 for our grpc requests, and runs a file server on port 1234 which provides upload, and download functionality similar to S3 / GCS locally. We use the url `http://localhost:50051/test-org/test-repo` when adding a remote or cloning from this remote server.
This starts a server listening on port 50051 for our grpc requests, and runs a file server on port 1234 which provides upload, and download functionality similar to S3 / GCS locally. We use the url `http://localhost:50051/test-org/test-repo` when adding a remote or cloning from this remote server.

0 comments on commit 1337bf2

Please sign in to comment.