This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Repository navigation
First draft of New Connection Documentation #331
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
0500b9c
Added new Datasource install file
shannonlal a62260a
Check in latest instructions
shannonlal f6aa99c
Check in new file based on comments
shannonlal 605e306
Add icons for Athena
shannonlal 9324b38
Updated Instructions
shannonlal 4d9ee13
Check in constants for Athena
shannonlal 273e522
Got UI to detect Athena
shannonlal 632f9da
Check in latest version
shannonlal c1f37ba
Check in first version of schemas
shannonlal ca49c63
Check in schema definition
shannonlal 0d389f7
Check in more documentation for this
shannonlal 2c943a8
Check in updated new connection
shannonlal 3577b06
Check in draft of new connection:
shannonlal d72d5b7
Check in fixes based on Nicolas comment
shannonlal 837b95a
Updated Datastores.js instructions
shannonlal f879c18
Check in small fix
shannonlal d2d7975
Check in settings to get SQL
shannonlal 06c74fc
Check in small update for Settings.js
shannonlal 6b443bc
Check in first draft of unit tests
shannonlal 3ffd87c
Updating unit tests
shannonlal 463b4c6
Check in unit tests for connection
shannonlal aaef90f
Check in latest tets for database
shannonlal 154a6b7
Update to do for test cases
shannonlal 8f14f92
Check in git ignore update
shannonlal cc09ab5
Check in first function for testing
shannonlal 938cece
Check in basic test to start query
shannonlal 765474c
Check in version for getting connection status
shannonlal 6094c21
First stab at execution method
shannonlal 1db2667
Fixing Query Results
shannonlal 1a1fcf7
Check in latest version
shannonlal 9fa4f7c
Check in test information
shannonlal 400bb7b
Check in latest parsing
shannonlal 775692d
Check in latest connection properties
shannonlal b033703
Updated the test cases
shannonlal 7d596b6
Check in latest vesrion with getting table names
shannonlal 6996444
Checkn in cleanup for get tables
shannonlal a6c8434
Check in get list of Schemas
shannonlal 49c0004
Check in merge into Master
shannonlal 6d9e904
Code Clean up
shannonlal f5c86fe
Check in fix for unit tests
shannonlal 6621ab6
Check in latest version
shannonlal e7aaa8e
Check in latest changes based on @n-riesco comments
shannonlal 77b7710
Check in updated new Connection
shannonlal 6968f7d
Remove Athena work. Seperate Issue accidental merge
shannonlal 812dde5
Checking in updates for environment and troubleshooting
shannonlal 0b79f12
Check in fixes based on @n-riesco
shannonlal 4b74e8b
Check in fixes based on @n-riesco code review
shannonlal 5be1578
Merged changes from upstream
shannonlal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| # Add New Data Source | ||
|
|
||
| ## Images | ||
| The connector must provide an icon to be displayed on the selection tab and | ||
| it is recommended to add the images as png format. | ||
| Please verify that the icon looks good with the following CSS specs: | ||
| ```css | ||
| max-width: 100px; | ||
| max-height: 70px; | ||
| ``` | ||
|
|
||
| ## Updating the constants.js file | ||
| The following are the instructions for updating the Constants File: | ||
| 1. Add an entry in DIALECTS | ||
| 2. Add an entry in SQL_DIALECTS_USING_EDITOR | ||
| 3. Add an entry under CONNECTION_CONFIG | ||
| 4. Add the location logo into the LOGOS Constants | ||
| 5. Add the preview query in the PREVIEW_QUERY section | ||
| 6. Add sample credentials for your connector in the SAMPLE_DBS | ||
|
|
||
| ## Updating the Tab.react.js | ||
| The following are the instructions for updating the Tab React JS file | ||
| 1. Customise the label for your connector in the render function: | ||
|
|
||
| ```javascript | ||
| let label; | ||
| if (dialect === DIALECTS.S3) { | ||
| label = `S3 - (${connectionObject.bucket})`; | ||
| } else if (dialect === DIALECTS.NEW_CONNECTION) { | ||
| //Specify the label | ||
| label = `NEW CONNECTION (${connectionObject.host})`; | ||
| } | ||
| .... | ||
| ``` | ||
|
|
||
| ## Updating the Settings.react.js | ||
| Update the fetchData function to make the calls to appropriate sessions.js backend. | ||
| Add your new connection to the following list: | ||
|
|
||
| ```javascript | ||
| if (contains(connectionObject.dialect, [ | ||
| DIALECTS.APACHE_IMPALA, | ||
| DIALECTS.APACHE_SPARK, | ||
| DIALECTS.IBM_DB2, | ||
| DIALECTS.MYSQL, DIALECTS.MARIADB, DIALECTS.POSTGRES, | ||
| DIALECTS.REDSHIFT, DIALECTS.MSSQL, DIALECTS.SQLITE | ||
| ])) { | ||
| ``` | ||
|
|
||
| ## New Datastore file | ||
| This file should be added in the following location | ||
| backend/persistent/datastores | ||
|
|
||
| ```javascript | ||
|
|
||
| /** | ||
| * The following function will connect to the datasource | ||
| * @param {Object} connection | ||
| * @returns {Promise} that resolves when the connection succeeds | ||
| */ | ||
| function connect(connection); | ||
|
|
||
| /** | ||
| * The following function will return a list of schemas. | ||
| * @param {Object} connection | ||
| * @returns {Promise} that resolves to { | ||
| * columnnames: [ 'tablename', 'column_name','data_type' ], | ||
| * rows: [[tablename1, columnname1, datatype1], ...]] } | ||
| */ | ||
| function schemas(connection); | ||
|
|
||
| /** | ||
| * The following function will return a list of tables. | ||
| * The return result should an array of strings | ||
| * @param connection {object} | ||
| * @returns {Promise} that resolves to an array of table names | ||
| */ | ||
| function tables(connection); | ||
|
|
||
| /** | ||
| * The following function will execute a query against the | ||
| * data source. The function should return a tuple which contains | ||
| * two elements. The first is an array of strings which is the column names | ||
| * The second is a two dimensional array which represents the rows to be displayed | ||
| * @param {string|object} queryObject | ||
| * @param {object} connection | ||
| * @returns {Promise} that resolves to { columnnames, rows } | ||
| */ | ||
| function query(queryObject, connection); | ||
|
|
||
| ``` | ||
|
|
||
| ## Updating the Datastores.js | ||
| The following are the instructions for updating the Datastores.js | ||
|
|
||
| 1. Import the new Data source file | ||
| 2. Update the function getDatastoreClient | ||
| ``` javascript | ||
| //The dialect name must match what was specified under | ||
| //app/constants/constants.js for the Dialect name | ||
| } else if (dialect === 'new dialect') { | ||
| return MyNewDialect; | ||
| } | ||
| ``` | ||
| # Development and Debugging Setup | ||
| TBD | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.