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's gravatar image

Fehrmann
613313
accept rate: 0%


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

permanent link

answered 02 Jun '15, 11:19

Mino%20Togna's gravatar image

Mino Togna ♦♦
4365
accept rate: 11%

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?

permanent link

answered 02 Jun '15, 12:20

Fehrmann's gravatar image

Fehrmann
613313
accept rate: 0%

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

permanent link

answered 02 Jun '15, 12:24

Mino%20Togna's gravatar image

Mino Togna ♦♦
4365
accept rate: 11%

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

permanent link

answered 03 Jun '15, 09:45

Fehrmann's gravatar image

Fehrmann
613313
accept rate: 0%

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

permanent link

answered 18 Jun '15, 12:28

Mino%20Togna's gravatar image

Mino Togna ♦♦
4365
accept rate: 11%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×60

question asked: 02 Jun '15, 11:14

question was seen: 4,173 times

last updated: 18 Jun '15, 12:28