This blog post explains how to browse the configuration database of your SnapLogic server. I found this helpful when I was modifying some SnapLogic server code, and messed something up. I thought I had corrupted something in the database (I hadn’t), so wanted to open it up and take a look. I thought I’d share what I learned.
It turns out the SnapLogic configuration repository is really simple. There is only one table you really care about, and it has but a few columns.
Setting Up Your SQLite Browser
The configuration database for SnapLogic is a standard SQLite database. There are various tools you could use to browse it, but I like the Firefox SQLite Manager plugin. It installs into a tool you probably already use (Firefox) and does everything you need.
Steps to get running:
- Install the SQLite Manager plugin and restart Firefox
- Navigate to Tools->SQLite Manager in the Firefox menu
- A new window will popup with the manager in view
- Navigate to Database->Connect Database in the menu
- When the file browser pops up, choose your SnapLogic repository DB
- Choose [SNAPLOGIC_HOME]/repository/repository.db
- You will have to disable file extension filtering; make sure “All Files” is selected
You should now have the SnapLogic database open for browsing.
Inside the Resource Table
The table of interest is the resource table. It contains the definitions of all of your resources, including component instances and pipelines. Almost everything you do in the SnapLogic Designer UI is stored in this table.
The table has the following structure:
Column | Purpose |
uri | The logical URI given to the resource in the Designer. As in: /SnapLogic/Tutorial/Exercise_5/Resources/SortProspects |
guid | A nice globally unique id for the instance. For migration/backups, this is very nice to have. |
gen_id | A version number. Incremented each time you click Save on the resource in the Designer. |
object | The actual definition of the resource. This is a large field, and is written in a readable format (JSON?). |
validated | Has this resource been validated? 0 for false, 1 for true. See caveat below. |
Overall, it is pretty self explanatory as far as I can tell. Perhaps there are hidden nuances, but none that I have detected.
The only surprise was the use of the validated column. I thought that would be updated when you hit the “Validate…” button in the Designer. Not so, at least in SnapLogic 2.1.0 (beta). This column seems to be updated upon a successful run of a Preview operation.
I hope this blog post helps you in your SnapLogic development. Post a comment if so!
No comments:
Post a Comment