Changing the Length of Attribute Labels

By default, attribute labels are set to be 128 characters long. In some cases, this length is insufficient. For example, if an attribute label is used to store URLs, 128 characters may not be enough to store a full URL or URI. This article provides information for how to modify the attribute label length in your project.

The maximum permitted length for an attribute label is 10.000 characters.

How the attribute label length varies in uploaded data

Depending on the way of uploading data, the maximum attribute length may vary:

  • When uploading data via CloudConnect or API, you can upload attributes with the maximum permitted length of 10,000 characters.

Regardless of how data has been uploaded to the GoodData platform, the GoodData Portal always shows max 255 characters. However:

  • When you export a report or a dashboard to CSV or XLSX, the exported file contains all the uploaded characters.
  • Filters consider the whole length of an attribute label. If you are searching for a particular attribute and your search string is longer than 255 characters, the search successfully returns the found attributes (providing they exist).

Change the length of an attribute label in CloudConnect Designer

Steps:

  1. Open CloudConnect Designer.

  2. Open the project containing the attribute whose length you want to change.

  3. Open the logical data model file, and select the dataset containing the attribute label.

  4. In the Attributes and Facts window, select the Show Datatypes checkbox.  

  5. Select the attribute label. Then, select the Datatypes column for the attribute label. Click Browse….

  6. In the Select Datatypes window, verify that the Text option button has been selected, and enter a new value for the attribute label length.

  1. Click OK.

  2. Save the LDM file.

  3. Publish the updated LDM to your project.

Change the length of an attribute label in the gray pages

To change the length of an attribute label inthe gray pages, apply a MAQL DDL statement to your logical data model through the gray pages. For more information about the gray pages, see Access the Gray Pages for a Workspace.

Before you start, create the MAQL DDL statement.

The MAQL DDL statement has the following format:

ALTER DATATYPE {d_dataset-name_attribute-name.nm_attribute-label-name} VARCHAR(new-label-length); SYNCHRONIZE {dataset.dataset-name} PRESERVE DATA;

 

Example: You have the following objects:

  • label: label.employees.employeeid.employeename
  • attribute: attr.employees.employeeid
  • dataset: dataset.employees

You want to change the length of the attribute label and set it to 256 characters.

When generating the MAQL DDL statement, make sure that you are using the actual names of the label, attribute, and dataset (employees.employeeid.employeenameemployees.employeeid, and employees, repspectively), and that you do not incude the identifier prefix (such as label., attr., and dataset.).

 

Your MAQL DDL statement would be the following:

ALTER DATATYPE {d_employees_employees.employeeid.nm_employees.employeeid.employeename} VARCHAR(256); SYNCHRONIZE {dataset.employees} PRESERVE DATA;

 

Having generated the MAQL statement, proceed to the steps.

Steps:

  1. Create a URL for accessing the project gray page where you can apply the MAQL DDL statement. In the following URL, replace the {workspace_id} section with your project ID. If you do not know your project ID, see Find the Workspace ID.

    https://secure.gooddata.com/gdc/md/{workspace_id}/ldm/manage2
    

    Your URL should look similar to the following:

    https://secure.gooddata.com/gdc/md/e863ii0azrnng2zt4fuu81ifgqtyeoj21/ldm/manage2
    
  2. Log in to the GoodData Portal at https://secure.gooddata.com/.

  3. While logged in to the GoodData Portal, insert the URL created at Step 1 into the browser address bar, and press Enter. The gray page for executing MAQL DDL statements opens.

  4. In the MAQL script field, enter the MAQL DDL statement for changing the attribute label length that you have created before (see the introduction before this procedure). Your screen should look similar to the following: 

  5. Click Submit. The attribute label’s maximum length is updated.

  6. To verify the change, send a sample test dataset through CloudConnect Designer.