<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create a slug before inserting a row in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Create-a-slug-before-inserting-a-row/m-p/2208834#M7896</link>
    <description>Hi everyone, 
&lt;BR /&gt;that's my first post on this forum, so hello 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;I came here because I'm struggling with something. For each product I insert in the db, I must create a slug (from its name) that will be used in further URLs. Basically it just replace every special characters with an '-' and checks that it is unique. 
&lt;BR /&gt;For example a product named "Playstation 3 160Go", the slug should be "playstation-3-160go". 
&lt;BR /&gt;But if there are two products with the same name but that are differents somehow, the slug should still be unique and therefore have a number at the end. 
&lt;BR /&gt;For example if a there are 2 products named "Playstation 3" in the db (one black and one white), the respective slugs should "playstation-3" and "playstation-3-1". 
&lt;BR /&gt; 
&lt;BR /&gt;So my question is, is there a native way to do that in Talend when inserting row in a table ? 
&lt;BR /&gt;If not, what's the best way ? 
&lt;BR /&gt;Thanks ! 
&lt;BR /&gt;Guillaume</description>
    <pubDate>Mon, 06 Jan 2014 16:53:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-06T16:53:09Z</dc:date>
    <item>
      <title>Create a slug before inserting a row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-a-slug-before-inserting-a-row/m-p/2208834#M7896</link>
      <description>Hi everyone, 
&lt;BR /&gt;that's my first post on this forum, so hello 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;I came here because I'm struggling with something. For each product I insert in the db, I must create a slug (from its name) that will be used in further URLs. Basically it just replace every special characters with an '-' and checks that it is unique. 
&lt;BR /&gt;For example a product named "Playstation 3 160Go", the slug should be "playstation-3-160go". 
&lt;BR /&gt;But if there are two products with the same name but that are differents somehow, the slug should still be unique and therefore have a number at the end. 
&lt;BR /&gt;For example if a there are 2 products named "Playstation 3" in the db (one black and one white), the respective slugs should "playstation-3" and "playstation-3-1". 
&lt;BR /&gt; 
&lt;BR /&gt;So my question is, is there a native way to do that in Talend when inserting row in a table ? 
&lt;BR /&gt;If not, what's the best way ? 
&lt;BR /&gt;Thanks ! 
&lt;BR /&gt;Guillaume</description>
      <pubDate>Mon, 06 Jan 2014 16:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-a-slug-before-inserting-a-row/m-p/2208834#M7896</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-06T16:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create a slug before inserting a row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-a-slug-before-inserting-a-row/m-p/2208835#M7897</link>
      <description>There is not native way or any way supported natively by a database. I would strongly suggest using a administration table for your slugs. This table should have a field for the slug text and an auto increment id field.&lt;BR /&gt;For the slug column you should add a unique index on the table.&lt;BR /&gt;You can try to create a slug in the first step like your rule and if this slug is already present you should read the existing one and add "salt" to it.</description>
      <pubDate>Mon, 06 Jan 2014 19:28:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-a-slug-before-inserting-a-row/m-p/2208835#M7897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-06T19:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create a slug before inserting a row</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-a-slug-before-inserting-a-row/m-p/2208836#M7898</link>
      <description>Thanks for you answer.&lt;BR /&gt;Actually I changed myapproch a little. Instead of trying to have the exact slug creation system I described, I went to something custom where I slugify the name and concat it with its id. So I don't have to manage an extra table.&lt;BR /&gt;PS : By slugify, I mean that I have a Java snippet replacing all special characters with '-'</description>
      <pubDate>Tue, 14 Jan 2014 08:14:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-a-slug-before-inserting-a-row/m-p/2208836#M7898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-14T08:14:08Z</dc:date>
    </item>
  </channel>
</rss>

