Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with the SSURGO Properties tool - Invalid Query: Incorrect syntax near the keyword 'THEN&#39 #2

Open
abelsantana opened this issue Dec 7, 2022 · 1 comment

Comments

@abelsantana
Copy link

abelsantana commented Dec 7, 2022

tool parameters:
Soil Survey Areas SAPOLYGON from the gSSURGO_CA.gdb
Soil Survey Area Choice List CA638
Aggregation Method Weighted Average
Soil Property 'Total Clay - Rep Value'
Top Depth
Bottom Depth
Min\Max
Output File Geodatabase E:\scratch.gdb
Single Table
Retain Individual Tables false

Tool Messages:

Collecting SSURGO Tabular Data...

Running property: Total Clay - Rep Value
Running State: CA
[Errno Expecting value]


Invalid query: Incorrect syntax near the keyword 'THEN'.

: 0
Error while collecting information returned for Total Clay - Rep Value for CA
The following property(s) failed to execute or returned no results:
CA:Total Clay - Rep Value

Failed script SSURGO Properties...
Failed to execute (SSURGOPROPERTIES).

@brownag
Copy link
Member

brownag commented Dec 9, 2022

The query fails with Incorrect syntax near the keyword 'THEN' because required parameters for the weighted average aggregation method are missing.

For a "horizon-level" soil property (like "Total Clay - Rep Value") you need to specify top and bottom depth interval over which to calculate a depth weighted average. e.g. "Top Depth: 0cm", "Bottom Depth: 25 cm"

I can confirm that this tool works with the following parameters

SSURGO Properties
=====================
Parameters

Soil Survey Areas     F:\Geodata\soils\gSSURGO_FY2023\gSSURGO_CA_FY2023.gdb\SAPOLYGON
Soil Survey Area Choice List     CA638
Aggregation Method     Weighted Average
Soil Property     'Total Clay - Rep Value'
Top Depth     0
Bottom Depth     25
Min\Max     
Output File Geodatabase     F:\Geodata\soils\gSSURGO_FY2023\scratch.gdb
Single Table     false
Retain Individual Tables     false
=====================
Messages

Start Time: Friday, December 9, 2022 10:46:10 AM
​
Collecting SSURGO Tabular Data...
​
Running property: Total Clay - Rep Value
Running State: CA
Succeeded at Friday, December 9, 2022 10:46:21 AM (Elapsed Time: 11.19 seconds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants