|
POST
|
Just noticed Line 8 should be: with requests.get(replica_url, stream=True, timeout=30) as f:
... View more
09-15-2020
10:41 AM
|
0
|
1
|
2170
|
|
POST
|
Naari, Have you tried the Python requests module to stream the download? import requests
from pathlib import Path
replica_url = "https://services9.arcgis.com/iERBXXD4hiy1L6en/arcgis/rest/services/Example/FeatureServer/replicaFiles/my_replica.zip"
save_dir = Path("C://backup_utility//test.zip")
download_size = requests.get(url, stream=True).headers['Content-length']
with requests.get(replica_url, stream=True, timeout=30) as f:
with open (save_dir, 'wb') as save:
for chunk in f.iter_content(chunk_size = 1024*1024):
save.write(chunk)
size_on_disk = Path(save_dir).stat().st_size
print(f"{size_on_disk} of {download_size} downloaded")
... View more
09-14-2020
04:36 PM
|
0
|
3
|
2170
|
|
POST
|
Yep. Nevertheless, your solution still solves my particular use case and is much appreciated.
... View more
09-07-2020
12:40 PM
|
0
|
0
|
8297
|
|
POST
|
Joshua, I was saying that when you update any setting (either on the Settings tab or programmatically), this date is updated. So if you enable/disable sync, enable/disable editing, enable/disable editor tracking, enable/disable extract,etc., it updates that date.
... View more
09-07-2020
10:44 AM
|
0
|
2
|
8297
|
|
POST
|
I'll just add that this date is apparently also updated any time a setting/capability is updated. Sync, extract, editing, etc. Which is unfortunate - it would be nice to have access to a date that always reflected the last time the data itself changed. I doubt that's possible without querying features on an editor tracking-enabled service.
... View more
09-06-2020
10:46 PM
|
1
|
4
|
8297
|
|
POST
|
Excellent, that does exactly what I was looking for. Thanks Joshua.
... View more
09-06-2020
10:36 PM
|
0
|
0
|
8297
|
|
POST
|
Hey Joshua, Unfortunately this only gives the Modified Date, i.e., the date item details were changed (tags, title, etc.), not the date the data was last changed. The below screenshots are all for the same item. Here's the modified/updated date: And the Data Last Updated date: And the script output, which shows the modified/updated date, not the Data Last Updated date:
... View more
09-05-2020
03:41 PM
|
1
|
8
|
8297
|
|
POST
|
Is there any way to programmatically access the 'Data Last Updated' value on the ArcGIS Online Item Details page, e.g., through the Python API? If not, are there any plans to make it available?
... View more
09-05-2020
01:13 PM
|
1
|
11
|
9439
|
|
POST
|
Rickey, de-clustering resolved the problem. Thanks for prodding me to check that. Unfortunately I need clustering, so it looks like I'll have to sacrifice printing capability. Thanks again.
... View more
02-18-2020
07:38 AM
|
2
|
0
|
3212
|
|
POST
|
Hi David, I am using Esri's default print service. I edited my post to make this clearer. Thanks.
... View more
02-17-2020
10:42 AM
|
0
|
0
|
10149
|
|
POST
|
Thanks Rickey - as I mentioned in the original post, MAP_ONLY is working. In any case, I need my users to just be able to print a map without having to know a workaround or being limited to MAP_ONLY. This will be public-facing.
... View more
02-17-2020
09:56 AM
|
0
|
4
|
10150
|
|
POST
|
Thanks Rickey...I forgot I had removed it. I added it back just now.
... View more
02-17-2020
09:12 AM
|
0
|
1
|
10150
|
|
POST
|
Hi, I built a simple Web AppBuilder application in ArcGIS Online (with all data coming from hosted feature services), but I'm getting strange behavior from Esri's default print service. When trying to use any other layout than MAP_ONLY, it either foes nothing and instantly returns only an "Error, try again" warning as shown below. When I hover over the error, a tooltip says "Cannot read property renderer of undefined". Oddly, MAP_ONLY works fine. Also odd is that I checked several other apps I've previously built, and the print service works fine on those. I've tried rebuilding the app from scratch to no avail, and tried a different browser. Any insight or workaround is appreciated. Below is a screenshot of the app as well as the developer console in Chrome.
... View more
02-17-2020
08:26 AM
|
1
|
14
|
14068
|
|
BLOG
|
This is excellent. Some of my workflows require Integromat to simultaneously fire other varieties of webhooks, but I do have several that only call scripts. I'm going to move the latter over to your workflow as soon as I get a chance.
... View more
02-05-2020
10:34 AM
|
2
|
0
|
4349
|
|
BLOG
|
I discovered a handy workflow for calling and passing arguments to Python scripts using Survey123’s webhook capability, Integromat, and Google Cloud Functions. The possibilities are endless, but some use cases include: Making scripts available and convenient to users without a Python environment on their machine Calling a script each time a survey is submitted or updated (e.g., perform a field calculation) Update records in a separate feature layer based on survey responses In this example, I’ve made a simple web form and Python script that checks an ArcGIS Online org for new items and sends a raw list object of these items via email. This post assumes basic familiarity with Survey123 Webhooks and Integromat. There are great Integromat intro posts from Ismael Chivite here and here. Step 1: Create a Google Cloud Function to run your script Go to https://console.cloud.google.com/, log in with your Google account, and follow prompts to begin a Google Cloud Platform trial. You’ll be provided with a default project titled “My First Project.” From the dashboard of this project, in the Resources pane, click Cloud Functions. You can also go directly to functions at https://console.cloud.google.com/functions At the top of the page, click Create Function. Name your function and accept defaults except Runtime, which you’ll change to Python 3.7. Click the requirements.txt tab, above the code editor pane. This is where you’ll enter any Python modules required by your script that aren’t included in the standard Python distribution. For this example, we will need to add only the arcgis module. Now we add our Python code! Click the main.py tab and paste your code. Be sure to wrap everything in a function, pass ‘request’ as an argument to your function, and assign variables used by the function with request.args.get(‘example’), matching the field names from the Survey123 form you’ll create in the next section. See my example below. Enter your function name under ‘Function to Execute’ and click Create. It will take a few minutes for your function to deploy. Step 2: Create and publish Survey123 Now, let’s create a form to call the Python script. Open Survey123 Connect and create a new survey with fields for each argument you’ll be passing to the script. These field names must match what you provided to the request.args.get() method in the script – in our case, “startDate” and “toEmail”. Publish your survey. Step 3: Set up a scenario in Integromat and connect a webhook to your Survey123 form You’ll need to set up two modules in Integromat: The Survey123 module to watch for a new survey submission, and the HTTP module to make a request that calls the script on Google Cloud Functions and passes arguments to it. Add the Survey123 module to your scenario and connect it to your new survey as described here. Next, add the HTTP module but leave it alone for now. Connect the two modules: Return to your Google Cloud Function, click the Trigger tab, and copy the URL for your function: Paste your URL into the HTTP module in Integromat and add a question mark at the end, followed by your first field/argument name and an equals sign, as shown below. Now grab your first argument from the dynamic fields window by expanding Attributes and clicking the field name: Repeat for additional arguments, separating with an ampersand (&). The final URL in our example looks like this: Step 4: Call your script with the survey Turn on your Integromat scenario (or click Run Once) Open your survey in a web browser, fill in your arguments, and submit. You just called your script!
... View more
01-14-2020
09:15 PM
|
20
|
6
|
10331
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-24-2024 12:44 PM | |
| 1 | 08-13-2024 11:31 AM | |
| 1 | 02-06-2023 05:52 PM | |
| 1 | 09-05-2020 01:13 PM | |
| 2 | 12-24-2024 11:19 AM |
| Online Status |
Offline
|
| Date Last Visited |
09-16-2025
04:51 PM
|