7.00.02 - Tips - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Aster Analytics
Release Number
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
English (United States)
  • If the modularity when you specify multiple resolution points in the Resolution argument differs from the modularity for the same resolution points when you specify them individually, Teradata recommends specifying the resolution points individually.
  • The function runs faster on graphs with vertices of data type INTEGER or BIGINT, because they use less memory than graphs with vertices of other data types.

    Suppose that you have vertices table string_nodes with column id of data type VARCHAR and edges table string_edges with columns src_id, dest_id, and weight of data types VARCHAR, VARCHAR, and INTEGER, respectively. You can generate equivalent INTEGER-based vertex and edges tables statements such as these:

    CREATE TABLE int_nodes (id_string VARCHAR, id_int INTEGER)
      DISTRIBUTE BY HASH(id_int);
    INSERT INTO int_nodes SELECT id, row_number()
      OVER (ORDER BY id) FROM string_nodes;
    CREATE TABLE int_edges (src INTEGER, dest INTEGER, weight INTEGER)
        SELECT m1.id_int, m2.id_int, weight
          FROM string_edges E, int_nodes m1, int_nodes m2
          WHERE E.src_id = m1.id_string AND E.dest_id = m2.id_string;
  • If the column community_id that the function generates has data type VARCHAR, and you want community_id to have the data type INTEGER, use either of the these statements (where modularity_output is the output table generated by the function):
    SELECT id, rank() OVER (ORDER BY community_id) AS comm_int_id
      FROM  modularity_output;
    SELECT id, dense_rank() OVER (ORDER BY community_id) AS comm_int_id
      FROM  modularity_output;