[R-sig-DB] Luke Lake: Being able to load Rdata into DB2 XMl/BLOB [SEC=UNOFFICIAL]
Luke LAKE
|uke@|@ke @end|ng |rom |mm|@gov@@u
Sun Mar 1 20:09:31 CET 2015
UNOFFICIAL
Hi,
Modern IT systems store a variety of different types of data in a database. I want to store RData in an XML/BLOB column in a DB2 table. Having a central spot for a model, its parameters, results, test data would be pretty cool.(and all those other control freak management jargon)
What I wanted to do was , build a model etc then save it as Rdata file. Then load that RData file into an XML or BLOB DB2 column. When required, export and save the Rdata stored as XML/BLOB. Then load it back into R. (I know there are nicer ways of doing it)
1) Is this possible? Have I missed something?(R XML does not seem to have the functionality, XML requires tags and data in character format)
2) For clarity these are the steps I have attempted.
STEPS:
a) Getting the RData file type
file TEST_gbm.RData
TEST_gbm.RData: gzip compressed data, from Unix
b) Determine if DB2, XML columns can accept RData gzip files format. It cant nor can DB2 BLOBS accepts RData gzip format
c) Trying to change the RData file into a character format that will allow it to be stored in XML. Various commands used have been xxd and hexdump. Never seem to get the sequence right nor add the XML tags.
d) looking at the source code to try to figure out how save and load works. My impression is that the source code gets rid of some of the fields like CRC etc in gzio.h
There is a large number of difference in the fields in a normal gz file and a RData file. I could not change any field without destroying the whole file.
Normal Gzip xxd tttt.txt.gz
0000000: 1f8b 0808 500b f054 0003
RData gzip:
xxd TEST_Y.RData | head
0000000: 1f8b 0800 0000 0000 0003
e) RData is a compressed file. DB2 requires inputted XML to have at least 1 tag with the data. Unfortunately adding tags was impossible for me to achieve.
Any help would be fantastic!!!!!!!!!
Luke Lake
Exec 1
Department of Immigration and Citizenship
Telephone: (02) 6225 6535
Mobile: [Mobile]
Email: luke.lake using immi.gov.au<mailto:luke.lake using immi.gov.au>
"Description, inference, prediction, and decision-making: these are the four components of statistical
work, and all of them centrally involve assumptions and judgments, rendering them subjective at their core. James Berger"
UNOFFICIAL
Important Notice: If you have received this email by mistake, please advise
the sender and delete the message and attachments immediately. This email,
including attachments, may contain confidential, sensitive, legally privileged
and/or copyright information. Any review, retransmission, dissemination
or other use of this information by persons or entities other than the
intended recipient is prohibited. DIBP respects your privacy and has
obligations under the Privacy Act 1988. The official departmental privacy
policy can be viewed on the department's website at www.immi.gov.au. See:
http://www.immi.gov.au/functional/privacy.htm
[[alternative HTML version deleted]]
More information about the R-sig-DB
mailing list