-
Hello, I'm currently utilizing Benthos for scraping CSV data using the http_client input. My aim is to use it in a batch mode daily. Therefore, I need it to exit once the download and output flow are completed. Is there a method to achieve this? Thank you in advance for your assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@omers Hey 👋 Sure, you can either use the |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the information! input:
label: "scrape_site"
read_until:
input:
http_client:
url: "https://***************************"
verb: GET
timeout: 5s
retry_period: 3s
max_retry_backoff: 30s
retries: 3
backoff_on:
- 429
drop_empty_bodies: true
stream:
enabled: true
reconnect: true
codec: csv
max_buffer: 1000000
#rate_limit: "daily" # No default (optional)
check: true
restart_input: false
idle_timeout: 2s When i run benthos, it starts and then hangs:
I am doing a very simple processing, and sends the output to postgresql. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
OK, Managed to solve it with the following config: input:
label: "scrape_site"
read_until:
input:
http_client:
url: "https://************"
verb: GET
timeout: 5s
retry_period: 30s
max_retry_backoff: 30s
retries: 3
backoff_on:
- 429
drop_empty_bodies: true
stream:
enabled: false
reconnect: true
scanner:
csv:
parse_header_row: true
max_buffer: 1000000
check: true
restart_input: false
idle_timeout: 2s |
Beta Was this translation helpful? Give feedback.
OK, Managed to solve it with the following config: