To install all of the template files, run the following script from the root of your project's directory:
npm i data-source-introspector
-
Description: data-source-introspector is a tool designed for introspecting (get table & fields info) for popular data sources like
Airtable
,Postgres
and others (coming soon) -
Technology stack:
- TS
- NodeJS
-
Status: This project in Alpha version.
For running this project need to be installed following deps
├── @types/node@20.8.7
├── @types/pg@8.10.7
├── @typescript-eslint/eslint-plugin@6.8.0
├── @typescript-eslint/parser@6.8.0
├── axios@1.5.1
├── eslint-config-airbnb-typescript@17.1.0
├── eslint-plugin-import@2.29.0
├── eslint-plugin-n@16.2.0
├── eslint-plugin-promise@6.1.1
├── eslint@8.52.0
├── nodemon@3.0.1
├── pg@8.11.3
├── ts-node@10.9.1
└── typescript@5.2.2
For introspection ane data source we need to do this three common steps:
- Define connection details to data source:
const postgresConnectionDetails: PostgresConnectionDetails = {
user: 'myUser',
port: 0,
host: 'myHost',
password: 'myPassword',
// ---- OR ----
connectionString: 'myConnectionString',
};
- Create instance of data source introspector &
init()
them.
const pgIntrospector = new PostgresIntrospector();
await pgIntrospector.init(postgresConnectionDetails);
- Call
introspect
method & pass introspection params
const pgIntrospectionResult = await pgIntrospector.introspect({
table: 'myTable',
schema: 'mySchema',
// ---- OR ----
query: 'SELECT * FROM myTable LIMIT 1',
});
console.log({ pgIntrospectionResult });
If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker
General instructions on how to contribute to this project can be founded here.
This repository is maintained by the Bracket engineering team.