Cancelled

Application to Persist Large XML Data Files into an MSSQL Database

I have a number of very large XML documents, and I'd like to have a script made in Java that will read data within the XML document, and persist it into a database with configurable batch sizes.

The specific structure of the XML documents may very, but they all have the same basic parent/child structure. For example, we might have:

<Parent>

<Group_Child>

<Child_1>Data<Child_1>

<Child_2>Data<Child_2>

</Group_Child>

<Child_1>Data<Child_1>

<Child_2>Data<Child_2>

</Group_Child>

</Parent>

or

<Parent>

<Group_Child>

<Child_3>Data<Child_3>

<Child_4>Data<Child_4>

</Group_Child>

<Child_3>Data<Child_3>

<Child_4>Data<Child_4>

</Group_Child>

</Parent>

As you can see above, the first file has two columns, Child_1 and Child_2, while the second file has Child3 and Child4. The application will work as follows in each above case:

1. Parse the XML document to get the list of ALL record element names. Just as with above, we need to review within the entire document to get a cumulative, distinct list of any and all column names;

2. Create a table with the desired structure (e.g. in the above case, tables would be created with the two columns indicated; and

3. Persist all data from the XML documents into the table created.

The application should accept three parameters, the first is the filename to be read, the second is batch size, and the third is target table name. For example, if my app name is PersistRMXML, and I want a batch size of 10,000, and the tablename I want to create is SomeTableName, then the command would be:

java -jar PersistRMXML [login to view URL] 10000 SomeTableName

Upon execution, the application will first read the input file to determine any and all possible column names (each file can contain over one million records, and so the file should not be loaded all into memory at once). STaX can be used to accomplish this.

Once this is done, the new table will be created on the target database with the desired structure. The application should contain an [login to view URL] file where the target MSSQL database connection string should be configured.

Once the target table is created, the application should read records in batch sizes specified above, and insert read records into memory. Once the desired number of records has been parsed from the XML document, and stored in memory, the application should then persist the data into the new table using the BulkCopy operation of MSSQL. More on Bulk Copy can be found here:

[login to view URL]

As a final step, the application should validate that the number of records inserted into the target table is the same record count as the number of records persisted. If not, the application should print an error to the log files indicating 'Record Persistence Incomplete - XML record count 11000 - Table record count 50'

The application should use a logger, like log4j for logging, and should log all details to the log file.

the application should be compiled using the Java 8 platform, and preferable will be distributed as a far jar.

Skills: Database Programming, Java, Software Architecture, SQL, XML

See more: split large xml smaller files, storing xml data database, php script parse xml populate database, import xml data database cakephp, xml data database, vbscript load xml data database, update script php update data database, perl script delete xml data windows, insert xml data table mssql, display xml data database dynamic drop downphp, create batch script extract xml data data feeds, importing big xml data database, convert oracle data files mssql server, vbs script load xml data, php script parse xml mysql database, aspnet mssql responsewrite output xml data sample code, xml files mssql, reading xml data database, mysql load large data files, accessing xml data files alfresco, import xml data mssql, vbnet insert xml data database, insert xml data database vbnet, split large xml files, xml files mysql database

About the Employer:
( 108 reviews ) SCOTTSDALE, United States

Project ID: #17210592

7 freelancers are bidding on average $53/hour for this job

dreamci

Expert software development team here. We can help you since we have huge experience in web development. Please contact

$50 USD / hour
(74 Reviews)
7.9
augurstech

Dear Employer Hope you are doing well...!! Coming to your project scope you can hire our exp programmer for passing data into XML format. Ping me via freelancer chat box and provide me XML documents so that we More

$50 USD / hour
(53 Reviews)
7.2
$58 USD / hour
(6 Reviews)
5.4
pabloramirezdz

Hello! My name is Pablo, I'm a developer with 12+ years experience. I have good knowledge of J2SE and J2EE, I can have the app ready for tommorrow using STax + JAXB or Woodstox + JAXB for the data parsing, MSSQL co More

$52 USD / hour
(12 Reviews)
4.9
vaidyag

HI, I have excellent experience in PHP and Java technologies. I have executed many projects such as an e-Commerce site for a large Semi conductor company. I have recently executed project where i read through an More

$50 USD / hour
(8 Reviews)
4.5
$58 USD / hour
(5 Reviews)
3.7
AlexanderIgnacz

Hi I am Full stack developer having experience more than 5 years and I have good knowledge on java and Mq sql ,mongo db,javascript ,html and css,angular js ,react js ,redux and flux. React-Native - ArtLoupe https: More

$52 USD / hour
(0 Reviews)
0.0