Hi @AnneTetley, @TimMinter,
I am fortunate that i got the procedures from @SeanKMcGinnis and @AnthonyLatini. Thanks Guys.
Prerequisite: You need to have a Power Automate Premium subscription. I used a trial license to test.
There are two methods using ArcGIS for Power Automate to extract custom geometries and attributes from ArcGIS Online or ArcGIS Enterprise Feature Services.
1. Basic Method - Limited to 150 features (also see NOTE for complex Geometries)
2. Advanced Method - Iterate through all features in batches to get all features. (also see NOTE for complex Geometries)
Basic Method:
Overview: Using ArcGIS for Power Automate functions to extract Feature Geometries and Attributes from a Feature Service and convert it into a EsriJson CSV file. The CSV file is then imported into Power BI as a normal table. Add the ArcGIS for Power BI Visualizer. Drag the Geometry field of the CSV into the " Location" field well. Custom Features are displayed and can be used with other Visualizers.
You can run this process once if the Feature Geometries do not change. If they change you can schedule to run the process regularly or create a Power Automate button in Power BI Desktop to execute manually - I used the button method for testing.
1. Power BI Desktop - Add a New Page, Add the ArcGIS for Power BI Visualizer. Sign in to ArcGIS Online or Enterprise.
2. Add a Power Automate for Power BI Visualizer next to the Map.
3. Edit the Power Automate to create a new flow. Click on "New"
Select the "Instant Cloud Flow" option
4. Add flow steps to the "Power BI Button clicked" button
- Click on "New Step" and search for the "ArcGIS" functions
- Select "Get data from Feature Layer" action
- After the step is added - use the ...(3 dots/ellipses) on the step to create a ArcGIS connection - important for authentication.
- After login you should be able to use the dropdowns to select the "Layers in" and the "Feature layer" you want to use.
- Select "Output Format" as CSV
- To ensure all features (up to 150) are extracted set OBJECTID field, Greater than, 0
5. Write CSV content to a File and folder location
- I added a OneDrive - Create File action
- Add Location of the file
- Add the name and extension of the file
- Add content type - Select CSV from the list
6. Save the Power Automate Flow
- Save and Apply
7. Return the report and Run the flow by pressing the button (use CTRL)
- You have to use the CTRL and Left mouse to execute the button (in edit mode)
- Button will show "Triggered"
- Browse to your folder to locate the CSV file was created from the flow
- Open the file in Excel to inspect content and format
8. Load the CSV file in Power BI
9. Expand the table to locate the "geometry" field
10. Make the ArcGIS visualizer active and drop the "geometry" field in the Location field well
11. View your custom geometries
12. If there are missing polygons the content of the "geometry" field may be larger than 32,767 characters - a Power BI limitation. See the NOTE & Workaround below
Advanced Method
Here is a link to the article by @SeanKMcGinnis. Thanks Sean.
https://community.esri.com/t5/arcgis-for-power-automate-blog/using-arcgis-connectors-for-power-autom...
NOTE: The Geometry field is limited to 32,767 characters - This is a Power BI limitation.
Workaround:
Check for multi-part polygons and convert to single part and generalize complex geometries to a new Feature Class for use in ArcGIS for Power BI
I hope the above steps helps.
Rudolf
PS: Thanks again to @AnthonyLatini and @SeanKMcGinnis from the ArcGIS for Power BI Team