{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"ID Unification","type":"markdown"},"seo":{"title":"ID Unification Tips","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"id-unification-tips","__idx":0},"children":["ID Unification Tips"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tips-visualizing-a-graph-table-using-graphviz","__idx":1},"children":["Tips: Visualizing a Graph Table Using Graphviz"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-query-and-export-graph-table-data-as-csv","__idx":2},"children":["Step 1: Query and Export Graph Table Data as CSV"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the following SQL query on the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["graph_unify_loop_${N}"]}," (or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["graph"]},") table for each iteration, and download the resulting data as a CSV file."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  CONCAT('\"',leader_id,'\"') AS leader_id,\n  CONCAT('\"',follower_id,'\"') AS follower_id,\n  '' AS node_label,\n  '' AS node_shape,\n  '' AS edge_label\nFROM ${canonical_id_name}_graph_unify_loop_${N};\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example output:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"leader_id"},"children":["leader_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"follower_id"},"children":["follower_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"node_label"},"children":["node_label"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"node_shape"},"children":["node_shape"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"edge_label"},"children":["edge_label"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"aaa_001\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"3rd_008\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"aaa_001\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"3rd_013\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"aaa_001\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"3rd_005\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"aaa_001\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\"\"xxx_004\"\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-edit-csv-file","__idx":3},"children":["Step 2: Edit CSV File"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open the CSV file in a text editor and replace all instances of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'\"\"'"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["''"]},". This will clean up unnecessary quotes around the values."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Edited example:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"leader_id"},"children":["leader_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"follower_id"},"children":["follower_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"node_label"},"children":["node_label"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"node_shape"},"children":["node_shape"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"edge_label"},"children":["edge_label"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"aaa_001\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"3rd_008\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"aaa_001\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"3rd_013\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"aaa_001\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"3rd_005\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"aaa_001\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"xxx_004\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-convert-csv-to-dot-language-graph","__idx":4},"children":["Step 3: Convert CSV to DOT Language Graph"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ex. Use the 3rd party service - ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docpose.com/csv-to-dot"},"children":["https://docpose.com/csv-to-dot"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tips-expanding-and-visualizing-histogram-columns-from-result_key_stats-example-100-rows","__idx":5},"children":["Tips: Expanding and Visualizing Histogram Columns from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_key_stats"]}," (Example: 100 Rows)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"overview","__idx":6},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this guide, we process and visualize histogram columns such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["histogram_${key_name}"]}," from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_key_stats"]}," table. Using SQL, we transform these columns into a structured format and plot histograms and pie charts for insights."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-result_key_stats-table","__idx":7},"children":["Sample ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_key_stats"]}," Table"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"from_table"},"children":["from_table"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"total_distinct"},"children":["total_distinct"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"distinct_with_email"},"children":["distinct_with_email"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"distinct_with_td_client_id"},"children":["distinct_with_td_client_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"distinct_with_td_global_id"},"children":["distinct_with_td_global_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"distinct_with_td_ssc_id"},"children":["distinct_with_td_ssc_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"histogram_email"},"children":["histogram_email"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"histogram_td_client_id"},"children":["histogram_td_client_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"histogram_td_global_id"},"children":["histogram_td_global_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"histogram_td_ssc_id"},"children":["histogram_td_ssc_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"time"},"children":["time"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["*"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1909226"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30579"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1909096"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1908998"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["680373"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1:30247,2:311,3:14,4:4,7:1,25:1,31:1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1:1738227,2:115270,3:26894,4:10851,5:5474,..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1:1575567,2:166595,3:69711,4:27998,5:16761,..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1:563326,2:96817,3:12685,4:3563,5:1579,..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1689326177"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sql-query-to-transform-and-normalize-histogram-data","__idx":8},"children":["SQL Query to Transform and Normalize Histogram Data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following SQL extracts, normalizes, and formats histogram data for plotting. It includes logic to handle missing x-values and calculate percentages for each bin."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"WITH tbl_histogram AS\n(\n  SELECT\n     CAST(SPLIT_PART(elm, ':', 1) AS BIGINT) AS x,\n     CAST(SPLIT_PART(elm, ':', 2) AS BIGINT) AS num\n  FROM (\n    SELECT\n      SPLIT(histogram_${key_name}, ',') AS hist_ary,\n      ROW_NUMBER() OVER (ORDER BY time DESC) AS id\n    FROM ${canonical_id_name}_result_key_stats\n    WHERE from_table = '*'\n  )\n  CROSS JOIN UNNEST(hist_ary) AS t(elm)\n  WHERE id = 1\n),\ntbl_serial_numbers AS\n(\n  SELECT val\n  FROM (VALUES (SEQUENCE(1, 100, 1))) AS t(seq_ary)\n  CROSS JOIN UNNEST(seq_ary) AS t(val)\n)\nSELECT x, num, num * 1.0 / SUM(num) OVER (ORDER BY x RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS percentage_of_total\nFROM\n(\n  SELECT x, num\n  FROM tbl_histogram\n  UNION ALL\n  SELECT x, 0 AS num\n  FROM (SELECT val AS x FROM tbl_serial_numbers)\n  WHERE x NOT IN (SELECT x FROM tbl_histogram)\n)\nORDER BY x\nLIMIT 100;\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"key-components-of-the-query","__idx":9},"children":["Key Components of the Query"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Percentage Calculation"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["percentage_of_total"]}," computes the proportion of each ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x"]}," relative to the total."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Histogram Bin Range"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SEQUENCE(1, 100, 1)"]}," ensures the x-axis ranges from 1 to 100, even if certain bins are missing."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Row Limit"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LIMIT 100"]}," restricts the output to the first 100 bins."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-visualizations","__idx":10},"children":["Example Visualizations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"1-distinct_with_email-histogram","__idx":11},"children":["1. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["distinct_with_email"]}," Histogram"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"output-table","__idx":12},"children":["Output Table"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"x"},"children":["x"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"num"},"children":["num"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"percentage_of_total"},"children":["percentage_of_total"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30337"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.99"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["313"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.01"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["14"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.00"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.00"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.00"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"observations","__idx":13},"children":["Observations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Most ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canonical_id"]},"s are mapped to only one ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Small counts exist for multiple ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emails"]}," per ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canonical_id"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"bar-graph","__idx":14},"children":["Bar Graph"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/10-2-1.276f9c8ef1ea647049ac8f42ddc4b69e25b5d054c908cab1c50cc92ce9db3d21.b614fcc9.avif","alt":"canonical_id_1"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"pie-chart","__idx":15},"children":["Pie Chart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/10-2-2.e5554b1455423effa2abf6ec7073648ef63ce8947b958f47a79aeb827e1624a2.b614fcc9.avif","alt":"canonical_id_1"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"2-distinct_with_td_client_id-histogram","__idx":16},"children":["2. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["distinct_with_td_client_id"]}," Histogram"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"output-table-1","__idx":17},"children":["Output Table"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"x"},"children":["x"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"num"},"children":["num"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"percentage_of_total"},"children":["percentage_of_total"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1690899"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.90"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["121851"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.07"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["28552"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.02"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["11489"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.01"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5783"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.00"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"observations-1","__idx":18},"children":["Observations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Majority of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canonical_id"]},"s correspond to a single ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_client_id"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Potential reasons:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Many users interact briefly, resulting in only one ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_client_id"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Incomplete stitching of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_client_id"]},"s across sessions."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"bar-graph-1","__idx":19},"children":["Bar Graph"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/10-3-1.10d30c27debc5f1cb41d304efe9639d3e59d690cfb8ee7c9aef824095b9f521a.b614fcc9.avif","alt":"canonical_id_1"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"pie-chart-1","__idx":20},"children":["Pie Chart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/10-3-2.3817d4f15cf0c7743e17669ed572bdab55e96cc6f8f48509063b0c8cc672a571.b614fcc9.avif","alt":"canonical_id_1"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"insights-and-considerations","__idx":21},"children":["Insights and Considerations"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Stitching Accuracy"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Results reflect the accuracy of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canonical_id"]}," stitching. High counts for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x=1"]}," may indicate insufficient linking across identifiers."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User Behavior Patterns"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Distributions help identify how users interact with your platform (e.g., single or multiple identifiers)."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Quality"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Missing or misaligned data may result in skewed histograms."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By visualizing these patterns, we gain deeper insights into user identity stitching and potential areas for data enhancement."]}]},"headings":[{"value":"ID Unification Tips","id":"id-unification-tips","depth":1},{"value":"Tips: Visualizing a Graph Table Using Graphviz","id":"tips-visualizing-a-graph-table-using-graphviz","depth":2},{"value":"Step 1: Query and Export Graph Table Data as CSV","id":"step-1-query-and-export-graph-table-data-as-csv","depth":3},{"value":"Step 2: Edit CSV File","id":"step-2-edit-csv-file","depth":3},{"value":"Step 3: Convert CSV to DOT Language Graph","id":"step-3-convert-csv-to-dot-language-graph","depth":3},{"value":"Tips: Expanding and Visualizing Histogram Columns from result_key_stats (Example: 100 Rows)","id":"tips-expanding-and-visualizing-histogram-columns-from-result_key_stats-example-100-rows","depth":2},{"value":"Overview","id":"overview","depth":3},{"value":"Sample result_key_stats Table","id":"sample-result_key_stats-table","depth":4},{"value":"SQL Query to Transform and Normalize Histogram Data","id":"sql-query-to-transform-and-normalize-histogram-data","depth":3},{"value":"Key Components of the Query","id":"key-components-of-the-query","depth":4},{"value":"Example Visualizations","id":"example-visualizations","depth":3},{"value":"1. distinct_with_email Histogram","id":"1-distinct_with_email-histogram","depth":4},{"value":"Output Table","id":"output-table","depth":5},{"value":"Observations","id":"observations","depth":5},{"value":"Bar Graph","id":"bar-graph","depth":5},{"value":"Pie Chart","id":"pie-chart","depth":5},{"value":"2. distinct_with_td_client_id Histogram","id":"2-distinct_with_td_client_id-histogram","depth":4},{"value":"Output Table","id":"output-table-1","depth":5},{"value":"Observations","id":"observations-1","depth":5},{"value":"Bar Graph","id":"bar-graph-1","depth":5},{"value":"Pie Chart","id":"pie-chart-1","depth":5},{"value":"Insights and Considerations","id":"insights-and-considerations","depth":3}],"frontmatter":{"seo":{"title":"ID Unification Tips"}},"lastModified":"2026-02-17T01:46:37.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/id-unification/p11_tips","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}