none
Error: cannot read table when export R dataframe to Azure Sql Database RRS feed

  • Question

  • Trying to export R data frame as a new table to Azure SQl database but failed with error "cannot read the table..." 

    Anyone knows what might be wrong?

    Record Starts at UTC 06/17/2016 17:12:06: Run the job:"/dll "Microsoft.Analytics.Modules.Writer.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.Writer.Dll.Writer;Run" /dataset "..\..\Dataset\Dataset.dataset" /destination "SqlAzure" /databaseServerName "msdninsight.cloudapp.net" /databaseName "MSDNinsight" /serverUserAccount "insightadmin" /serverUserPassword "********" /trustServerCertificate "False" /originColumns "standScore, CommentType, CommentText, PageUrl, CreatedTime" /destinationTable "test_az" /destinationColumns "standScore, CommentType, CommentText, PageUrl, CreatedTime" /sqlAzureWriteRowsN "50" /treatErrorsAsWarnings "False" /ContextFile "..\..\_context\ContextFile.txt"" [Start] Program::Main [Start] DataLabModuleDescriptionParser::ParseModuleDescriptionString [Stop] DataLabModuleDescriptionParser::ParseModuleDescriptionString. Duration = 00:00:00.0060541 [Start] DllModuleMethod::DllModuleMethod [Stop] DllModuleMethod::DllModuleMethod. Duration = 00:00:00.0000284 [Start] DllModuleMethod::Execute [Start] DataLabModuleBinder::BindModuleMethod [Verbose] moduleMethodDescription Microsoft.Analytics.Modules.Writer.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.Writer.Dll.Writer;Run [Verbose] assemblyFullName Microsoft.Analytics.Modules.Writer.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca [Start] DataLabModuleBinder::LoadModuleAssembly [Verbose] Loaded moduleAssembly Microsoft.Analytics.Modules.Writer.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca [Stop] DataLabModuleBinder::LoadModuleAssembly. Duration = 00:00:00.0086717 [Verbose] moduleTypeName Microsoft.Analytics.Modules.Writer.Dll.Writer [Verbose] moduleMethodName Run [Information] Module FriendlyName : Export Data [Information] Module Release Status : Release [Stop] DataLabModuleBinder::BindModuleMethod. Duration = 00:00:00.0122248 [Start] ParameterArgumentBinder::InitializeParameterValues [Verbose] parameterInfos count = 41 [Verbose] parameterInfos[0] name = dataset , type = Microsoft.Numerics.Data.Local.DataTable [Start] DataTableDatasetHandler::HandleArgumentString [Stop] DataTableDatasetHandler::HandleArgumentString. Duration = 00:00:00.5142372 [Verbose] parameterInfos[1] name = destination , type = Microsoft.Analytics.Modules.Writer.Dll.Writer+WriterDataSourceOrSink [Verbose] Converted string 'SqlAzure' to enum of type Microsoft.Analytics.Modules.Writer.Dll.Writer+WriterDataSourceOrSink [Verbose] parameterInfos[2] name = auth , type = Microsoft.Analytics.Modules.Common.AuthenticationType [Verbose] Set optional parameter auth value to NULL [Verbose] parameterInfos[3] name = sas , type = System.String [Verbose] Set optional parameter sas value to NULL [Verbose] parameterInfos[4] name = accountName , type = System.String [Verbose] Set optional parameter accountName value to NULL [Verbose] parameterInfos[5] name = accountKey , type = Microsoft.Analytics.Modules.SecureString [Verbose] Set optional parameter accountKey value to NULL [Verbose] parameterInfos[6] name = blobPath , type = System.String [Verbose] Set optional parameter blobPath value to NULL [Verbose] parameterInfos[7] name = writeMode , type = Microsoft.Analytics.Modules.Writer.Dll.Writer+WriterBlobFileWriteMode [Verbose] Set optional parameter writeMode value to NULL [Verbose] parameterInfos[8] name = sasFormat , type = Microsoft.Analytics.Modules.LoaderUtils+FileTypes [Verbose] Set optional parameter sasFormat value to NULL [Verbose] parameterInfos[9] name = sasHasHeader , type = System.Boolean [Verbose] Set optional parameter sasHasHeader value to NULL [Verbose] parameterInfos[10] name = blobFormat , type = Microsoft.Analytics.Modules.LoaderUtils+FileTypes [Verbose] Set optional parameter blobFormat value to NULL [Verbose] parameterInfos[11] name = blobHasHeader , type = System.Boolean [Verbose] Set optional parameter blobHasHeader value to NULL [Verbose] parameterInfos[12] name = tableAuthType , type = Microsoft.Analytics.Modules.Common.AuthenticationType [Verbose] Set optional parameter tableAuthType value to NULL [Verbose] parameterInfos[13] name = tableSas , type = System.String [Verbose] Set optional parameter tableSas value to NULL [Verbose] parameterInfos[14] name = tableAccountName , type = System.String [Verbose] Set optional parameter tableAccountName value to NULL [Verbose] parameterInfos[15] name = tableAccountKey , type = Microsoft.Analytics.Modules.SecureString [Verbose] Set optional parameter tableAccountKey value to NULL [Verbose] parameterInfos[16] name = tableNames , type = System.String [Verbose] Set optional parameter tableNames value to NULL [Verbose] parameterInfos[17] name = partitionKey , type = Microsoft.Analytics.Modules.Common.Dll.ColumnSelection [Verbose] Set optional parameter partitionKey value to NULL [Verbose] parameterInfos[18] name = rowKey , type = Microsoft.Analytics.Modules.Common.Dll.ColumnSelection [Verbose] Set optional parameter rowKey value to NULL [Verbose] parameterInfos[19] name = azureTableOriginColumns , type = Microsoft.Analytics.Modules.Common.Dll.ColumnSelection [Verbose] Set optional parameter azureTableOriginColumns value to NULL [Verbose] parameterInfos[20] name = azureTableDestinationColumns , type = System.String [Verbose] Set optional parameter azureTableDestinationColumns value to NULL [Verbose] parameterInfos[21] name = azureTableWriteMode , type = Microsoft.Analytics.Modules.Writer.Dll.Writer+WriteMode [Verbose] Set optional parameter azureTableWriteMode value to NULL [Verbose] parameterInfos[22] name = hiveTableName , type = System.String [Verbose] Set optional parameter hiveTableName value to NULL [Verbose] parameterInfos[23] name = hCatUri , type = System.String [Verbose] Set optional parameter hCatUri value to NULL [Verbose] parameterInfos[24] name = hadoopUsername , type = System.String [Verbose] Set optional parameter hadoopUsername value to NULL [Verbose] parameterInfos[25] name = hadoopPassword , type = Microsoft.Analytics.Modules.SecureString [Verbose] Set optional parameter hadoopPassword value to NULL [Verbose] parameterInfos[26] name = dataLocation , type = Microsoft.Analytics.Modules.Writer.Dll.Writer+DataLocation [Verbose] Set optional parameter dataLocation value to NULL [Verbose] parameterInfos[27] name = hdfsUri , type = System.String [Verbose] Set optional parameter hdfsUri value to NULL [Verbose] parameterInfos[28] name = azureAccountName , type = System.String [Verbose] Set optional parameter azureAccountName value to NULL [Verbose] parameterInfos[29] name = azureStorageKey , type = Microsoft.Analytics.Modules.SecureString [Verbose] Set optional parameter azureStorageKey value to NULL [Verbose] parameterInfos[30] name = containerName , type = System.String [Verbose] Set optional parameter containerName value to NULL [Verbose] parameterInfos[31] name = databaseServerName , type = System.String [Verbose] Passing through string 'msdninsight.cloudapp.net' [Verbose] parameterInfos[32] name = databaseName , type = System.String [Verbose] Passing through string 'MSDNinsight' [Verbose] parameterInfos[33] name = serverUserAccount , type = System.String [Verbose] Passing through string 'insightadmin' [Verbose] parameterInfos[34] name = serverUserPassword , type = Microsoft.Analytics.Modules.SecureString [Verbose] Converted string 'SecureString' to value of type Microsoft.Analytics.Modules.SecureString [Verbose] parameterInfos[35] name = trustServerCertificate , type = System.Boolean [Verbose] Converted string 'False' to value of type System.Boolean [Verbose] parameterInfos[36] name = originColumns , type = System.String [Verbose] Passing through string 'standScore, CommentType, CommentText, PageUrl, CreatedTime' [Verbose] parameterInfos[37] name = destinationTable , type = System.String [Verbose] Passing through string 'test_az' [Verbose] parameterInfos[38] name = destinationColumns , type = System.String [Verbose] Passing through string 'standScore, CommentType, CommentText, PageUrl, CreatedTime' [Verbose] parameterInfos[39] name = sqlAzureWriteRowsN , type = System.Int32 [Verbose] Converted string '50' to value of type System.Int32 [Verbose] parameterInfos[40] name = treatErrorsAsWarnings , type = System.Boolean [Verbose] Converted string 'False' to value of type System.Boolean [Stop] ParameterArgumentBinder::InitializeParameterValues. Duration = 00:00:00.6026404 [Verbose] Begin invoking method Run ... [Stop] DllModuleMethod::Execute. Duration = 00:00:01.1206043 [Critical] Error: Error 1000: AFx Library library exception: Unable to read table. [Critical] {"InputParameters":{"DataTable":[{"Rows":561,"Columns":24,"estimatedSize":15765504,"ColumnTypes":{"System.String":13,"System.Int32":5,"System.Double":5,"System.Nullable`1[System.Double]":1},"IsComplete":true,"Statistics":{"0":[561,0],"1":[0.28698752228163993,0.0,0.0,1.0,0.45275941441788753,2.0,0.0],"2":[114,0],"3":[134,0],"4":[285,0],"5":[541,0],"6":[1463314293.8306596,1462941802.0,1460657274.0,1466177062.0,1157129.8628930943,561.0,0.0],"7":[89,400],"8":[1463314293.3547237,1462941801.0,1460657273.0,1466177062.0,1157129.7852448209,561.0,0.0],"9":[3.5650623885918002,5.0,0.0,5.0,2.2637970720894396,2.0,0.0],"10":[0.84670231729055256,1.0,0.0,3.0,0.4071161629748189,4.0,0.0],"11":[1463332876061760.5,1462941802420128.0,1462240904831363.0,1466177062348967.0,1135183053700.0251,561.0,0.0],"12":[1,0],"13":[1463322049.0958133,1462942105.179436,1461820143.5737495,1466177246.7191787,1145639.6580127936,443.0,0.0],"14":[1463333038.9548352,1462942105.179436,1462241022.7981982,1466177246.7191787,1135179.7375699943,434.0,0.0],"15":[46,0],"16":[46,0],"17":[1463314293.3547237,1462941801.0,1460657273.0,1466177062.0,1157129.7852448209,561.0,0.0],"18":[1463314293.8306596,1462941802.0,1460657274.0,1466177062.0,1157129.8628930943,561.0,0.0],"19":[2,0],"20":[165,0],"21":[534,0],"22":[285,0],"23":[-0.23703703703703705,0.0,-2.0,1.0,0.87206998033704752,4.0,156.0]}}],"Generic":{"destination":"SqlAzure","databaseServerName":"msdninsight.cloudapp.net","databaseName":"MSDNinsight","serverUserAccount":"insightadmin","trustServerCertificate":false,"originColumns":"standScore, CommentType, CommentText, PageUrl, CreatedTime","destinationTable":"test_az","destinationColumns":"standScore, CommentType, CommentText, PageUrl, CreatedTime","sqlAzureWriteRowsN":50,"treatErrorsAsWarnings":false},"Unknown":["Key: serverUserPassword, ValueType : Microsoft.Analytics.Modules.SecureString"]},"OutputParameters":[],"ModuleType":"Microsoft.Analytics.Modules.Writer.Dll","ModuleVersion":" Version=6.0.0.0","AdditionalModuleInfo":"Microsoft.Analytics.Modules.Writer.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.Writer.Dll.Writer;Run","Errors":"Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 1000: AFx Library library exception: Unable to read table. ---> Microsoft.Numerics.AFxLibraryExceptionException: Unable to read table.\r\n at Microsoft.Analytics.IO.Local.SQLAzureWriterComponents.VerifyDestinationColumns(String connectionString, String destinationTable, String[] destination)\r\n at Microsoft.Analytics.IO.Local.SQLAzureWriterComponents.Setup(String connectionString, String destinationTable, DataTable input, String[] origin, String[] destination)\r\n at Microsoft.Analytics.IO.Local.SingleNodeSaver.<>c__DisplayClass10`8.<CreateSaver>b__f(T1 x1, T2 x2, T3 x3, T4 x4, T5 x5)\r\n at Microsoft.Analytics.Modules.Writer.Dll.Writer.Write(DataTable dataset, String databaseServerName, String databaseName, String serverUserAccount, SecureString serverUserPassword, Boolean trustServerCertificate, String originColumns, String destinationTable, String destinationColumns, Int32 chunkSize, Boolean treatErrorsAsWarnings) in d:\\_Bld\\9021\\7669\\Sources\\Product\\Source\\Modules\\Writer.Dll\\SQLWriter.cs:line 70\r\n at Microsoft.Analytics.Modules.Writer.Dll.Writer.RunImpl(DataTable dataset, WriterDataSourceOrSink destination, AuthenticationType auth, String sas, String accountName, SecureString accountKey, String blobPath, WriterBlobFileWriteMode writeMode, FileTypes sasFormat, Boolean sasHasHeader, FileTypes blobFormat, Boolean blobHasHeader, AuthenticationType tableAuthType, String tableSas, String tableAccountName, SecureString tableAccountKey, String tableNames, ColumnSelection partitionKey, ColumnSelection rowKey, ColumnSelection azureTableOriginColumns, String azureTableDestinationColumns, WriteMode azureTableWriteMode, String hiveTableName, String hCatUri, String hadoopUsername, SecureString hadoopPassword, DataLocation dataLocation, String hdfsUri, String azureAccountName, SecureString azureStorageKey, String containerName, String databaseServerName, String databaseName, String serverUserAccount, SecureString serverUserPassword, Boolean trustServerCertificate, String originColumns, String destinationTable, String destinationColumns, Int32 sqlAzureWriteRowsN, Boolean treatErrorsAsWarnings) in d:\\_Bld\\9021\\7669\\Sources\\Product\\Source\\Modules\\Writer.Dll\\Writer.cs:line 230\r\n at Microsoft.Analytics.Modules.Writer.Dll.Writer.Run(DataTable dataset, WriterDataSourceOrSink destination, AuthenticationType auth, String sas, String accountName, SecureString accountKey, String blobPath, WriterBlobFileWriteMode writeMode, FileTypes sasFormat, Boolean sasHasHeader, FileTypes blobFormat, Boolean blobHasHeader, AuthenticationType tableAuthType, String tableSas, String tableAccountName, SecureString tableAccountKey, String tableNames, ColumnSelection partitionKey, ColumnSelection rowKey, ColumnSelection azureTableOriginColumns, String azureTableDestinationColumns, WriteMode azureTableWriteMode, String hiveTableName, String hCatUri, String hadoopUsername, SecureString hadoopPassword, DataLocation dataLocation, String hdfsUri, String azureAccountName, SecureString azureStorageKey, String containerName, String databaseServerName, String databaseName, String serverUserAccount, SecureString serverUserPassword, Boolean trustServerCertificate, String originColumns, String destinationTable, String destinationColumns, Int32 sqlAzureWriteRowsN, Boolean treatErrorsAsWarnings) in d:\\_Bld\\9021\\7669\\Sources\\Product\\Source\\Modules\\Writer.Dll\\EntryPoint.cs:line 288\r\n --- End of inner exception stack trace ---","Warnings":[],"Duration":"00:00:01.1149081"} Module finished after a runtime of 00:00:03.2566460 with exit code -2 Module failed due to negative exit code of -2 Record Ends at UTC 06/17/2016 17:12:11.


    Learning AzureML

    Friday, June 17, 2016 5:15 PM

Answers

  • right, this could be caused if the column names are not matching. Team will look into the error message as well to improve it.
    Tuesday, June 21, 2016 10:33 AM
    Moderator

All replies

  • It turned out that I already have a table on Azure SQL database but with different column names, so that's why the export data module kept failing.

    However, I would say the error message is a little bit confusing here, it says cannont read the table which leaves me thinking something was wrong with the R script module.


    Learning AzureML

    Saturday, June 18, 2016 12:28 AM
  • right, this could be caused if the column names are not matching. Team will look into the error message as well to improve it.
    Tuesday, June 21, 2016 10:33 AM
    Moderator