Reverse Channel from SXV4 Data Sources - SuperCHANNEL
You can use SuperCHANNEL to extract information from an SXV4 file and import the data back into a relational database system. Simply connect to the SXV4 as your source and the relational database as your target.
This process is referred to as "reverse channelling".
Because the SXV4 format contains unit record data, this can be a useful way to retrieve data from an SXV4 (for example if you no longer have access to the original data source that was used to build that SXV4).
Please note that the resulting database may not contain all of the information that was in the original source database used to create the SXV4:
- Any plain tables from the original source would not have been included in the build, and therefore cannot be retrieved from the SXV4.
- Any columns or tables that were explicitly excluded from the build will not be in the SXV4.
- It will not be possible to reverse the effect of any cleansing actions applied during the original build. For example:
- If a row was skipped then this row will not be in the SXV4.
- If a value was binned to a particular value (for example an empty cell value was binned to a value of "Unknown") then it will not be possible to retrieve the original value of that cell. Only the binned value is stored in the SXV4.
Reverse Channelling from an SXV4
To reverse channel from an SXV4 into a relational database:
- Go to your relational database and create a new empty database to store the output from the SXV4.
- In SuperCHANNEL, select File > Connect to Source. The Connect to Source Database dialog displays.
In the Driver field, select sxv4 (str.jdbc.sxv4.Driver).
Click the ... button and browse to and select the SXV4 you want to use as your source.
Click OK.
The Source View updates to show the tables and columns in the SXV4 database.
- Select File > Connect to Target.
In the Location field, enter the connection string for connecting to your relational database.
For example:
- To connect to SQL Server using the JTDS driver, use the connection string
jdbc:jtds:sqlserver://<servername>:<port>/<databasename>;useCursors=true
- To connect to MySQL, use the connection string
jdbc:mysql://<servername>:<port>/<databasename>?relaxAutoCommit=true
(please note that the relaxAutoCommit paramater is required when reverse channelling to MySQL).
- To connect to SQL Server using the JTDS driver, use the connection string
Enter the username and password and click OK.
- SuperCHANNEL connects to your target database.
Drag one of the fact tables across from the Source View to the Target View:
As the relationships between fact and classification tables will already be defined, this should bring all the other linked tables in the SXV4 across to the Target View too:
- Click Build All to channel from the SXV4 back to the relational database.
Once the build is complete, you can view the data in your relational database. For example: