Hi Support, I have a problem running the estimation chain in Calc. The error occurs at step 5. Create aggregate tables. The log shows a SQL error that results from a mismatch of field types while creating the table "XXX"."_tree_plot_agg": Error: failed to find conversion function from unknown to text. I have the feeling that maybe one of my .csv files might be the reason (that maybe something is imported as varying string but should be integer). Could you please explain or send an example how the .csv files XXX-aois.csv, XXX-phase1-plots.csv and the plotlist in Collect look like (maybe from Atlantis)? Working with a German keyboard setting these .csv might have been changed by Excel accidentally.
This question is marked "community wiki".
asked 02 Jun '15, 11:14 Fehrmann |
Hello, I guess you are using double sampling with stratification. The stratum column, into the phase1 plot csv file, should be an integer. Please let me know if that fixes the problem, Regards, Mino answered 02 Jun '15, 11:19 Mino Togna ♦♦ |
Dear Mino, thanks for your prompt reply! Unfortunately the problem is not fixed yet. Yes, I am trying to use double sampling, and the stratum in phase1 table is integer. To isolate the error I also tested the most simple case without two phases and without stratification (only the plot as sampling unit). Still I get the same error. I just recognized that the table _plot_aoi is empty (even if the aois were read and visualized by Calc). Maybe this is the reason? answered 02 Jun '15, 12:20 Fehrmann |
If plot_aoi is empty, then the problem is happening when you assign the aoi column during the sampling design settings. Please, make sure that the AOI column you are selecting from your data table, has a valid match with the aoi csv file you import. The match is done at the lowest level of the aoi hierarchy. Please let me know if you need further info, Regards, Mino answered 02 Jun '15, 12:24 Mino Togna ♦♦ |
Dear Mino, after analyzing the error log and crosschecking some SQL queries and their results in the database we finally found the error. Maybe also interesting for others: The reason was that the column "cluster" was missing in our phase1-plots.csv. The SQL query that tries to create the table _tree_fact assumes a "cluster" column, independently whether you choose cluster sampling in the sampling design definition or not. We added this column to our phase1-plots.csv and set cluster=1 for all plots. Maybe you should consider to change the respective SQL query, as users who work with single plots as sampling elements might be confused (or you explain in the documentation how the table should look like if cluster sampling is not used). Thanks for your help, Lutz answered 03 Jun '15, 09:45 Fehrmann |
Dear Lutz, thank you for debugging! It is most likely a bug. Could you please send me some data in order for me to reproduce and fix this error ? Thank you for your cooperation. Regards, Mino answered 18 Jun '15, 12:28 Mino Togna ♦♦ |