• Andrew Magruder
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 3
    Replies
The error message is:  "The dataflow failed to run because you did not specify the data parts in the InsightsExternalDataPart object. : Metadata JSON"

I'm using my org's Enterprise WSDL as a Web Reference (not a Service Reference).

This is my C# code (Visual Studio 2012 set to use Dot Net Framework 4.6.1) that prepares my CSV for upload and puts it into a series of InsightsExternalDataPart's.

            byte[] CSV_Contents_BLOB = File.ReadAllBytes(CSV_FileName);
            string CSV_Contents_Base64_STR = Convert.ToBase64String(CSV_Contents_BLOB);
            byte[] CSV_Contents_Base64_BLOB = System.Text.Encoding.Default.GetBytes(CSV_Contents_Base64_STR);
             File.WriteAllBytes(CSV_BASE64_FileName, CSV_Contents_Base64_BLOB);  

I run some code that creates a GZIP file out of the file whose name is contained in the variable CSV_BASE64_FileName.

I chunk the GZIP file into a series of .BIN files all 9 MB or less in size.  The parentID below shows in the debugger as a typical 18 char SalesForce ID.

I upload the data parts:

            int PartCounter = 1;
            string rowID = "";
            foreach (string MyFileName in Chunked_FileNames)
            {
                InsightsExternalDataPart ChunkPart = new InsightsExternalDataPart();
                Byte[] Partial_CSV_Content_BLOB = File.ReadAllBytes(MyFileName);
                ChunkPart.DataFile = Partial_CSV_Content_BLOB;
                ChunkPart.InsightsExternalDataId = parentID;
                ChunkPart.PartNumber = PartCounter;
                SaveResult[] resultsPART = SfdcBinding.create(new sObject[] { WaveDS_Cr });
                foreach (SaveResult sv in resultsPART)
                    if (sv.success)
                        rowID = sv.id;
                    else
                    {
                        string ErrMsg = "'Add the Data' failed. OK will close the program. Message: " + sv.errors[0].message;
                        MessageBox.Show(ErrMsg);
                        this.Close();
                    }
                PartCounter++;
            }

The code above runs with success.  sv.id in the above is a typical SaleForce ID.

Now I Process the upload:

            //*************************************************************************
            //*                                                                       *
            //*                   "Manage the Upload" title in the PDF                *
            //*                   Now send the chunks to Wave.                        *
            //*                                                                       *
            //*************************************************************************

            WebRef_Enterprise.InsightsExternalData WaveDS_Up = new WebRef_Enterprise.InsightsExternalData();
            WaveDS_Up.Action = "Process";
            WaveDS_Up.Id = parentID;
            SaveResult[] resultsMng = SfdcBinding.update(new sObject[] { WaveDS_Up });
            foreach (SaveResult sv in resultsMng)
                if (sv.success)
                    rowID = sv.id;
                else
                {
                    string ErrMsg = "'Manage the Upload' failed. Click OK to close the program. Message: " + sv.errors[0].message;
                    MessageBox.Show(ErrMsg);
                    this.Close();
                }

In the above code, sv.errors[0].message equals:  "The dataflow failed to run because you did not specify the data parts in the InsightsExternalDataPart object. : Metadata JSON"

I've tried this with and without Base 64 encoding. I've verified the Base 64 encoding at the binary level.

What is the problem?

 

My csv file have 3941495 record, I have checked my file, it has exactly 3941495 record after was compressed, but the result on server is 3941489 record. I got status "CompletedWithWarnings", and this is status message

The job was completed successfully, but failed in the part of the line. From data monitoring to download the error log, please check the failed line.​

Does anyone know how to fix it? Or how to download the error log?

After Winter release we encountered an issue for our .Net integration related to Soap API schema WSDL.
It is a known issue with the XML serialization class from .NET Framework all versions. The XMLSerializer code generation component cannot handle the XSD definitions that have only one element and the occurrence of the element is unbounded.
This is the case with the newly introduced classes ListViewRecord and ListViewRecordColumn from Salesforce API 32.0.
We had to manually modify the schema and altered the constructors for those 2 classes mentioned above by adding an extra dummy attribute.
This way the XMLSerializer code generator will use the proper XmlSerialization attributes for the constructor.

There should be a way to update WSDL from Salesforce to support .Net integration without manually update

Thank you! 

I have an unusual problem. I  have developed an Apex class which implments schedulable.  I go into Setup -> Develop -> Apex Classes -> Schedule Apex and fill in the form. Now, when I'm selecting the class I just press the icon to give me a list and it only returns the one class which implements schedulable, which would appear the smart way of letting you select the class.

 

However, I get the following error -

Error: You must select an Apex class that implements the Schedulable interface.

 

I'm really baffled by this, see code below.

 

global class TimesheetWeeklyJob implements Schedulable{
    global void execute( SchedulableContext SC ) {
        WeeklyTimesheetProcess.markSubmitted();
        WeeklyTimesheetProcess.createNewSheets();
    }
}

 

My csv file have 3941495 record, I have checked my file, it has exactly 3941495 record after was compressed, but the result on server is 3941489 record. I got status "CompletedWithWarnings", and this is status message

The job was completed successfully, but failed in the part of the line. From data monitoring to download the error log, please check the failed line.​

Does anyone know how to fix it? Or how to download the error log?