Detecting dropped and hidden columns in Sisense Datamodels via API and .smodel File [Linux]
When working with Sisense datamodels, users may need to identify and modify/exclude dropped or hidden columns from the data model. Hidden columns are easily identifiable by the "hidden: true" marker, but detecting dropped columns is less obvious through direct inspection of either the API or the .smodel file. This article outlines how to detect dropped columns accurately.
L2025.1 + Cloud/On-Prem
Step-by-Step Guide:
Main Content Identifying Hidden Columns Hidden columns within a Sisense datamodel are marked with "hidden": true. You can safely filter out any column containing this property in the API response.
Dropped columns do not have an immediately obvious marker. To detect them, follow these steps:
1. Via the .smodel File:
Open the .smodel file for your datamodel. Locate the tupleTransformations section. Dropped columns are indicated by the property: "type": "dont-import" within their transformation definition.
2. Via Sisense API (v2/datamodels/{datamodelId}/schema):
Make a GET request to the endpoint:
v2/datamodels/{datamodelId}/schema In the API response, dropped columns have: "import": false. Filter out any column where "import": false is present.
Knowing how to identify the hidden and dropped columns, you can easily modify the tables through the PATCH/datamodels/{datamodelId}/schema/datasets/{datasetId}/tables/{tableId} endpoint.
Conclusion:
Columns in the Sisense data model may be hidden or dropped based on specific properties: "hidden": true indicates a hidden column, while "import": false marks a dropped one. To verify, pull the latest data model schema using the Sisense API and exclude columns with these attributes in your logic or reporting. Additionally, inspect the .smodel file for the "type": "dont-import" property in a column’s transformation entry to confirm exclusion. If expected dropped columns are not marked accordingly, ensure you’re using the most recent .smodel file and API schema. For custom transformations or non-standard configurations, consult your Sisense administrator or official support documentation for clarification.
References/Related Content
What is the purpose of dropping a column? Dropping a column prevents it from being imported from the database, which helps optimize data model performance by reducing unnecessary load and removing redundant or irrelevant data.
Can a dropped column be restored without using the UI? Yes. You can restore a dropped column by removing the corresponding table entry with "type": "dont-import" from the "tupleTransformations" section in the .smodel file and then reimporting it. Alternatively, you can update the dropped column’s attribute "import": false to "import": true using the Sisense API endpoint PATCH /datamodels/{datamodelId}/schema/datasets/{datasetId}/tables/{tableId}.
Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.