Changing field type

Cloudera Data Visualization visuals enable you to change the type of the field as a cast operation of the form cast(expr as type), directly on the fields of the visual. Similarly, you can ensure that a field on a Geo shelf can be used even if it does not automatically satisfy Geo naming conventions.

To change the field type, follow these steps:
  1. Click the field you plan to modify, to open the FIELD PROPERTIES menu.
  2. Under FIELD PROPERTIES, click to expand the Change Type menu.
  3. From the Change Type menu, select one of the options.
    Timestamp

    Timestamp casts data to TIMESTAMP, cast([field] as TIMESTAMP) of the form year-month-Date hour:minute:second.

    For example: 2015-06-09 14:15:45.

    String

    String casts data as STRING, cast([field]as STRING).

    Integer

    Integer casts data to BIGINT, cast([field]as BIGINT).

    Real

    Real casts data to REAL, cast([field]as REAL).

    Boolean

    Boolean casts data to BOOLEAN, cast([field]as BOOLEAN).

    Geo Types

    Geo Types is a grouping of types that make the field usable on the Geo shelf of Map and Interactive Map visuals.

    • Latitude makes the field useable as a latitude measurement
    • Longitude makes the field useable as a longitude measurement
    • Country makes the field useable as a country region
    • State makes the field useable as a state region, for United States of America
    • County makes the field useable as a county region, for United States of America
    • DMA makes the field useable as a Nielsen Designated Market Area Region, for United States of America
    • ZIP Code/Postal Code makes the field useable as a defined zipcode region, for United States of America or postal code for other countries
    • Shape ID makes the field useable as a shape ID

    Note that after a field becomes useable for geo visuals, it is marked on the shelf by the (globe) icon.

    Alternatively, a user with sufficient privileges should declare the field a Geo Type at the level of the dataset. See Specifying Geographic Fields.

  4. Click REFRESH VISUAL to see the changes.

    Fields that carry a type change have a green dot on the Change Type menu.

    To remove a type cast from a field, click on the selected type cast. It removes the check mark.