---
title: "Where is the Problem when Creating Aggregate Tables??"
url: "https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables"
tags: ["calc"]
status: "accepted"
score: 0
answer_count: 7
asked: "2017-02-27T12:50:47"
last_activity: "2017-05-22T11:07:15"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# Where is the Problem when Creating Aggregate Tables??

Asked by wexxo on 2017-02-27

Hi,

when trying to make Calc run my calculations, I receive the following error in Step 2 "Create aggregate tables" (see below, [...] resembles same error msgs for different variables).

Any idea what could be the error?

Best regards,

Alex



Error in 'Create aggregate tables' 
 org.jooq.exception.DataAccessException: SQL [create table "nfa_fmi_dedoplistskaro"."_tree_plot_agg" as select "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_id_", coalesce("nfa_fmi_dedoplistskaro"."_tree_fact"."tree_timberquality_code_id_", '-1') as "tree_timberquality_code_id_", coalesce("nfa_fmi_dedoplistskaro"."_tree_fact"."plot_terrain_code_id_", '-1') as "plot_terrain_code_id_", 
[...]
coalesce("nfa_fmi_dedoplistskaro"."_tree_fact"."point_landcover1_code_id_", '-1') as "point_landcover1_code_id_", coalesce("nfa_fmi_dedoplistskaro"."_tree_fact"."tree_class_code_id_", '-1') as "tree_class_code_id_", coalesce("nfa_fmi_dedoplistskaro"."_tree_fact"."species_georgia_id", '-1') as "species_georgia_id", coalesce("nfa_fmi_dedoplistskaro"."_tree_fact"."species_georgia_genus_id", '-1') as "species_georgia_genus_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."_administrative_unit_satyeo_ubani_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."_administrative_unit_satyeo_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."_administrative_unit_kvartarli_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."weight", sum(case when "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area" <> 0 then ("nfa_fmi_dedoplistskaro"."_tree_fact"."tree_basal_area" / "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area") else 0 end) as "tree_basal_area", sum(case when "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area" <> 0 then ("nfa_fmi_dedoplistskaro"."_tree_fact"."tree_volume" / "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area") else 0 end) as "tree_volume", sum(case when "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area" <> 0 then ("nfa_fmi_dedoplistskaro"."_tree_fact"."dbh_class10" / "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area") else 0 end) as "dbh_class10", sum(case when "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area" <> 0 then ("nfa_fmi_dedoplistskaro"."_tree_fact"."tree_h_d" / "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area") else 0 end) as "tree_h_d", sum(case when "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area" <> 0 then ("nfa_fmi_dedoplistskaro"."_tree_fact"."tree_count_n" / "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_area") else 0 end) as "tree_count_n" from "nfa_fmi_dedoplistskaro"."_tree_fact" group by "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_id_", "nfa_fmi_dedoplistskaro"."_tree_fact"."tree_timberquality_code_id_", "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_terrain_code_id_", "nfa_fmi_dedoplistskaro"."_tree_fact"."plot_groundvegetation_code_id_", "nfa_fmi_dedoplistskaro"."_tree_fact"."tree_future_code_id_", "nfa_fmi_dedoplistskaro"."_tree_fact"."stand_origin_code_id_", 
[...]
"nfa_fmi_dedoplistskaro"."_tree_fact"."species_georgia_genus_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."_administrative_unit_satyeo_ubani_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."_administrative_unit_satyeo_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."_administrative_unit_kvartarli_id", "nfa_fmi_dedoplistskaro"."_tree_fact"."weight"]; FEHLER: Operator existiert nicht: boolean / double precision
  Hint: Kein Operator stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.
  Position: 4449
	at org.jooq.impl.Utils.translate(Utils.java:1288)
	at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:495)
	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:327)
	at org.jooq.impl.DefaultDSLContext.execute(DefaultDSLContext.java:492)
	at org.openforis.calc.psql.ExecutablePsqlPart.execute(ExecutablePsqlPart.java:21)
	at org.openforis.calc.chain.post.CreateAggregateTablesTask.createSamplingUnitAggregateTable(CreateAggregateTablesTask.java:299)
	at org.openforis.calc.chain.post.CreateAggregateTablesTask.execute(CreateAggregateTablesTask.java:71)
	at org.openforis.calc.engine.Worker.run(Worker.java:75)
	at org.openforis.calc.engine.Job.execute(Job.java:92)
	at org.openforis.calc.engine.Worker.run(Worker.java:75)
	at org.openforis.calc.engine.Job.run(Job.java:78)
	at org.openforis.calc.engine.TaskManager$1.run(TaskManager.java:254)
	at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:251)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: FEHLER: Operator existiert nicht: boolean / double precision
  Hint: Kein Operator stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.
  Position: 4449
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
	at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:194)
	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:382)
	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:323)
	... 11 more


## Accepted answer (score 0, by Mino Togna on 2017-02-27)

Link: https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables/1099

Hi Alex,

make sure the column join you set for the AOI is the same type of the AOI table you import.
For example, when importing the AOI table, select the right type of the column (maybe integer or real). that column must have the same type of the one in your entity table (you select that into the last step during the up of the sampling design).
Try to re-import the AOI table with the correct column type.

Please let me know if that helps.

Thanks,
Mino


## Answer (score 1, by Mino Togna on 2017-05-22)

Link: https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables/1294

Hi Jos,

thanks for you comments; i will try to add those items into a next release.

regarding the join that depends on how you set them up; make sure you selected the right columns.

You can try to share your survey, because it's quite hard to see what is the problem from your comments.

Thank you,
Mino


## Answer (score 0, by wexxo on 2017-02-27)

Link: https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables/1102

Hi Mino,

thanks for your advice. Unfortunately, it didn't help (or I didn't understand it correctly).
What I did is: I checked the variable type for the code (variable) in the survey which I want to use to define the join. It is the compartment ID, which was set to "real".
After that I checked the AOI file (which includes three levels, level 3 code is the column which I want to use here for the join) and set it to "real". After updating the AOI, the join produced the same error.

I don't know if I got it right.

Thanks again for your help!

Alex


## Answer (score 0, by Mino Togna on 2017-02-27)

Link: https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables/1105

Hi Alex,

what is the datatype of the compartmentID in the collect survey? Sorry to ask you again, but it's not clear if it's a code variable or real. 

Thank you
Mino

ps which version of Calc are you using?


## Answer (score 0, by wexxo on 2017-03-01)

Link: https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables/1115

Dear Mino,

thanks for your help. I finally managed to get the join done. Updating to the latest version (Calc 2.1-a9) and making sure the join columns contain the same type of variable solved the issue. However, I noticed, when dealing with this aoi problem (i.e. updating aoi file), I had to delete the entire Calc workspace and start from scratch.

Thanks again!

Alex


## Answer (score 0, by Mino Togna on 2017-03-03)

Link: https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables/1117

Dear Alex,

Glad to hear the updating to the newest version of Calc resolved the problems. 

It's strange that you had to delete the entire workspace in order to make it work; it's the first time such thing has been reported. 
I will have a deep look into this and will try to reproduce this error.

Thanks for letting us know your feedback,

Mino


## Answer (score 0, by joseph on 2017-05-22)

Link: https://openforis.support/questions/1097/where-is-the-problem-when-creating-aggregate-tables/1292

I have also again this same problem (in the past many times struggling with the AOI): even if accepted at first later in aggregation phase the AOI seems not all right. I remember that exporting the workspace and importing it again it solved the problem... this time not yet. I suggest that the buttons in the sampling design: 1) show also the data types of the join table and 2) for te AOI: that besides/instead the figure also the table is shown (with data types of the columns. Joseph
