dremiojs 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +14 -0
- package/.prettierrc +7 -0
- package/README.md +59 -0
- package/dremiodocs/dremio-cloud/cloud-api-reference.md +748 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-about.md +225 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-admin.md +3754 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-bring-data.md +6098 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-changelog.md +32 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-developer.md +1147 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-explore-analyze.md +2522 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-get-started.md +300 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-help-support.md +869 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-manage-govern.md +800 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-overview.md +36 -0
- package/dremiodocs/dremio-cloud/dremio-cloud-security.md +1844 -0
- package/dremiodocs/dremio-cloud/sql-docs.md +7180 -0
- package/dremiodocs/dremio-software/dremio-software-acceleration.md +1575 -0
- package/dremiodocs/dremio-software/dremio-software-admin.md +884 -0
- package/dremiodocs/dremio-software/dremio-software-client-applications.md +3277 -0
- package/dremiodocs/dremio-software/dremio-software-data-products.md +560 -0
- package/dremiodocs/dremio-software/dremio-software-data-sources.md +8701 -0
- package/dremiodocs/dremio-software/dremio-software-deploy-dremio.md +3446 -0
- package/dremiodocs/dremio-software/dremio-software-get-started.md +848 -0
- package/dremiodocs/dremio-software/dremio-software-monitoring.md +422 -0
- package/dremiodocs/dremio-software/dremio-software-reference.md +677 -0
- package/dremiodocs/dremio-software/dremio-software-security.md +2074 -0
- package/dremiodocs/dremio-software/dremio-software-v25-api.md +32637 -0
- package/dremiodocs/dremio-software/dremio-software-v26-api.md +36757 -0
- package/jest.config.js +10 -0
- package/package.json +25 -0
- package/src/api/catalog.ts +74 -0
- package/src/api/jobs.ts +105 -0
- package/src/api/reflection.ts +77 -0
- package/src/api/source.ts +61 -0
- package/src/api/user.ts +32 -0
- package/src/client/base.ts +66 -0
- package/src/client/cloud.ts +37 -0
- package/src/client/software.ts +73 -0
- package/src/index.ts +16 -0
- package/src/types/catalog.ts +31 -0
- package/src/types/config.ts +18 -0
- package/src/types/job.ts +18 -0
- package/src/types/reflection.ts +29 -0
- package/tests/integration_manual.ts +95 -0
- package/tsconfig.json +19 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@typescript-eslint"
|
|
5
|
+
],
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended",
|
|
8
|
+
"plugin:@typescript-eslint/recommended"
|
|
9
|
+
],
|
|
10
|
+
"rules": {
|
|
11
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
12
|
+
"@typescript-eslint/explicit-module-boundary-types": "off"
|
|
13
|
+
}
|
|
14
|
+
}
|
package/.prettierrc
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# dremiojs
|
|
2
|
+
|
|
3
|
+
Type-safe Node.js client for Dremio API. Supporting Dremio Cloud and Dremio Software (v2/v3).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install dremiojs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Dremio Cloud
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { DremioCloudClient } from 'dremiojs';
|
|
17
|
+
|
|
18
|
+
const client = new DremioCloudClient({
|
|
19
|
+
baseUrl: 'https://api.dremio.cloud/v0',
|
|
20
|
+
authToken: 'YOUR_PAT',
|
|
21
|
+
projectId: 'YOUR_PROJECT_ID'
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
async function main() {
|
|
25
|
+
// List catalog
|
|
26
|
+
const catalog = await client.catalog.getByPath([]);
|
|
27
|
+
console.log(catalog.children);
|
|
28
|
+
|
|
29
|
+
// Execute SQL
|
|
30
|
+
const results = await client.jobs.executeQuery('SELECT * FROM sys.version');
|
|
31
|
+
console.log(results);
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Dremio Software
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { DremioSoftwareClient } from 'dremiojs';
|
|
39
|
+
|
|
40
|
+
const client = new DremioSoftwareClient({
|
|
41
|
+
baseUrl: 'http://dremio:9047/api/v3',
|
|
42
|
+
authToken: 'YOUR_PAT'
|
|
43
|
+
// OR username/password:
|
|
44
|
+
// username: 'dremio',
|
|
45
|
+
// password: 'password123'
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
async function main() {
|
|
49
|
+
const results = await client.jobs.executeQuery('SELECT 1');
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Features
|
|
54
|
+
|
|
55
|
+
- **Universal Support**: Works with both Dremio Cloud and Dremio Software.
|
|
56
|
+
- **Strict Typing**: Full TypeScript definitions for Catalog, Jobs, Reflections, etc.
|
|
57
|
+
- **SQL Helper**: Easy `executeQuery` method that handles job submission and polling.
|
|
58
|
+
- **Catalog Management**: Create, update, delete Spaces, Sources, Folders, and Datasets.
|
|
59
|
+
- **Reflections**: Manage reflections programmatically.
|