Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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 Dec 17, 2017
a62260a
Check in latest instructions
shannonlal Dec 18, 2017
f6aa99c
Check in new file based on comments
shannonlal Dec 20, 2017
605e306
Add icons for Athena
shannonlal Dec 20, 2017
9324b38
Updated Instructions
shannonlal Dec 20, 2017
4d9ee13
Check in constants for Athena
shannonlal Dec 20, 2017
273e522
Got UI to detect Athena
shannonlal Dec 20, 2017
632f9da
Check in latest version
shannonlal Dec 23, 2017
c1f37ba
Check in first version of schemas
shannonlal Dec 28, 2017
ca49c63
Check in schema definition
shannonlal Dec 29, 2017
0d389f7
Check in more documentation for this
shannonlal Dec 29, 2017
2c943a8
Check in updated new connection
shannonlal Dec 29, 2017
3577b06
Check in draft of new connection:
shannonlal Dec 29, 2017
d72d5b7
Check in fixes based on Nicolas comment
shannonlal Dec 30, 2017
837b95a
Updated Datastores.js instructions
shannonlal Dec 30, 2017
f879c18
Check in small fix
shannonlal Dec 30, 2017
d2d7975
Check in settings to get SQL
shannonlal Jan 3, 2018
06c74fc
Check in small update for Settings.js
shannonlal Jan 3, 2018
6b443bc
Check in first draft of unit tests
shannonlal Jan 4, 2018
3ffd87c
Updating unit tests
shannonlal Jan 4, 2018
463b4c6
Check in unit tests for connection
shannonlal Jan 4, 2018
aaef90f
Check in latest tets for database
shannonlal Jan 4, 2018
154a6b7
Update to do for test cases
shannonlal Jan 4, 2018
8f14f92
Check in git ignore update
shannonlal Jan 5, 2018
cc09ab5
Check in first function for testing
shannonlal Jan 5, 2018
938cece
Check in basic test to start query
shannonlal Jan 5, 2018
765474c
Check in version for getting connection status
shannonlal Jan 5, 2018
6094c21
First stab at execution method
shannonlal Jan 6, 2018
1db2667
Fixing Query Results
shannonlal Jan 6, 2018
1a1fcf7
Check in latest version
shannonlal Jan 6, 2018
9fa4f7c
Check in test information
shannonlal Jan 6, 2018
400bb7b
Check in latest parsing
shannonlal Jan 6, 2018
775692d
Check in latest connection properties
shannonlal Jan 6, 2018
b033703
Updated the test cases
shannonlal Jan 6, 2018
7d596b6
Check in latest vesrion with getting table names
shannonlal Jan 7, 2018
6996444
Checkn in cleanup for get tables
shannonlal Jan 7, 2018
a6c8434
Check in get list of Schemas
shannonlal Jan 7, 2018
49c0004
Check in merge into Master
shannonlal Jan 7, 2018
6d9e904
Code Clean up
shannonlal Jan 7, 2018
f5c86fe
Check in fix for unit tests
shannonlal Jan 7, 2018
6621ab6
Check in latest version
shannonlal Jan 7, 2018
e7aaa8e
Check in latest changes based on @n-riesco comments
shannonlal Jan 13, 2018
77b7710
Check in updated new Connection
shannonlal Jan 13, 2018
6968f7d
Remove Athena work. Seperate Issue accidental merge
shannonlal Jan 13, 2018
812dde5
Checking in updates for environment and troubleshooting
shannonlal Jan 16, 2018
0b79f12
Check in fixes based on @n-riesco
shannonlal Jan 17, 2018
4b74e8b
Check in fixes based on @n-riesco code review
shannonlal Jan 17, 2018
5be1578
Merged changes from upstream
shannonlal Jan 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Note that this section targets contributors and those who wish to set up and run

If you're interested in using the distributed App, [download the latest release.](https://github.com/plotly/falcon-sql-client/releases)

## Prerequisites
It is recommended to use node v6.12 with the latest electron-builder

## Install

Start by cloning the repo via git:
Expand Down Expand Up @@ -125,3 +128,14 @@ $ yarn run test-e2e
- Mac builds are created in TravisCI tests and automatically hosted on [amazon](https://s3.console.aws.amazon.com/s3/buckets/falcon-travis-artifacts/plotly/falcon-sql-client/?region=us-east-1&tab=overview). Select the latest build (largest number *note:* the folders are not necessarily sequential) -> release.zip

Builds are uploaded to https://github.com/plotly/falcon-sql-client/releases.

## Troubleshooting
The Falcon Configuration information is installed in the user's home directory.
For example Unix and Mac (~/.plotly/connector) and for Windows (%userprofile%\.plotly\connector\). If you have tried the install
process and the app is still not running, this may be related to some corrupted
configuration files. You can try removing the existing configuration files and then
restarting the build process

```bash
rm -rf ~/.plotly/connector/
```
106 changes: 106 additions & 0 deletions NEW_CONNECTION.md
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 * @returns {Promise} that resolves when the connection succeeds

* @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