Step 3: Creating and connecting to Data Sources

 Instructions for creating & connecting to a Data Source

1. Open a previously created environment by double clicking on it from the Data Environments page in the Library.

2. Create a new Data Source in the environment by clicking on (+) next to DATA SOURCES.

3. Enter a name and select a type for the Data Source. Supported database servers include PostgreSQL, MYSQL, MS SQL (Microsoft SQL Server). Connection settings (encrypted protocols) should also be entered. 

4. To create an encrypted configuration string, ssh into any Riffyn Data Agent in the environment of the Data Source, and use the generate-secure-config utility on the Data Agent to prompt for the required connection information.  The utility will then produce the encrypted connection string, which can be saved into the Create Data Source modal in the Riffyn UI.

$ cd /srv/riffyn/agent/

$ ./bin/generate-secure-config

Follow the user prompts to create an encrypted configuration string for the data source

For example:

$ ./bin/generate-secure-config

Config inputs: Enter Riffyn Agent plugin name:  PostgreSQL

Config inputs: Enter path to RSA key file to encrypt the config: config/agent-key.pem

Please enter the PostgreSQL connection information:

Config inputs: Enter pg server host name or IP address:  192.168.22.22

Config inputs: Enter TCP port number for the pg server:  (5432) 5432

Config inputs: Enter pg user name with read-only access:  view-user

Config inputs: Enter password associated with the pg user name:  

Config inputs: Enter pg database name:  test

Config inputs: Does server requires encrypted connections (SSL)?:  (false) true

Config inputs: Enter client encoding to use for the pg connection:  

Config inputs: Enter application name for the pg connection:  

Encrypted datasource configuration:

IxvzKbaK3rvsjz4yyZtQ7+Bkviz801dx11TRjiq3u2qD7xPbC9kspTOMUjrySOsLFwEKzhYC8ZZK4VR0/E/5lzt3CbnEeSVtEaVjSRAhSbipj8WIWjWrDtefmTX9ySaFnMwV/BypsPDaMWPt4v2C1E+cnuZkp4X9h2yZAnzEqj/UgwyRAey06eSvbD9k5/cWV7vCsjwP4GCAL5Iv0nDgsKfn4Lto7GLg9bgzAkRPLT71BRmMJOKQU8WUmG1OSyD0EDPfjXELl/R39+aijuQ0JP1QUzUfL9cYr1hXGc0ymU/x7W3rAm1Wt7rzTNJacmelYUc8AUxlJRhMTYIkHdoa1A==

5. Copy and paste the encrypted string (containing the Data Source connection information) into the data source creation modal in the Riffyn application. This ensures that other agents added to this environment will be able to access all data sources in that environment.

Click Create to save the Data Source.  

6. Click on the ellipsis menu next to the new data source and select Refresh Metadata to retrieve a list of database tables available for queries.

 

7. The Data Source is now ready for use on any experiment by anyone who has been shared access to this Data Environment.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request