Skip to content

Using arc.open() on a layer with a definition query returns entire layer without definition query #99

Description

@owenh28

Describe the bug
Using arc.open() on a layer with a definition query returns entire layer without definition query.
To Reproduce
Steps to reproduce the behavior:

  1. Create a new R based geoprocessing script tool to the likes of this:
library(arcgisbinding)
library(sf)
tool_exec <- function(in_params, out_params){
  def_query_open <- arc.open(in_params[["def_query_layer"]])
  def_query_sf <- def_query_open |> arc.select() |> arc.data2sf()
  def_query_sf |> st_write('./this.csv')
}
  1. Create a layer with a definition query
  2. Run the tool and inspect the output csv file, which has all the data within a layer

arcgisbinding info (please complete the following information):

  • arc.check_product() output:
product: ArcGIS Pro (13.6.0.59527)
license: Advanced
version: 1.0.1.311 
  • arc.check_portal() output:

    *** Current
    url		: https://www.arcgis.com/
    version	: 2025.3
    user		: VTC_GIS1
    organization	: Veritá Telecommunications Corporation 
    
  • R Notebook/ R-Studio/ R IDE: Positron (latest release)

  • OS: Windows 11

Additional context

Not an issue if arc.select() is configured to execute the same SQL query as the definition query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions