{"record":{"id":"94cf41e7d71940cc","repo":"pentaho/pentaho-kettle","slug":"salesforceinputdialog-objectnotqueryable","errorCode":"SalesforceInputDialog.ObjectNotQueryable","errorMessage":"SalesforceInputDialog.ObjectNotQueryable","messagePattern":"SalesforceInputDialog\\.ObjectNotQueryable","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java","lineNumber":395,"sourceCode":"      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Error.Connection\" ), e );\n    }\n  }\n\n  public void query( boolean specifyQuery ) throws KettleException {\n\n    if ( getBinding() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Exception.CanNotGetBiding\" ) );\n    }\n\n    try {\n      if ( !specifyQuery ) {\n        // check if we can query this Object\n        DescribeSObjectResult describeSObjectResult = getBinding().describeSObject( getModule() );\n        if ( describeSObjectResult == null ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.ErrorGettingObject\" ) );\n        }\n        if ( !describeSObjectResult.isQueryable() ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"SalesforceInputDialog.ObjectNotQueryable\", module ) );\n        }\n        if ( this.recordsFilter == SalesforceConnectionUtils.RECORDS_FILTER_UPDATED\n          || this.recordsFilter == SalesforceConnectionUtils.RECORDS_FILTER_DELETED ) {\n          // The object must be replicateable\n          if ( !describeSObjectResult.isReplicateable() ) {\n            throw new KettleException( BaseMessages.getString(\n              PKG, \"SalesforceInput.Error.ObjectNotReplicateable\", getModule() ) );\n          }\n        }\n      }\n\n      if ( getSQL() != null && log.isDetailed() ) {\n        log.logDetailed( BaseMessages.getString( PKG, \"SalesforceInput.Log.SQLString\" ) + \" : \" + getSQL() );\n      }\n\n      switch ( this.recordsFilter ) {\n        case SalesforceConnectionUtils.RECORDS_FILTER_UPDATED:","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java#L377-L413","documentation":"In query(), after a successful describe, the wrapper checks describeSObjectResult.isQueryable() and throws this dialog-keyed KettleException if the object does not support SOQL queries. Some Salesforce objects can be described but never queried via the API.","triggerScenarios":"query(specifyQuery=false) against an SObject whose describe reports queryable=false — e.g. certain system objects, history/audit objects, or metadata-like objects.","commonSituations":"Pointing the step at non-queryable objects (e.g. some EventLog/Feed/Share or setup objects); objects only accessible via specific APIs (Bulk/Reports) instead of the standard SOAP query.","solutions":["Choose a queryable object instead (check the object's 'queryable' flag in Workbench or a describe call).","Retrieve history/data through the parent object or a supported API (e.g. EventLogFile via Bulk API).","If you only need specific fields, query the owning object rather than the non-queryable child/metadata object.","Confirm with the Salesforce admin whether the intended data is exposed via another supported object."],"exampleFix":"// before\nconn.setModule(\"UserLoginHistory\"); // queryable=false via SOAP query\n// after\nconn.setModule(\"LoginHistory\"); // queryable alternative","handlingStrategy":"validation","validationCode":"DescribeSObjectResult d = conn.getBinding().describeSObject(conn.getModule());\nif (d != null && !d.isQueryable()) {\n  throw new IllegalArgumentException(conn.getModule() + \" is not SOQL-queryable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  conn.query(false);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"ObjectNotQueryable\")) {\n    logError(\"Choose a queryable SObject for the Salesforce Input step\");\n  }\n  throw e;\n}","preventionTips":["Check the queryable flag in a describe call or Workbench before configuring the step.","Avoid system/metadata/history objects not exposed to SOQL.","Use alternative APIs (Bulk, EventLogFile) for non-queryable data."],"tags":["salesforce","metadata","unsupported-operation","kettle"],"backgroundTag":"unsupported-operation","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}