Load RData and export data.frame

Hi
I've been carefully following the related "Using RData in Azure ML" post, but I still cannot extract and export the data.frame with an R script module.
My RData file (called FINAL_REF.RData) was locally zipped and loaded as a .zip file to my workspace
I've connected the zip file (called FINAL_REF.zip) to the 3rd port of the R script module
Knowing that my data.frame (named "FINAL_REF") is the only element in the RData file, I've included this simple code in the module:
        test1: load("src/FINAL_REF.rdata"); maml.mapOutputPort("FINAL_REF");
        test2: df <- load("src/FINAL_REF.rdata"); maml.mapOutputPort("df");
But none of them worked:
   I get a "Error 0063: Mapped variable must be of class type data.frame at this time." for test1
   I get a "Error 1000: RPackage library exception: Reading output R workspace failed" for test2
Thanks in advance for your support

Hi
The output shows clearly all data.frame columns, at the end it shows the following message
DllModuleHost Error: 1 : Program::Main encountered fatal exception: Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 1000: RPackage library exception: Reading output R workspace failed ---> Microsoft.Analytics.Modules.R.ErrorHandling.RException: Reading output R workspace failed ---> System.Text.DecoderFallbackException: Unable to translate bytes [B5] at index -1 from specified code page to Unicode.
Module finished after a runtime of 00:01:43.8298727 with exit code -2
Module failed due to negative exit code of -2
Some fields are strings (song, artist, and album names), so I guess there might be some "weird" characters there ... is it the root cause ? can I locally change these columns to Unicode with R?
BR
An extract of the log with the data.frame structure below:
[ModuleOutput] The following files have been unzipped for sourcing in path=["src"]:
[ModuleOutput]
[ModuleOutput] Name Length Date
[ModuleOutput]
[ModuleOutput] 1 FINAL_REF.RData 278804268 2015-02-02 10:40:00
[ModuleOutput]
[ModuleOutput] Loading objects:
[ModuleOutput]
[ModuleOutput] 'data.frame': 6590994 obs. of 24 variables:
[ModuleOutput]
[ModuleOutput]
[ModuleOutput] $ country : Factor w/ 457 levels "","AD","AE","AF",..: NA NA NA NA NA NA NA NA NA NA ...
[ModuleOutput]
[ModuleOutput] $ classP01 : Factor w/ 5 levels "","curieux","mainstream",..: NA NA NA NA NA NA NA NA NA NA ...
[ModuleOutput]
[ModuleOutput] $ artistid : int 2330 11584 NA 12453 2925 12674 39 1028 NA 1204 ...
[ModuleOutput]
[ModuleOutput] $ artistname : Factor w/ 7972 levels "","-M-","!DelaDap",..: 7018 7970 NA 1495 1998 6448 44 719 NA 839 ...
[ModuleOutput]
[ModuleOutput] $ songname : Factor w/ 90734 levels "","'39","'5150'",..: 8522 35744 NA 40206 89717 48188 28442 38477 NA 90595 ...
[ModuleOutput]
[ModuleOutput] $ albumname : Factor w/ 13751 levels "","'74 Jailbreak",..: 5034 7563 NA 893 8355 10285 4421 6535 NA 67 ...
[ModuleOutput] $ albumid : int 3196 7803 NA 2933 14642 968 14473 6463 NA 16564 ...
[ModuleOutput]
[ModuleOutput] [1] "Saving variable FINAL_REF ..."
[ModuleOutput]
[ModuleOutput] [1] "Saving the following item(s): .maml.oport1"
[ModuleOutput]
[ModuleOutput] $value
[ModuleOutput]
[ModuleOutput] NULL
[ModuleOutput]
[ModuleOutput]
[ModuleOutput]
[ModuleOutput] $visible
[ModuleOutput]
[ModuleOutput] [1] FALSE

Similar Messages

  • Importing and Exporting Data with a Clob datatype with HTML DB

    I would like to know what to do and what to be aware of when Importing and Exporting data with a Clob Datatype with HTML DB?

    Colin - what kind of import/export operation would that be, which pages are you referring to?
    Scott

  • Problem with Import and Export Data Wizard

    Downloaded and installed SQL Server Express 2008 R2 today because I want to explore how Access interacts with SQL Server (using my home computer). I'm using Access 2010 (under Windows 7), so the 2008 version of SQL Server Express seemed to be the version
    to use.
    After a couple of false starts, installation appeared to go okay. After the installation. My Start menu listed Microsoft SQL Server 2008 and Microsoft SQL Server 2008 R2. The latter listed Import and Export Data (64-bit). When I clicked that, the first Import
    and Export Data Wizard page was displayed. I wasn't ready at that time to explore the wizard, so I closed it. An hour or so later I again attempted to open the Import and Export Data wizard. This time, the wizard didn't open. Instead this error message was
    displayed: "The SSIS Runtime object could not be created. Verify that DTS.dll is available and registered."
    I found DTS.dll on my computer at C:\Program Files\Microsoft SQL Server\100\DTS\Binn, so the file is available, but don't know whether it is registered.
    How can I correct this problem?

    First can you please post all log file errors
    >> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
    1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
    If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
    2. You can try reinstall from start (In this case you have to make sure that you un-install all)
    [Personal Site] [Blog] [Facebook]

  • Data load issue with export data source - BW 3.5

    Hi,
    We are facing issues in loading data with the help of export data source.
    We have created export data source of 0PCA_C01 cube. With the help of this export datasource,  we are loading data to other custom cube. Scenario is working fine in development server.
    But when we transported objects to quality server data is not getting loaded to custom target cube.
    It is extracting zero records.  All transports are ok and we have generated export datasource in quality before transports .Also regenerated export datasource after transport and activated infosource, update rule via RS* programs.  Every object is active but data is not getting extracted.
    RSA3 for 80PCA_C01 datasource isn't extracting any record in Quality. Records getting extracted in development.   We are in BW 3.5 with patch level 19.
    Please guide us to resolve the issue.
    Thanks,
    Aditya

    Hi
    Make sure that you have relevant Role & Authorization at Quality/PRS.
    You have to Transport the Source Cube first and then Create a Generate Export Data Source in QAS. Then, replicate data sources for BW QAS Soruce System. Make sure this replicated Data Source in QAS. Only then can transport new update rules for second cube.
    Hope it helps and clear

  • How do I make a VI that contols a 6534 card take less time to load 1Mbyte and output data ?

    Hello-
    I'm developing a pattern generation burst mode type VI that reads byte characters from a text file, manipulates the bytes that it reads and then outputs the data from a 6534 card. The REQ1 pin is pulled high which makes the card continually output data until the internal buffer is empty. An internal clock is used. The problem is that the size of the file that is read by the VI can be relatively large, in the 1MByte range. After the VI manipulation, the output array is 16 times larger than the input string. So, when the VI reads a 1MByte text file, the output array contains 16 million entries (each array entry is 3 bits by the way). It takes about 20 seco
    nds to run and output data from the 6534 even when reading files that are 200kbyte or so. I'm outputting the data at 5Mbps. I'm not sure where all the delay is coming from. Using the 'Profile VI" function under the 'Tools' menu shows a snapshot of time that really doesn't help me since it only shows that the time is spent in my VI. Is this just the result of loading large files ? Or, is there a way to preload the 1MByte file into the 32MB of RAM on the 6534 card before the VI is actually run. What I mean is that I do have the option in my system to have a time when all text files will somehow be loaded into the 6534 memory, during some initialization period, and then the VI would be run with the text file already loaded. This of course assumes that the delay is loading the file from the harddrive, but since the harddrive transfer speed is fast, I have no idea where to speed things up. Any ideas ? Thanks !

    Your question actually belongs to the Measurement Devices >> Digital IO section since it concerns operating the 653x family of digital boards. You will see other related questions and answers there. In the future, please direct your digital questions to that forum.
    If you are trying to profile your VI, you can break it into different pieces. For instance, you can make a subVI out of the file data manipulation.
    Now, are you doing pattern generation or burst mode handshaking output? From your description of the signal connections, it looks like burst mode. You can double-check in the 653x User Manual at the http://www.ni.com/manuals pages. Still, it looks like you could accomplish your task with pattern generation. There are example VIs for both operations that
    I suggest you start with. They are located in the LabVIEW >> Examples >> Daq >> Digital >> 653x.llb directory.
    It also sounds like you are doing a single buffered operation, where you have a set amount of data that you want to output, and once done, the VI will stop. You are preloading the data to the buffer at DIO Write.vi before the 6534 actually outputs the data with DIO Start.vi when you program like the examples.
    Thus, start with the appropriate example and then add the File I/O to it. You can even test with a smaller file to see the effects. You will also find useful information concerning the 6534 in the KnowledgeBase, particularly KnowledgeBase 298CGF9M "How Many Samples of Data Can I Store in the Onboard Memory of the NI 6534?". You can find this online by going to the http://www.ni.com/support and choosing KnowledgeBase from the Technical Resources pull-down menu. Then, type in keywords to search for, such as "6534".
    Regards,
    Geneva L.
    Applications Engineering
    Nati
    onal Instruments
    http://www.ni.com/ask

  • Loading masterdata and transaction data from same flat file

    hi all,
    how can i load master data and transaction data from the same flatfile at a time.

    I am afraid it is possible.
    Go thru this Uploading Master & Transaction Data together from Flat File

  • External load real and target data in SSM?

    Hi,
    I have a question,
    Can I load the real and target data  in the "metrics manager" module externally?
    Any connector is for this? Can I bring from BW the actual and target data?
    In the "metrics manager" manually load the data ...
    Is there another way to do automatic data loading?
    Thanks for your help..

    Hi,
    You can load data (real and target) with metrics manager, BW connector or directly in PAS.
    Regards,
    Miguel

  • MAXL Import Database (and export data?)

    I have an import database MAXL command that is working great (sql account and password substituted).  The rule file has a SQL connection to our ERP. 
    MAXL> import database PLANNING.DetView data connect as sql_account identified by "Password" using rules_file "'\\\oceanus-d13\\Oracle\\Middleware\\user_projects\\epmsystem3\\EssbaseServer\\essbaseserver1\\app\\PLANNING\\DetView\\NLIncur.rul'" on error write to "'G:\\DB_Process\\DetView_Process\\errors\\DetView_NLIncur_data_load.mxl.err'";
    We are going to run this on a nightly basis and our requirement is to have a historical record of what was "pulled" from our ERP (even if it didn't make it in to Hyperion).
    Here are the options that I've thought of:
    Have a separate SSIS package use the same SQL to dump the data out of the ERP database into a flat file.  The downside to this is that I'm using subvars from Essbase that don't exist in SQL.  So I'd have to write the SQL in a different way potentially causing discrepancies.
    A separate Data Export of what was loaded.  The downside here is that it doesn't have the errors that never made it in.
    I can't find another option in the import database command to spool the output of the SQL to a file. 
    Does anybody have thoughts on how to do this or are there other ways to achieve what I'm trying to do?
    Thanks-
    Cameron McClurg

    The SQL run via the load rule understands my subvars.  The load rule SQL looks like this:
    select...
    WHERE
      AND (('1' = '&IncSpanYr' --IF THE PERIODS SPAN YEARS
      AND (('12' = '&CurMoNm' --IN JUNE LOOK INTO NEXT YEAR PERIOD 1
      AND ((A.FISCAL_YEAR = '&CurYrNm' AND A.ACCOUNTING_PERIOD IN ('&PriMoNm', '&CurMoNm'))
    This turns into:
    WHERE
      AND (('1' = '1' --IF THE PERIODS SPAN YEARS
      AND (('12' = '12' --IN JUNE LOOK INTO NEXT YEAR PERIOD 1
      AND ((A.FISCAL_YEAR = '2014' AND A.ACCOUNTING_PERIOD IN ('2', '3'))
    My issue is getting a dump of all that data that the SQL is pulling.  I don't see a way to do that in the import database command.  A separate job on the SQL side (like SSIS) could pull the data, but can't access the subvars easily.  Does that make sense?  Or did I misunderstand your suggestion?
    Thanks-
    Cameron

  • How to add attachment and export data into MS Access

    Let's say that I use PDF file to capture data from users and import the data to MS Access database (via XML). I wonder if there is a way to let user add attachments in Acrobat Reader and when the data is exported, the attachments are kept separately in a new column in MS Access.

    If you are trying to do this with script from within the PDF ...I do not think so. You woudl not be able to get the stream of bits that make up the attachment to be able to write it to the DB.
    Paul

  • Loading Clob and Blob data using DBMS_LOB

    I am loading some data into a table that has five columns, two of which are defined as BLOB and CLOB respectively. I get the following errors after the pl/sql procedure that loads it has completed running :
    ERROR:ORA-21560: argument 3 is null,
    invalid, or out of range
    ERROR:ORA-22297: warning: Open LOBs exist
    at transaction commit time.
    The following is the outline of the code that loads the table:
    CREATE OR REPLACE PROCEDURE load_data(dir,seq_val,file_name,
    details, etc <== all these are passed in) IS
    dest_loc BLOB;
    src_loc BFILE;
    Amount INTEGER;
    new_dir string(1000);
    new_file string(1000);
    BEGIN
    new_dir := ''||dir||'';
    new_file := ''||file_name||'';
    src_loc := BFileName(new_dir,new_file);
    Amount := dbms_lob.getlength(src_loc);
    insert into table A
    (id
    ,ver
    ,ver
    ,fil_nm <== This field is a BLOB
    ,details <== This Field is a CLOB
    values
    (seq_val
    ,1
    ,version
    ,empty_blob()
    ,detailed_infor
    --dbms_output.put_line(Amount);
    SELECT fil_nm INTO dest_loc FROM table A WHERE id = seq_val FOR UPDATE;
    /* Opening the LOB is mandatory: */
    --dbms_output.put_line('IN SELECT...');
    DBMS_LOB.OPEN(src_loc, DBMS_LOB.LOB_READONLY);
    /* Opening the LOB is optional: */
    DBMS_LOB.OPEN(dest_loc, DBMS_LOB.LOB_READWRITE);
    DBMS_LOB.LOADFROMFILE(dest_loc, src_loc, Amount);
    /* Closing the LOB is mandatory if you have opened it: */
    DBMS_LOB.CLOSE(dest_loc);
    DBMS_LOB.CLOSE(src_loc);
    --dbms_output.put_line('After SELECT...');
    COMMIT;
    END
    Any feedback would be really appreciated. Thanks.

    I assume thats when the ORA-21560: argument 3 is null, invalid, or out of range error occurs. I'm also wondering why and what the other error means saying LOBs are open during transaction commit time. The data is coming from an xml file that is in the following format.
    - <NAME>
    <FIL_NM>TEST.PDF</FIL_NM>
    <VER>2</VER>
    <DETAILS>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyzzzzzzzzzmmmmmmsusssuitttttretc</DETAILS>
    </REPORT>
    <NAME/>
    So what this procedure is doing is opening the pdf and loading the data into the BLOB. I just can't understand what is causing those errors.

  • Save and Export Data format issue/question

    Hi all, I'm hoping someone can help me with what is probably a super-simple question. I have a group of people that will use some forms. They will all have Acrobat Pro so they can save and update the data in the forms.
    Here's my issue. I've tried binding both a sample XML as well as an XSD with the same results.
    1.) If I save the interactive PDF containing the data connection, users can type the information in the form, but fields that are "info only" and not bound to a particular node go away. The file does generate the correct XML.
    2.) If I delete the data connection (but keep the bindings), all the data stays in the form, but now my XML tags are intermixed with my fields and subforms and the xml looks pretty useless.
    So, here's my question, given that users will use Acro Pro 7, how can I ensure that all data stays in the form on save and writes out xml ignoring fields that are not bound to any nodes in the xml.
    Thanks for your help!
    l

    Grid Control records the Serve name in the Repository. So, you will have a problem with it.
    Search this forum for related threads. There are loads of information which may include workarounds on Grid control from one server to the other

  • Execute ABAP program on R3 and export data to BI

    Hi All,
    I would like to know if there are steps to execute the remote program on R3 side and return the data to BI?   I read a few
    articles in there but couldn't figure how to do that yet.  Could some one point me to the source/documents that I can read about?
    Thanks in advance,
    Tai

    If you have an ABAP program on BW, you can call the Function Module on ECC through RFC and it will retireve the data. Depending on data volume and how sophisticated you want to get, you can even packetize the extraction so as to not put a huge strain on your ECC and BW resources.
    This is typically the technology behind how standard content and generic R3/ECC DataSources extract data from an R3/ECC system and into a BW system.
    For modeling purposes, if the data you want to extract is on a table in R3/ECC, you'd be better off creating a generic DataSource, if a standard content DataSource doesn't already exist. RFC enabled Function Modules are good for reading flat files on a R3/ECC server to load into BW.

  • Best Method for Importing and Exporting Data to a local 'resrouce'  file

    I've searched the forum, and seen glimmers of hope to what I am trying to piece together - but not in a concise way that will sink into my brain.
    Using Javascript on a PC for IDCS2, I'm writing a simple script that has a user interface.
    I'd like to have 4 default values for the user interface to be read from (and if altered, written to) a text file.
    What's the simplest way to go about this? I've read through many posts, and toyed around with readln and writeln functions, but nothing is working out. For some reason, I can't send any information to any file - let alone read it back in.
    Could somebody point me in the right direction? For simplicity sake let's say I have just one variable, "myVariable" - and I want to send it to and read it from c:\test.txt.
    Someday - this will all sink in. Right now, I'm reaching for Aspirin.

    Hi D Scott Chinn,
    Try something like this:
    var myFile = File.saveDialog ("Save file as:")
    if(myFile != undefined){
    var myString = "Write this string to a file."
    myFile.open("w");
    myFile.write(myString);
    myFile.close();
    Thanks,
    Ole

  • How to enable Validate and Export in FDM task

    Hi everyone
    I am working with setting up an FDM Task to Import, Validate and Export data to HFM.
    The Task is able to import data to FDM, but I cannot make the process start the Validate and Export functions. If I do the process manually, then data is imported to HFM succesfully.
    Am I missing something in the scripts or do I need to enable some feature in FDM?
    Action Script:
    Sub BatchLoadLedgerTrans()
    'Declare Local Variables
    Dim lngProcessLevel
    Dim strDelimiter
    Dim blnAutoMapCorrect
    'Initialize Variables
    lngProcessLevel = 50   'Import
    strDelimiter = "_"
    blnAutoMapCorrect = 0
    'Create the file collection
    Set BATCHENG.PcolFiles = BATCHENG.fFileCollectionCreate(CStr(strDelimiter), FileName)
    'Execute a Standard Serial batch
    BATCHENG.mFileCollectionProcess BATCHENG.PcolFiles, CLng(lngProcessLevel), , CBool(blnAutoMapCorrect)
    End Sub Integration Script:
    Function LedgerTrans_EDW_to_HFM(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    Dim objSS 'ADODB.Connection
    Dim strSQL 'SQL String
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs Object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    cnss.open "Provider=SQLNCLI11; Data Source=10.250.200.10; Initial Catalog=EDW; User ID=FDM-user; Password=MyPassword"
    cnss.CommandTimeout = 0
    'Create query String - VIEW
    strSQL = "Select * "
    strSQL = strSQL & "FROM EDW.hfm.ledgertranstable "
    'Get data
    rs.Open strSQL, cnSS
    'Check For data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records To load!"
    Exit Function
    End If
    'Loop through records And append To tTB table In location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = lngCatKey ' PlngCatKey
    rsAppend.Fields("PeriodKey") = dblPerKey ' PlngCatKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Account") = rs.fields(2).Value
    rsAppend.Fields("Desc1") = rs.fields(2).Value
    rsAppend.Fields("Entity") = rs.fields(6).Value
    rsAppend.Fields("ICP") = rs.fields(8).Value
    rsAppend.Fields("Amount") = rs.fields(14).Value
    rsAppend.Fields("UD1") = rs.fields(5).Value
    rsAppend.Fields("UD2") = rs.fields(9).Value
    rsAppend.Fields("UD3") = rs.fields(10).Value
    rsAppend.Fields("UD4") = rs.fields(7).Value
    rsAppend.Fields("UD5") = rs.fields(13).Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "SQL Import successful!"
    'Assign Return value
    LedgerTrans_EDW_to_HFM = True
    End Function Best regards
    Frederik
    Edited by: Frederik Andersen on Jun 1, 2013 1:32 AM

    Found the solution.
    The variable lngProcessLevel should be set to "12" to execute the full Import, Validate and Export.
    Best regards
    Frederik

  • JCA IConnection call to BAPI with table in table as import and export param

    Is it possible to call a BAPI with a table in table as import and export data?
    Please give small code example if this is possible.
    Thanks in advance.

    Inner tables can be handled with:
    IRecordSet innerTable = (IRecordSet)outerTable.getObject("INNER_TABLE");

Maybe you are looking for

  • Creating A Word Like Table in a Smartform

    I am trying to display a text table on a smart orm. I know you can pull in an existing table to display on a smartform but this is not what i need. Is there a way i can create a table display(grid format) and just enter in the text i need, i.e like c

  • How do I install OS X Server on my home built server?

    I am currently in the process of planning my build for a home server and trying to cross my Ts and dot my Is before I go start buying everything. Everything I run at home is Apple based and would like to continue that with this server so there is an

  • How to increase disk size in solaris

    Hi all I have two disk c1t0d0s0 / c1t0d0s7 I do haven't space in disk /dev/dsk/c1t0d0s0 run df -h /dev/dsk/*c1t0d0s0* 8,8G 7,4G 1,3G 86% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/

  • Asking for Credentials (Authentication) while trying to open Report Manager.

    Hi All, New to Reporting (using ssrs 2012). I was able to deploy the report project at http://<my machine name>/reportserver but when tried to open Report Manager using http://<my machine name>/reports,it's asking for Authentication... UserName and p

  • Map Page of Isreal - no locations??

    Hi, I've finally finished putting photos in my Photobook project. Now I'm just adding text and adjusting backgrounds. A section of the book is a holiday in Israel. When I try to enter locations on the map page it can find none of the locations, such