Merge Data Task problem
I'm trying to set up a workflow that merges the results of two queries. The resulting feature sets have the same table structure.
In simplified form the workflow looks like this:
1. Query 1
2. Query 2
3. Convert resulting feature set from "Query 1" to "Data Table 1"
4. Convert resulting feature set from "Query 2" to "Data Table 2"
5. Merge "Data Table1" and "Data Table 2" to "Combined Data Table"
6. Convert "Combinded Data Table" to spreadsheet
7. Create temp file
8. display hyperlink to temp file.
The error I'm getting is ' Cannot serialize the Data Table. Data Table name is not set. '
The problem seems to be related to having two "Feature Set to Data Table" conversions because I can get each of the data tables to work if I set them up in their own workflow.
Where should the table name be set? What am I missing? (I'm guessing it's something obvious.)
Thanks,
Steve
-
Hi Steve
I assume that in simple terms you are doing this in one Sequence.
Try putting a Sequence into your main sequence and then move all of the activities that have anything to do with Dta Tables into that sequence.
Now adjust the scope of the variable to only be within that iner Sequence apart from the hyperlink for the temp file.
Do the Display of the hyperlink in the main sequence.
This way you should be able to avoid trying to serialize your datatables which is what is happening when you shift from doing server side activities to client side ie displaying the hyperlink
Let me know if that doesn't make sense.
Regards
Ralph
PS You could assign the datatable name but there is no gain to doing so in this situation.
0 -
Try first to give names to your datatables.
datatablevariable.TableName = "myname"
E.g. the DataTable to CSV activity gives an error when the table name is not set.
0 -
That is a good recommendation, Ralph.
By the way, there is an In-Arguments called 'Table Name' on 'FeatureSet To DataTable' activity so you may set the data table name for 'Data table 1' from your first query result.
Since 'Merge DataTables' activity merges to the first datatable, your final merged datatable name will be the same as what you set up above.
If you are using the old GE, the 'Table Name' Argument may not available (I can't remember from which version GE introduced 'Table Name' argument on 'FeatureSet To DataTable' activity').
If then, you can set the dataTable name using Assign Activity using DataTable.TableName property 'http://msdn.microsoft.com/en-us/library/system.data.datatable.tablename(v=vs.110).aspx'
However, as Ralph wrote, it is not necessary if it is not absolutely required (like back-and-forth between Server and Client with dataTable object, which is not serializable without TableName).
Munhwan
0 -
Many thanks for the suggestions! I was able to get the merge to work using each suggestion.
Steve
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare