PostgreSQL Module
Introduction
Being a concrete module of the JDBC meta module, the PostgreSQL can be used to access relational SQL databases via the middleware.
This documentation will focus on the usage of this specific module. Please refer to the JDBC Module documentation for common matters.
Dashboard Example
In order to crawl a database, we need to add the PostgreSQL module to our backend. This can be done using the Module Market in the Dashboard and should automatically add the JDBC meta module.
Now we can start a new crawl by hovering over the added PostgreSQL module and clicking Use. We now have to fill in the required options as follows:
HTTP request query parameter |
Dashboard field name |
Extended description |
Example |
url |
Connection URL |
Connecting String containing the URL to the database server as well as the database name |
|
userName |
DB user name |
User name to be used for authentication against the database |
mysqladmin |
password |
DB user password |
Password to be used for authentication against the database |
secret |
proposedModuleName |
crawled Module name (optional) |
You can set the name that should be used for the crawled module. |
CrawledProducts |
reCrawl |
TRUE to overwrite previous crawling |
true - Overwrites previously crawled data if it existed false - Throws an error if previously crawled data exists. This assures that you don't accidently overwrite data. |
true |
customerName |
ApiOmat customer name |
Our customer name that we use to log in at ApiOmat |
apinaut |
appName |
App name |
Name of the backend (formerly called app); please use the name provided in the configuration dialog box: Your base URL is: http://<HOSTNAME>/yambas/rest/apps/%appName% %appName% is the String we need |
myfirstapp |
After this point, the following steps are identical with any other JDBC module. You can continue by checking the crawled module as described in de JDBC meta module documentation.
W e would call the REST endpoint using cURL
curl -X GET
"http://[YOURHOST]/yambas/rest/modules/PostgreSQL/myfirstapp/spec/crawler/?url=jdbc:postgresql://example.com:5432/pgApp&schemaName=app_data&userName=appAdmin&password=secret&reCrawl=false&customerName=apinaut&appName=myfirstapp"
-u [CUSTOMEREMAIL]:[CUSTOMERPWD]