INSERTING QUOTATION MARKS AT THE BEGINING AND END OF A STRING

Hi everyone,

I would like to know, how best I can add quotation marks on a string. I am using the string manipulation to run a number of manipulations. I want that every phrase is expressed inside quotation marks (" "). Eg. Coolant Oil = “Coolant Oil”, these words are contained in a table, so no specific numerical position is known but it should be at the beginning and end of the phrase. See attached picture to assist in understanding the rules and outcome I am using.

Kindly help

Hi @Papoitema , to add quotation marks to any string, you can use:
join("\"", your_string_or_column, "\"")

You basically just need to escape the quotes with the slash.

6 Likes

Thanks @bruno29a it worked well. Highly appreciated.

1 Like

Hi @bruno29a, do you have any idea on how to solve the following problem? I am grabbing documents from PubMed using Table raw to variable loop, when I run from the Document Grabber node it works well as it does one only iteration. However, when I run the loop it gives a warning saying “The directory is not empty”, even though I select an empty directory. Kindly see attached an exemplary of the model below. Furthermore, if there are other open source repository where we can download papers for fields such as mechanical engineering or specifically automotive, kindly advise.

KNIME_project7.knwf (30.1 KB)

Hi @Papoitema , the last post should have gone into a new thread as it’s got nothing to do with the original question of inserting quotation marks and the beginning and end of a string :slight_smile: - may be a forum admin could move this to a new thread.

I took a look at your workflow, I can’t fully execute it as there are some configurations that’s pointing to your own folder structure (C:\Users\****\Desktop\Dts)

So, I’m not sure which node is complaining. Can you paste the full error message? It usually tells you which node it’s complaining about (it gives you the name of the node and its number)

3 Likes

Hi @Papoitema , ok, nevermind, I changed the Dts folder. The issue is that the Dts folder is NOT empty. When you run the workflow the first time, yes, it is empty. But after the first iteration, it will generate a file there. On the second iteration, it expects the folder to be empty, but it’s not, since the first iteration created a file - you can check the folder after the first iteration.

You have to use “Delete after parsing” option in the Document Grabber:

So, steps to be taken:

  1. Delete all files from your Dts folder
  2. Change that option in the workflow
  3. Re-run workflow.

It should run without any issue:

4 Likes

Thank you @bruno29a , sorry or having continued with the old thread. Took note of that and will do so next time. Should I go on and create a new thread for my next question? May be someone may advice on that. Note that I am quite new using the platform.

2 Likes

Please do post separate threads for new questions that you have. We try to keep things tidy so that it helps folks in the future when they use the search function.

(We can leave this thread as is since it looks like you’ve already had both your questions answered here by @bruno29a anyway :+1: )

3 Likes

I have noted @ScottF . Although, my second question is more generic and was not really addressed.

Hi @Papoitema , I thought I addressed the second question…

Did you follow the steps that I gave?

Yes @bruno29a it works perfect. My second point was regarding any repository you may be aware of were one can query for papers in engineering related subject matter. Sorry if it did not come clear on my first post and my apologies again for having those on the same thread.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.