Skip to main content
Bumped by Community user
Bumped by Community user
added 18 characters in body
Source Link
nr_aus
  • 3.6k
  • 10
  • 29

Im using FME workbench and I have a file which has a field called '_substring4' and another file which has a field called 'Permit Details'.

I simply want to test whether or not the value in substring4, is contained in the value of Permit Details. Both fields are strings.

As an example

  • _substring4 = 27.2
  • Permit Details = Regional Permit number 27.2

Permit Details contains the substring '27.2' therefore should return true. This is just a simple SQL LIKE statement.

I'm currently using a Tester. If I put Permit Details as left Value, using LIKE and put '%27.2%' in the right value, it works. Great!

However when I replace the 27.2 with the field '_substring4', it doesn't work.

ie: The following works (Test passes). This works

However the following doesn't work. (Tester fails)

enter image description here

I've also attempted to use the StringSearcher transformer but I basically get the same problem - Whenever I use the field that contains the raw value it works, but attempts to use the field value fail. iI also tried to change the Tester comparison type to 'Contains' - however this returns all features from the input, which is incorrect. Ive actually just worked it out, will put ( I also thought that inverting the inputs was also the answer up., but its not!)

I've also confirmed that the value of the field is coming through correctly by both writing it out to a file with a data type of string and also the FME Inspector.

I feel like the Tester isn't putting wildcards on the field, so if that's the solution, help in doing this would be great. Alternatively, if there is another mechanism, would be happy to hear it.

Im using FME workbench and I have a file which has a field called '_substring4' and another file which has a field called 'Permit Details'.

I simply want to test whether or not the value in substring4, is contained in the value of Permit Details. Both fields are strings.

As an example

  • _substring4 = 27.2
  • Permit Details = Regional Permit number 27.2

Permit Details contains the substring '27.2' therefore should return true. This is just a simple SQL LIKE statement.

I'm currently using a Tester. If I put Permit Details as left Value, using LIKE and put '%27.2%' in the right value, it works. Great!

However when I replace the 27.2 with the field '_substring4', it doesn't work.

ie: The following works (Test passes). This works

However the following doesn't work. (Tester fails)

enter image description here

I've also attempted to use the StringSearcher transformer but I basically get the same problem - Whenever I use the field that contains the raw value it works, but attempts to use the field value fail. i also tried to change the Tester comparison type to 'Contains' - however this returns all features from the input, which is incorrect. Ive actually just worked it out, will put the answer up.

I've also confirmed that the value of the field is coming through correctly by both writing it out to a file with a data type of string and also the FME Inspector.

I feel like the Tester isn't putting wildcards on the field, so if that's the solution, help in doing this would be great. Alternatively, if there is another mechanism, would be happy to hear it.

Im using FME workbench and I have a file which has a field called '_substring4' and another file which has a field called 'Permit Details'.

I simply want to test whether or not the value in substring4, is contained in the value of Permit Details. Both fields are strings.

As an example

  • _substring4 = 27.2
  • Permit Details = Regional Permit number 27.2

Permit Details contains the substring '27.2' therefore should return true. This is just a simple SQL LIKE statement.

I'm currently using a Tester. If I put Permit Details as left Value, using LIKE and put '%27.2%' in the right value, it works. Great!

However when I replace the 27.2 with the field '_substring4', it doesn't work.

ie: The following works (Test passes). This works

However the following doesn't work. (Tester fails)

enter image description here

I've also attempted to use the StringSearcher transformer but I basically get the same problem - Whenever I use the field that contains the raw value it works, but attempts to use the field value fail. I also tried to change the Tester comparison type to 'Contains' - however this returns all features from the input, which is incorrect. ( I also thought that inverting the inputs was also the answer, but its not!)

I've also confirmed that the value of the field is coming through correctly by both writing it out to a file with a data type of string and also the FME Inspector.

I feel like the Tester isn't putting wildcards on the field, so if that's the solution, help in doing this would be great. Alternatively, if there is another mechanism, would be happy to hear it.

added more info
Source Link
nr_aus
  • 3.6k
  • 10
  • 29

Im using FME workbench and I have a file which has a field called '_substring4' and another file which has a field called 'Permit Details'.

I simply want to test whether or not the value in substring4, is contained in the value of Permit Details. Both fields are strings.

As an example

  • _substring4 = 27.2
  • Permit Details = Regional Permit number 27.2

Permit Details contains the substring '27.2' therefore should return true. This is just a simple SQL LIKE statement.

I'm currently using a Tester. If I put Permit Details as left Value, using LIKE and put '%27.2%' in the right value, it works. Great!

However when I replace the 27.2 with the field '_substring4', it doesn't work.

ie: The following works (Test passes). This works

However the following doesn't work. (Tester fails)

enter image description here

I've also attempted to use the StringSearcher transformer but I basically get the same problem - Whenever I use the field that contains the raw value it works, but attempts to use the field value fail. i also tried to change the Tester comparison type to 'Contains' - however this returns all features from the input, which is incorrect. Ive actually just worked it out, will put the answer up.

I've also confirmed that the value of the field is coming through correctly by both writing it out to a file with a data type of string and also the FME Inspector.

I feel like the Tester isn't putting wildcards on the field, so if that's the solution, help in doing this would be great. Alternatively, if there is another mechanism, would be happy to hear it.

Im using FME workbench and I have a file which has a field called '_substring4' and another file which has a field called 'Permit Details'.

I simply want to test whether or not the value in substring4, is contained in the value of Permit Details. Both fields are strings.

As an example

  • _substring4 = 27.2
  • Permit Details = Regional Permit number 27.2

Permit Details contains the substring '27.2' therefore should return true. This is just a simple SQL LIKE statement.

I'm currently using a Tester. If I put Permit Details as left Value, using LIKE and put '%27.2%' in the right value, it works. Great!

However when I replace the 27.2 with the field '_substring4', it doesn't work.

ie: The following works (Test passes). This works

However the following doesn't work. (Tester fails)

enter image description here

I've also attempted to use the StringSearcher transformer but I basically get the same problem - Whenever I use the field that contains the raw value it works, but attempts to use the field value fail.

I've also confirmed that the value of the field is coming through correctly by both writing it out to a file with a data type of string and also the FME Inspector.

I feel like the Tester isn't putting wildcards on the field, so if that's the solution, help in doing this would be great. Alternatively, if there is another mechanism, would be happy to hear it.

Im using FME workbench and I have a file which has a field called '_substring4' and another file which has a field called 'Permit Details'.

I simply want to test whether or not the value in substring4, is contained in the value of Permit Details. Both fields are strings.

As an example

  • _substring4 = 27.2
  • Permit Details = Regional Permit number 27.2

Permit Details contains the substring '27.2' therefore should return true. This is just a simple SQL LIKE statement.

I'm currently using a Tester. If I put Permit Details as left Value, using LIKE and put '%27.2%' in the right value, it works. Great!

However when I replace the 27.2 with the field '_substring4', it doesn't work.

ie: The following works (Test passes). This works

However the following doesn't work. (Tester fails)

enter image description here

I've also attempted to use the StringSearcher transformer but I basically get the same problem - Whenever I use the field that contains the raw value it works, but attempts to use the field value fail. i also tried to change the Tester comparison type to 'Contains' - however this returns all features from the input, which is incorrect. Ive actually just worked it out, will put the answer up.

I've also confirmed that the value of the field is coming through correctly by both writing it out to a file with a data type of string and also the FME Inspector.

I feel like the Tester isn't putting wildcards on the field, so if that's the solution, help in doing this would be great. Alternatively, if there is another mechanism, would be happy to hear it.

Source Link
nr_aus
  • 3.6k
  • 10
  • 29

FME - Find substring inside of string

Im using FME workbench and I have a file which has a field called '_substring4' and another file which has a field called 'Permit Details'.

I simply want to test whether or not the value in substring4, is contained in the value of Permit Details. Both fields are strings.

As an example

  • _substring4 = 27.2
  • Permit Details = Regional Permit number 27.2

Permit Details contains the substring '27.2' therefore should return true. This is just a simple SQL LIKE statement.

I'm currently using a Tester. If I put Permit Details as left Value, using LIKE and put '%27.2%' in the right value, it works. Great!

However when I replace the 27.2 with the field '_substring4', it doesn't work.

ie: The following works (Test passes). This works

However the following doesn't work. (Tester fails)

enter image description here

I've also attempted to use the StringSearcher transformer but I basically get the same problem - Whenever I use the field that contains the raw value it works, but attempts to use the field value fail.

I've also confirmed that the value of the field is coming through correctly by both writing it out to a file with a data type of string and also the FME Inspector.

I feel like the Tester isn't putting wildcards on the field, so if that's the solution, help in doing this would be great. Alternatively, if there is another mechanism, would be happy to hear it.