I have some patterns setup to scrape file contents and that works as expected. What I am looking for is to export data into a CSV. This works for the most part. The issue I am having is trying to create a URL based on the data scraped. The beginning of the URL is static and I want to add the data that scraped to the URL but only if there is actually something to build.
The following works if I have a value in VARIABLE_1. I am hoping to blank the whole svc_link_server1 column in the export if the variable has no value.
Currently, the condition below is not working fully. The or '' works if the value of the variable is empty but it leaves the string "https://WEBSITE_START/" in the field if there is no variable to fill in.
"https://WEBSITE_START/" + VARIABLE_1 or '') AS 'svc_link_server1'
Is there a way to formulate the query to have the full URL built if there is a variable value and blank the entire thing out if there is not? I really don't want the "https://WEBSITE_START/" alone in the export.
You can see the result I am trying to avoid below:
I would rather it blank if it can't fill out.
No doubt I am struggling to explain this clearly and apologize.
You could do VARIABLE1 and ('htps://WEBSITE_START' + VARIABLE1)
That works brilliantly.