Contents:
What is a datamart?
A datamart is a mini data warehouse, or a subset of data derived from a primary data warehouse. Datamarts are typically stored in the same database server as the warehouse. Each datamart table is associated with one report via the Strategy Developer interface. Datamarts can be used to achieve various business needs such as:
How to create a datamart database instance
A datamart can either be stored in the warehouse or in an alternate database server. Users using the warehouse may skip to the 'How to add a datamart to a report' section of this document as the warehouse is optimized for a datamart by default and does not need to be configured separately.
Perform the following steps to create a datamart database instance.



How to add a datamart to a report
Perform the following steps to add a datamart to a report.

What are the advanced settings for datamart reports?
Open the 'Advanced' tab of the datamart report editor to find the following settings to customize the datamart generation. The 'Advanced' tab of the datamart report editor is shown below.

The following are descriptions of each of the settings used in customizing datamart generation.
Troubleshooting datamart reports
When running datamart reports, users may experience errors due to incorrect configuration. The following suggests first steps to take in troubleshooting datamart errors.
Error: No data was inserted into the database, but no errors appeared in the interface
Possible resolution(s): No data was returned in the report results. Verify that the SQL returns data. Test this using the ODBC Test Tool by running the report's SQL without the datamart association.
Error: User not able to create table or insert data into the datamart table
Possible resolution(s): The user does not have permission to either create a table or insert data into this table. Verify that the database login used in the database instance has the correct permissions to insert data and create tables. (If using SQL Server, verify that the database setting 'Select into / Bulk copy' under 'Properties' > 'Options' is selected.)
Error: '..Inserted value too large for column'
Possible resolution(s): When a datamart table is created, a column length is assigned depending on the data type of the inserted column. For example, data types of integers generate a column length of fewer characters than text data types. Perform the following steps to troubleshoot this issue.
The SQL should now reflect the change and add the column alias into the SQL.
Example: The user goes to the attribute editor for 'Customer' and creates a column alias with any name (e.g., 'Custom_column') After updating the schema, this alias appears in the SQL for the datamart table creation.

Example SQL:
drop table ApplySimple_datamart
create table ApplySimple_datamart (
Customer_Id INTEGER,
CustCol_1 VARCHAR(100),
DOLLARSALES FLOAT)
insert into ApplySimple_datamart
select a11.Customer_Id Customer_Id,
max(a13.Cust_Last_Name++a13.Cust_First_Name++a13.Email) CustCol_1,
sum(a11.Order_Amt) DOLLARSALES
from RUSH_ORDER a11
join LU_DATE a12
on (a11.Order_Date = a12.Date_Id)
join LU_CUSTOMER a13
on (a11.Customer_Id = a13.Customer_Id)
where a12.Year_Id = 1998
group by a11.Customer_Id
Datamart FAQ
What does it mean to optimize a database for datamarts?
View the sample SQL for a simple Monthly Sales report whose datamart is located in the following:
< Host name = "sp.example.org" > < Path name = "secure" authType = "shibboleth" requireSession = "true" /> </ Host > with < Host name = "FULLY_QUALIFIED_SERVICE_PROVIDER_HOST_NAME" > < Path name = "MicroStrategy" authType = "shibboleth" requireSession = "true" /> < Path name = "MicroStrategyMobile" authType = "shibboleth" requireSession = "true" /> </ Hostshibboleth2.xml - entityID < SSO entityID = "https://idp.example.org/idp/shibboleth" discoveryProtocol = "SAMLDS" discoveryURL = "https://ds.example.org/DS/WAYF" > SAML2 SAML1 </ SSO > with the following (note that discoveryProtocol and discoveryURL is only required with Shibboleth Identity Provider), < SSO entityID = "YOUR_SSO_SAML_ENTITY_ID" > SAML2 SAML1 </ SSO >shibboleth2.xml - IdP metadata < MetadataProvider type = "XML" url = "https://adfs.example.org/federationmetadata/2007-06/federationmetadata.xml" />shibboleth2.xml - IdP metadata < MetadataProvider type = "XML" file = "partner-metadata.xml" />attribute-map.xml user mapping - AD FS < Attribute name = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname" id = "SBUSER" />attribute-map.xml user mapping < Attribute name = "urn:oid:0.9.2342.19200300.100.1.1" id = "SBUSER" nameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic" />attribute-map.xml user mapping<Attribute name="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" id="SBUSER"/>Datamart Location : WarehouseDatamart Location : Alternate Location | < Host name = "sp.example.org" > < Path name = "secure" authType = "shibboleth" requireSession = "true" /> </ Host > with < Host name = "FULLY_QUALIFIED_SERVICE_PROVIDER_HOST_NAME" > < Path name = "MicroStrategy" authType = "shibboleth" requireSession = "true" /> < Path name = "MicroStrategyMobile" authType = "shibboleth" requireSession = "true" /> </ Hostshibboleth2.xml - entityID < SSO entityID = "https://idp.example.org/idp/shibboleth" discoveryProtocol = "SAMLDS" discoveryURL = "https://ds.example.org/DS/WAYF" > SAML2 SAML1 </ SSO > with the following (note that discoveryProtocol and discoveryURL is only required with Shibboleth Identity Provider), < SSO entityID = "YOUR_SSO_SAML_ENTITY_ID" > SAML2 SAML1 </ SSO >shibboleth2.xml - IdP metadata < MetadataProvider type = "XML" url = "https://adfs.example.org/federationmetadata/2007-06/federationmetadata.xml" />shibboleth2.xml - IdP metadata < MetadataProvider type = "XML" file = "partner-metadata.xml" />attribute-map.xml user mapping - AD FS < Attribute name = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname" id = "SBUSER" />attribute-map.xml user mapping < Attribute name = "urn:oid:0.9.2342.19200300.100.1.1" id = "SBUSER" nameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic" />attribute-map.xml user mapping<Attribute name="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" id="SBUSER"/>Datamart Location : WarehouseDatamart Location : Alternate Location |
drop table Datamart_Test create table Datamart_Test ( insert into Datamart_Test | select a11.Month_Id Month_Id, drop table AF_Datamart create table AF_Datamart ( insert into AF_Datamart values (199701, 'Jan 97', 8817) |
Notice that in the alternate location, extra insert statements appear in the SQL.
The report is first run against the warehouse. The results, which reside in Strategy Intelligence Server, are pulled from Intelligence Server and inserted row by row into the datamart table. In contrast, when the datamart resides in the same location as the warehouse, the results can be directly inserted into the datamart table as shown below.

When choosing to optimize a database for datamarting, users are prompted to designate whether the datamart tables reside in the same database server as an existing warehouse instance. If the datamart tables do reside in the same database server, then it will directly insert into the datamart tables as mentioned above.
Users will encounter errors if the datamart instance is NOT in the same database server as the warehouse and 'This database instance is located in the same warehouse as' checkbox is checked. The engine will attempt to insert results directly into the datamart table, but the SQL will not be correct.
NOTE: Datamart optimization is a start-time parameter. Users must restart the Strategy Intelligence Server for the change to take effect.
Considering the following example:

Three database instances exist in this example:
The checkbox for optimization will be checked and pointing to the warehouse instance for DM1. When a user runs a datamart report pointed to this datamart instance, the results will be automatically inserted into the datamart table.
The checkbox will not be marked for DM2 because it points to a different database server than the warehouse. When a user runs a report associated with this datamart instance, the results will be pulled from the Warehouse and inserted row by row into the alternate datamart database server by Strategy Intelligence Server.