Importing Delimited Device Files into a MySQL Database using a MySQL Load Data Script
The Pipe-Delimited
|
device files provide a relational view of the device record data. These files can be imported into a database for easier reading and interaction.
Notice
Directions
- Extract the Import Scripts to your workarea.
-
Place your Delimited Device Files into the
data
directory. -
Update and uncomment the runner script with the appropriate parameters for your environment.
-
If you are using a Linux computer to run these scripts, update the
mysql/mysql_populate_ag_tables.sh
file. -
If you are using a Windows computer to run these scripts, update the
mysql/mysql_populate_ag_tables.bat
file.
Parameter Description MYSQL_EXECUTABLE
The location of the mysql cmd line executable (ex: ~/MySQL/bin/mysql
)user
The user name to use to connect to your database schema password
The password to use to connect to your database schema dbserver
The IP or url of the server db_name
The name of your database schema -
If you are using a Linux computer to run these scripts, update the
-
Execute the runner script
-
If you are using a Linux computer, run the
mysql/mysql_populate_ag_tables.sh
file. -
If you are using a Windows computer, run the
mysql/mysql_populate_ag_tables.bat
file.
-
If you are using a Linux computer, run the
-
Check the
mysql_ag.log
file generated in themysql
directory for a generated report.
Download Import Scripts
Directory/File Name | Description |
---|---|
oracle/populate_ag_tables.sh |
Shell Script runner for all ctl and sql files in a Linux Environment.
Note: You must update the parameters ORACLE_HOME , user , password , and tns_name to connect to your database and use your SQL Loader and SQL Plus applications
|
oracle/populate_ag_tables.bat |
Batch runner for all ctl and sql files in a Windows Environment.
Note: You must update the parameters ORACLE_HOME , user , password , and tns_name to connect to your database and use your SQL Loader and SQL Plus applications
|
oracle/ag_build_tables.sql |
Drops and Creates new tables that the ctl scripts will populate |
oracle/ag_device_sizes.ctl |
Control File for the Delimited Device File data/deviceSizes.txt
Populates the AG_DEVICE_SIZES table |
oracle/ag_contacts.ctl |
Control File for the Delimited Device File data/contacts.txt
Populates the AG_CONTACTS table |
oracle/ag_sterilization_methods.ctl |
Control File for the Delimited Device File data/sterilizationMethodTypes.txt
Populates the AG_STERILIZATION_METHODS table |
oracle/ag_identifiers.ctl |
Control File for the Delimited Device File data/identifiers.txt
Populates the AG_IDENTIFIERS table |
oracle/ag_product_codes.ctl |
Control File for the Delimited Device File data/productCodes.txt
Populates the AG_PRODUCT_CODES table |
oracle/ag_gmdn_terms.ctl |
Control File for the Delimited Device File data/gmdnTerms.txt
Populates the AG_GMDN_TERMS table |
oracle/ag_environmental_conditions.ctl |
Control File for the Delimited Device File data/environmentalConditions.txt
Populates the AG_ENVIRONMENTAL_CONDITIONS table |
oracle/ag_device.ctl |
Control File for the Delimited Device File data/device.txt
Populates the AG_DEVICE table |
data/* |
This directory will contain the Delimited Device Files you will process. |
bad/* |
This directory will contain the .bad files that get generated any time a bad record is read during processing
|
discard/* |
This directory will contain the .dsc files that get generated any time record is discarded during processing
|
External Tools and References
Technology | Notes | Link(s) |
---|---|---|
Oracle SQL Client Tools | Oracle SQL Client Tools | Oracle SQL Client |
Oracle Database | Oracle Database official size limitations | Oracle Physical Database Limits |