Change the Length of Attribute Labels
Overview
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.
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 the gray pages
Changes made through the gray pages are applied directly to the project definition, including the logical data model, and cannot be reverted.
For more information about the gray pages, see Access the Gray Pages for a Workspace.
To change the length of an attribute label in the gray pages, apply a MAQL DDL statement to your logical data model through the gray pages.
The procedures in this article assume that you access your projects at https://secure.gooddata.com/.
If you are a white-labeled customer, replace secure.gooddata.com
with your white-labeled domain in the procedure steps when needed.
Create a MAQL DDL statement
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 want to change the length of the attribute label and set it to 256 characters and you have the following objects:
- label:
label.employees.employeeid.employeename
- attribute:
attr.employees.employeeid
- dataset:
dataset.employees
When generating the MAQL DDL statement, make sure that you are using the actual names of the label, attribute, and dataset (employees.employeeid.employeename
, employees.employeeid
, and employees
, repspectively), and that you do not include 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;
Apply the MAQL statement
Steps:
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 workspace 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
Log in to the GoodData Portal at https://secure.gooddata.com/.
Insert the URL created at Step 1 into the browser address bar, and press Enter. The gray page for executing MAQL DDL statements opens.
In the MAQL script field, enter the MAQL DDL statement for changing the attribute label length that you have created. Your screen should look similar to the following:
Click Submit. The attribute label’s maximum length is updated.
To verify the change, send a sample test dataset through CloudConnect Designer.