{
  "id": 24154,
  "title": "Redundant field in database",
  "url": "/competitions/outbrain-click-prediction/discussion/24154",
  "author_name": "",
  "post_date": "2016-10-06T23:58:21.717Z",
  "votes": 4,
  "comment_count": 2,
  "views": 717,
  "content": "<p>Hello!</p>\n\n<p>There is a redundant field <code>document_id</code> in the table <code>promoted_content</code>. It carries the misleading information. Each <code>promoted_content.ad_id</code> can be used in a lot of <code>clicks_train</code> that linked with <code>events</code> via <code>display_id</code> and transitively linked to a lot of different <code>events.document_id</code>s.</p>\n\n<p>Example:</p>\n\n<pre><code>SELECT *\nFROM outbrain.clicks_train c\nINNER JOIN outbrain.events e ON e.display_id = c.display_id\nWHERE ad_id = 2;\n</code></pre>\n\n<p>this query gives us  a list of 22 events with 18 unique <code>document_id</code>s where <code>ad_id</code>==2 is used.</p>\n\n<p>Hence <code>promoted_content.document_id</code> should not be used.</p>\n\n<p>Have a nice day!</p>",
  "messages": [
    {
      "id": "138069",
      "postDate": "10/06/2016 23:58:21",
      "content": "<p>Hello!</p>\n\n<p>There is a redundant field <code>document_id</code> in the table <code>promoted_content</code>. It carries the misleading information. Each <code>promoted_content.ad_id</code> can be used in a lot of <code>clicks_train</code> that linked with <code>events</code> via <code>display_id</code> and transitively linked to a lot of different <code>events.document_id</code>s.</p>\n\n<p>Example:</p>\n\n<pre><code>SELECT *\nFROM outbrain.clicks_train c\nINNER JOIN outbrain.events e ON e.display_id = c.display_id\nWHERE ad_id = 2;\n</code></pre>\n\n<p>this query gives us  a list of 22 events with 18 unique <code>document_id</code>s where <code>ad_id</code>==2 is used.</p>\n\n<p>Hence <code>promoted_content.document_id</code> should not be used.</p>\n\n<p>Have a nice day!</p>",
      "rawMarkdown": "Hello!\r\n\r\nThere is a redundant field `document_id` in the table `promoted_content`. It carries the misleading information. Each `promoted_content.ad_id` can be used in a lot of `clicks_train` that linked with `events` via `display_id` and transitively linked to a lot of different `events.document_id`s.\r\n\r\nExample:\r\n\r\n    SELECT *\r\n    FROM outbrain.clicks_train c\r\n    INNER JOIN outbrain.events e ON e.display_id = c.display_id\r\n    WHERE ad_id = 2;\r\n\r\nthis query gives us  a list of 22 events with 18 unique `document_id`s where `ad_id`==2 is used.\r\n\r\nHence `promoted_content.document_id` should not be used.\r\n\r\nHave a nice day!",
      "votes": null
    },
    {
      "id": "138181",
      "postDate": "10/07/2016 15:15:03",
      "content": "<p>Each row in the promoted content file represents a recommended item; a document which is being promoted by an advertiser as part of a campaign. The <code>document_id</code> associated with each <code>ad_id</code> in the promoted content is the document to which the ad refers (i.e. you would use this table in order to find the topics, categories, or entities referred to in an ad). One or more ads may point to the same document.</p>",
      "rawMarkdown": "Each row in the promoted content file represents a recommended item; a document which is being promoted by an advertiser as part of a campaign. The `document_id` associated with each `ad_id` in the promoted content is the document to which the ad refers (i.e. you would use this table in order to find the topics, categories, or entities referred to in an ad). One or more ads may point to the same document.",
      "votes": null
    },
    {
      "id": "138195",
      "postDate": "10/07/2016 16:05:05",
      "content": "<p>Yep. I almost immediately understood my mistake but could not remove this post. And decided to wait for an official answer. Thank you!</p>",
      "rawMarkdown": "Yep. I almost immediately understood my mistake but could not remove this post. And decided to wait for an official answer. Thank you!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 138181,
      "author_name": "wcukierski",
      "author_url": "",
      "post_date": "10/07/2016 15:15:03",
      "content": "<p>Each row in the promoted content file represents a recommended item; a document which is being promoted by an advertiser as part of a campaign. The <code>document_id</code> associated with each <code>ad_id</code> in the promoted content is the document to which the ad refers (i.e. you would use this table in order to find the topics, categories, or entities referred to in an ad). One or more ads may point to the same document.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 138195,
      "author_name": "santyago",
      "author_url": "",
      "post_date": "10/07/2016 16:05:05",
      "content": "<p>Yep. I almost immediately understood my mistake but could not remove this post. And decided to wait for an official answer. Thank you!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "138069": "Hello!\r\n\r\nThere is a redundant field `document_id` in the table `promoted_content`. It carries the misleading information. Each `promoted_content.ad_id` can be used in a lot of `clicks_train` that linked with `events` via `display_id` and transitively linked to a lot of different `events.document_id`s.\r\n\r\nExample:\r\n\r\n    SELECT *\r\n    FROM outbrain.clicks_train c\r\n    INNER JOIN outbrain.events e ON e.display_id = c.display_id\r\n    WHERE ad_id = 2;\r\n\r\nthis query gives us  a list of 22 events with 18 unique `document_id`s where `ad_id`==2 is used.\r\n\r\nHence `promoted_content.document_id` should not be used.\r\n\r\nHave a nice day!",
    "138181": "Each row in the promoted content file represents a recommended item; a document which is being promoted by an advertiser as part of a campaign. The `document_id` associated with each `ad_id` in the promoted content is the document to which the ad refers (i.e. you would use this table in order to find the topics, categories, or entities referred to in an ad). One or more ads may point to the same document.",
    "138195": "Yep. I almost immediately understood my mistake but could not remove this post. And decided to wait for an official answer. Thank you!"
  },
  "source": "meta"
}