Hi,
In my source file, I have one column named as website_url. Before loading into target, I have to validate if it's value is proper website url or not.
For eg: It should start with www, http:// or https://. Also it should have valid domain. For eg: It should have formate like http://xxxx.xx.xx or other possible value. I am not able to cover all possible scenario and need help of you all expert. I am only 5 month old in Datastage. Your help will be much appreciated.
Thanks.
How to validate a column having website url value
Moderators: chulett, rschirm, roy
How to validate a column having website url value
If at first you don't succeed, call it version 1.0
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
If you are using version 8.7 or later and if you have Information Analyzer licensed then you can use the Data Rules stage to perform a matches_regex test on the URL. This is by far the easiest way to check URLs, as there are so many valid variants.
If you are using version 8.7 or later and if you have Information Analyzer licensed then you can use the Data Rules stage to perform a matches_regex test on the URL. This is by far the easiest way to check URLs, as there are so many valid variants.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks Bob and ray for you reply.
Yes, I am checking this website_url column should not contain character like ! * ' ( ) ; : @ & = + $ , / ? % # [ ] . Apart from that, I am also checking that it should start with www, http:// or https://. I am not able to check the format of this website_url. For eg: If it's value is https://www.google.co.in , it is valid. But if it's value is https://www.googlecoin , it is not valid. Just wanted to know can we come up with common logic that we can implement in job to valid such things. Ray, As you mentioned, it can have many valid variant, that's why I am not able to come with common solution. I have to implement logic in job only, 8.1 Datastage.
Please help!
Thanks.
Yes, I am checking this website_url column should not contain character like ! * ' ( ) ; : @ & = + $ , / ? % # [ ] . Apart from that, I am also checking that it should start with www, http:// or https://. I am not able to check the format of this website_url. For eg: If it's value is https://www.google.co.in , it is valid. But if it's value is https://www.googlecoin , it is not valid. Just wanted to know can we come up with common logic that we can implement in job to valid such things. Ray, As you mentioned, it can have many valid variant, that's why I am not able to come with common solution. I have to implement logic in job only, 8.1 Datastage.
Please help!
Thanks.
If at first you don't succeed, call it version 1.0