Skip to content

Commit b77af3b

Browse files
committed
Changing the example table name to avoid UI quirk where the table is invisible.
1 parent 6076e32 commit b77af3b

File tree

1 file changed

+6
-7
lines changed
  • src/content/docs/d1/tutorials/import-to-d1-with-rest-api

1 file changed

+6
-7
lines changed

src/content/docs/d1/tutorials/import-to-d1-with-rest-api/index.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,19 @@ You must have an existing D1 table which matches the schema of the data you wish
3333
This tutorial uses example data:
3434

3535
- A database called `d1-import-tutorial`.
36-
- A table called `D1TargetTable`
37-
- Within `D1TargetTable`, three columns called `id`, `text`, and `date_added`.
36+
- A table called `TargetD1Table`
37+
- Within `TargetD1Table`, three columns called `id`, `text`, and `date_added`.
3838

3939
1. Go to **Storage & Databases > D1**.
4040
2. Select **Create**.
4141
3. Name your database. For this tutorial, name your D1 database `d1-import-tutorial`.
4242
4. (Optional) Provide a location hint. Location hint is an optional parameter you can provide to indicate your desired geographical location for your database. Refer to [Provide a location hint](/d1/build-with-d1/configuration/data-location/#provide-a-location-hint) for more information.
4343
5. Select **Create**.
44-
6. Go to **Console**, then paste the following SQL snippet. This creates a table named `D1TargetTable`.
44+
6. Go to **Console**, then paste the following SQL snippet. This creates a table named `TargetD1Table`.
4545

4646
```sql
47-
DROP TABLE IF EXISTS D1TargetTable;
48-
CREATE TABLE IF NOT EXISTS D1TargetTable (id INTEGER PRIMARY KEY, text TEXT, date_added TEXT);
49-
);
47+
DROP TABLE IF EXISTS TargetD1Table;
48+
CREATE TABLE IF NOT EXISTS TargetD1Table (id INTEGER PRIMARY KEY, text TEXT, date_added TEXT);
5049
```
5150

5251
## 3. Create an `index` file
@@ -60,7 +59,7 @@ Define your variables and set:
6059
- `D1_API_KEY`: The D1 API token generated in [step 1](#1-create-a-d1-api-token)
6160

6261
```js title="index"
63-
const TARGET_TABLE = " "; // for the tutorial, `D1TargetTable`
62+
const TARGET_TABLE = " "; // for the tutorial, `TargetD1Table`
6463
const ACCOUNT_ID = " ";
6564
const DATABASE_ID = " ";
6665
const D1_API_KEY = ' ';

0 commit comments

Comments
 (0)