I'd like to incorporate this manual workflow into my dockpane, but I don't find any useful documentation or samples. Does anyone know if it is possible and if yes, how it can be done?
my manual workflow:
I open an enterprise geodatabase feature class in a map in ArcGIS Pro. Then I open layer properties and go to source. there is the field "Query" (not definition query!) containing something like this "select attribute 1, attribute 2, ..., attribute n FROM layername".
I then click on the pen on the right hand side and modify the query to "select * from layername".
I found this documentation: https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/define-parameters-in-a-query-...
how can i add the layer such that its query says "select * from layername"? any help is greatly appreciated.
It sounds like you're asking how to make a Query Layer from Scratch?
If that's the case:
Make sure an enterprise geodatabase connection is in your project's databases folder
Query layers—ArcGIS Pro | Documentation
Create a query layer for data in a relational database—ArcGIS Pro | Documentation
thanks for your reply, but I'd like to do it using a arcpy-script. is that possible?