Learn how to store database credentials in RAW.
How to create
RAW supports storing relational databases (RDBMS) credentials.
In order to set up an RDBMS source, select
RDBMS tab from the Credentials view. The following form will be shown:
Currently, RAW supports the following RDBMSs:
- Microsoft SQL Server
For each RDBMS Credential, the following fields need to be specified:
- Name: Represents the name of our instance. This is arbitrary text and is intended to be referenced by our code file
- Host: The IP of the database server, i.e. 'localhost', '10.123.29.253', or 'mydb.mycompany.com'
- Port: The port that our db server is exposed to, e.g. '3306', '5432', etc
- Database: The schema we want to access, e.g. 'my_schema' or 'customers' or 'payments', etc
- Username, Password: Login credentials to our schema.
For reference purposes, a sample for MySQL Credential is shown. Fill the respective fields and select
The fields are the following:
All the above are of course cryptographically stored in our system.
In the case that we have provided a host/port that is not accessible by our instance, upon saving the datasource you will see a popup alert on the bottom right side of the screen that will inform you that the specified data are not valid.
In the case where you provided a host/port correctly, but provided wrong credentials, you will again see the entry in the list, but when trying to verify accessibility you will get the visual notification 'No Access'
After selecting 'Test Access', and if our datasource is indeed accessible, we will see the visual notification on the changed button, as 'Accessible'
How to use from Snapi
An example of SQL access can be seen in the following code:
actors(name: string) =
data = MySQL.InferAndRead("filmdb", "actor")
Collection.Filter(data, x -> x.first_name == name)