1.0.0-1 • Published 5 months ago
zylliondata-ids3-sdk v1.0.0-1
ids3-sdk
ids3-sdk
Table of Contents
Installing
Package manager
Using npm:
$ npm install zylliondata-ids3-sdk
Using pnpm:
$ pnpm add zylliondata-ids3-sdk
API
IDS3
property | type | description |
---|---|---|
login | ()=> void | Log in to the ids3 system |
getDataSourceList | (options?: { keyword?: string; page?: number; pageSize?: number;} ) => Promise<{ source: Array<{ createdAt: string, description: string, ingestId: string, instance: string, name: string, recipe: string, source: string, updatedAt: string }>,total: number,page_number: number,page_size: number }> | Get a list of data sources |
getDikubeList | (options?: { keyword?: string; page?: number; pageSize?: number;} ) => Promise<{ source: Array<{ description: string, name: string, queryId: string, store_model: string, term_urn: string }>,total: number,page_number: number,page_size: number }> | Get Dikube list |
getDikube | (keyword: string ) => Promise<T> | Precise query Dikube |
refreshDataSource | (dataSourceId: string ) => Promise<T> | Refresh data source |
createTensorSpace | (id: string, name:string ) => TensorSpaceInstance | Select the tensor space of the operation |
TensorSpace Instance
property | type | description |
---|---|---|
id | string | Id |
name | string | name |
queryId | null | string | QueryId can be obtained through getBasicInfo() |
getBasicInfo | () => Promise<{ description: string, storeModel: string, mongoCollection: string, updatedAt: string, termUrn: string, name: string, queryId: string, createdAt: string}> | Get the basic information of tensor space |
getTag | () => Promise<string[]> | Get the grouping label of the tensor space |
getProductList | () => Promise<Array<{ description: string, name: string, apiLabel: string, requestNumber: number, apiSQL: string, dikubeName: string, createdAt: string, termUrn: string, apiId: string, status: boolean, ipRules: string, dikubeDescribe: null | string, updatedAt: string}>> | Get the product list of tensor space |
refresh | (tag?: string) => Promise<{ success: number, fail: number, total:number }> | Refresh tensor space |
query | (options: { id: string, sqlSelectColumns?: string, sqlSelectSuffix?: string, logSql?: boolean }) => Promise<T> | Tensor space SQL query |
getTag
,refresh
,query
. must first get the basic information.
Example
import IDS3 from "zylliondata-ids3-sdk";
const ids3 = new IDS3({
username: "xxxx",
password: "xxxx",
serverUrl: "https://xxx",
userUrl: "https://xxxx",
});
await ids3.login();
console.log("GET DataSource List", await ids3.getDataSourceList());
console.log("GET Dikube List", await ids3.getDikubeList());
const tensorSpaceInst = await ids3.createTensorSpace("<id>", "<name>");
console.log("GET Basic Info", await tensorSpaceInst.getBasicInfo());
console.log("GET Tag", await tensorSpaceInst.getTag());