Skip to content

Commit 2f812f2

Browse files
committed
update example on README
1 parent de43253 commit 2f812f2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ Copy and add `browser/boilingdata.min.js` script to your HTML.
3838

3939
`execQueryPromise()` method can be used to await for the results directly.
4040

41+
```shell
42+
yarn install @boilingdata/node-boilingdata
43+
# copy paste the example to example.mjs file.
44+
BD_USERNAME=<yourBoilingEmail> BD_PASSWORD=<yourBoilingPw> node example.mjs
45+
```
46+
4147
```typescript
4248
import { BoilingData } from "@boilingdata/node-boilingdata";
4349

@@ -46,9 +52,11 @@ async function main() {
4652
await bdInstance.connect();
4753
const sql = `SELECT COUNT(*) FROM parquet_scan('s3://boilingdata-demo/demo.parquet');`;
4854
const rows = await bdInstance.execQueryPromise({ sql });
49-
console.log(rows);
55+
console.log(JSON.parse(JSON.stringify(rows)));
5056
await bdInstance.close();
5157
}
58+
59+
main();
5260
```
5361

5462
`execQuery()` uses callbacks.

0 commit comments

Comments
 (0)