IDRT - Integrated Data Repository Toolkit
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Import SQL

What is SQL?

Example Files

...

To import data from another sql database, you need to add the server as a Datasource Server first. Select Show Datasource Servers in the Import Browser and right click the free area and select Add Datasource Server.

Image Added
You can add a Datasource Server the same way, you added the Staging Server.

To start the DB Table Import, right click the project in the Import Browser you want to upload data to and select Import Data -> Import DB Table.

Image Added

A window opens, where you can select the DB Table you want to import.

Image Added

Item: The column name in the DB table.
Name: The name, the item should have in i2b2. You can e.g. rename cryptic column names.
Tooltip: The tooltip the item should have in i2b2. You can set a tooltip for better understanding, or the unit of an item for example.
Datatype: The datatype the item has. You can select either Integer, Float, Date, or String. 
Metadata: This tells the Import Browser, where to look for specific items, such as the id of the patient, the import date, start date and so on. You can also ignore items. These will not end up in the i2b2 database.

Note

The metadata item PatientID/ObjectID has to be present in each configuration file. Without it, the Import Browser won't let you continue and displays an error.

Note

The ObjectID is the same as the PatientID, but the file is imported using modifiers instead. This way more than one row per patient is allowed. The Import Browser will tell you, if you used the Guess Schema functionality whether you should use the ObjectID instead.

The next table describes the buttons in the DB Import Settings page.

Name of the Button

Description

Clear Table

This will delete your configuration for the selected table.

Guess Schema

You can let the Import Browser try to guess the schema of the table.
This will override your config!

If you select Next you get to the last page of the DB Importer. Here you can see all tables you selected and set some further options.
Image Added

Name

Description

Truncate i2b2 Project?

If you check this, the project will be truncated before the data is uploaded.

Truncate Previous Queries?

This will truncate the previous queries tables.

Database Indexing

Ignore: Don't touch the indexes;
Stop/Start: Stop the indexes before the upload and start them afterwards;
Drop/Create: Drop the indexes before the upload and create them from scratch afterwards.

Set patient_count after import

This will fill the c_totalnum column.

Save Settings?

This will save the settings for the next import. Note: The truncate checks are never saved.

If you hit Finish the upload starts. You can observe the progress in the progress bar of the Import Browser.