Change report data source of a saved report
Load a saved report. Swap one data source for another, and map data columns to corresponding replacement columns. The transform object must specify the original data source and the replacement data source. The replacement data source must exist, as its variables are matched against the original to determine if the replacement will be valid. The input and output formats must match. If a JSON request is posted, a JSON response must be accepted, and likewise for XML.
1{2 "id": "5e3cc32d-d351-4d54-8f01-b9d0b4b9bd7a",3 "creationTimeStamp": "2023-11-15T14:38:42.034Z",4 "modifiedTimeStamp": "2023-11-15T14:38:42.034Z",5 "messages": [6 {7 "code": 27513,8 "item": "bi15",9 "text": "Usage mismatch between data item type and the replacement column."10 },11 {12 "code": 0,13 "item": "bi15",14 "text": "Found matching column for TYPE"15 },16 {17 "code": 27511,18 "text": "One or more data items could not be matched to equivalent columns.. Count = 8"19 },20 {21 "code": 0,22 "text": "Number of original data items that were skipped and not matched to new table: 2"23 },24 {25 "code": 0,26 "text": "Number of original data items that were found in the new table: 1"27 },28 {29 "code": 0,30 "text": "Returning without altering report because there are errors"31 }32 ],33 "evaluation": [],34 "errorMessages": [35 {36 "code": 27512,37 "item": "bi10",38 "text": "Data items not found: bi10"39 },40 {41 "code": 27505,42 "text": "Data source replacement failed."43 }44 ],45 "dataSources": [46 {47 "purpose": "original",48 "namePattern": "uniqueName",49 "uniqueName": "ds7",50 "server": "cas-shared-default",51 "library": "Public",52 "table": "CARS",53 "dataItemReplacements": [],54 "dataItemAdditions": [],55 "filterAdditions": [],56 "rankAdditions": []57 },58 {59 "purpose": "replacement",60 "namePattern": "serverLibraryTable",61 "server": "cas-shared-default",62 "library": "Public",63 "table": "CARSSASHELP",64 "replacementLabel": "CARSSASHELP",65 "dataItemReplacements": [],66 "dataItemAdditions": [],67 "filterAdditions": [],68 "rankAdditions": []69 }70 ],71 "substitutionParameters": [],72 "links": [73 {74 "method": "POST",75 "rel": "createDataMappedReport",76 "type": "application/vnd.sas.report.transform",77 "responseType": "application/vnd.sas.report.transform",78 "title": "Change Data Source",79 "href": "/reportTransforms/dataMappedReports"80 },81 {82 "method": "POST",83 "rel": "extractTranslationWorksheet",84 "type": "application/vnd.sas.report.transform",85 "responseType": "text/plain",86 "title": "Extract a localization worksheet from the report",87 "href": "/reportTransforms/translationWorksheets/{translationLocale}"88 },89 {90 "method": "PUT",91 "rel": "updateTranslationWorksheet",92 "type": "text/plain",93 "title": "Update the localization in the report",94 "href": "/reportTransforms/translationWorksheets/{reportId}/{translationLocale}"95 },96 {97 "method": "POST",98 "rel": "createTranslatedReport",99 "type": "application/vnd.sas.report.transform",100 "responseType": "application/vnd.sas.report.transform",101 "title": "Translate Report",102 "href": "/reportTransforms/translatedReports/{translationLocale}"103 },104 {105 "method": "POST",106 "rel": "createConvertedReport",107 "type": "application/vnd.sas.report.transform",108 "responseType": "application/vnd.sas.report.transform",109 "title": "Convert to XML or JSON",110 "href": "/reportTransforms/convertedReports"111 },112 {113 "method": "POST",114 "rel": "createEvaluatedReport",115 "type": "application/vnd.sas.report.transform",116 "responseType": "application/vnd.sas.report.transform",117 "title": "Semantically Evaluate",118 "href": "/reportTransforms/evaluatedReports"119 },120 {121 "method": "POST",122 "rel": "createParameterizedReport",123 "type": "application/vnd.sas.report.transform",124 "responseType": "application/vnd.sas.report.transform",125 "title": "Substitute Parameter Values",126 "href": "/reportTransforms/parameterizedReports"127 }128 ],129 "reportContent": {130 "@element": "SASReport",131 "xmlns": "http://www.sas.com/sasreportmodel/bird-4.36.0",132 "label": "CL",133 "createdApplicationName": "SAS Visual Analytics 2020",134 "dateModified": "2023-11-15T14:38:04Z",135 "lastModifiedApplicationName": "SAS Visual Analytics 2020",136 "createdLocale": "en_US",137 "nextUniqueNameIndex": 28,138 "results": [],139 "dataDefinitions": [140 {141 "@element": "ParentDataDefinition",142 "name": "dd21",143 "source": "ds7",144 "businessItems": [145 {146 "@element": "RelationalDataItem",147 "name": "bi24",148 "base": "bi10"149 },150 {151 "@element": "RelationalDataItem",152 "name": "bi25",153 "base": "bi17"154 }155 ],156 "relationalQueryList": [],157 "multidimensionalQueryList": [],158 "childQueryRelationshipType": "independent",159 "dataDefinitionList": [160 {161 "@element": "DataDefinition",162 "name": "dd22",163 "type": "multidimensional",164 "source": "ds7",165 "businessItems": [],166 "relationalQueryList": [],167 "multidimensionalQueryList": [168 {169 "@element": "MultidimensionalQuery",170 "columnSortItems": [171 {172 "@element": "MeasureSortItem",173 "sortDirection": "descending",174 "sortLevelList": [],175 "reference": "bi25",176 "sortMemberList": []177 },178 {179 "@element": "SortItem",180 "sortDirection": "ascending",181 "sortLevelList": [],182 "reference": "bi24"183 }184 ],185 "detail": false,186 "axes": [187 {188 "@element": "Query_Axis",189 "type": "column",190 "itemList": [191 "bi24"192 ]193 },194 {195 "@element": "Query_Axis",196 "type": "row",197 "itemList": [198 "bi25"199 ]200 }201 ]202 }203 ],204 "resultDefinitions": [205 {206 "@element": "ResultDefinition",207 "name": "dd23",208 "purpose": "primary",209 "maxRowsBehavior": "truncate",210 "relationalQueryList": [],211 "multidimensionalQueryList": [],212 "maxRowsLookup": "graphDefault"213 }214 ]215 }216 ],217 "status": "executable"218 }219 ],220 "dataSources": [221 {222 "@element": "DataSource",223 "name": "ds7",224 "label": "CARS",225 "type": "relational",226 "casResource": {227 "@element": "CasResource",228 "server": "cas-shared-default",229 "library": "Public",230 "table": "CARS",231 "locale": "en_US"232 },233 "businessItemFolder": {234 "@element": "BusinessItemFolder",235 "items": [236 {237 "@element": "DataItem",238 "name": "bi8",239 "xref": "car",240 "geoInfos": []241 },242 {243 "@element": "DataItem",244 "name": "bi9",245 "xref": "color",246 "geoInfos": []247 },248 {249 "@element": "DataItem",250 "name": "bi10",251 "xref": "dealer",252 "geoInfos": []253 },254 {255 "@element": "DataItem",256 "name": "bi11",257 "xref": "dest",258 "geoInfos": []259 },260 {261 "@element": "DataItem",262 "name": "bi12",263 "xref": "dte",264 "geoInfos": []265 },266 {267 "@element": "DataItem",268 "name": "bi13",269 "xref": "returns",270 "geoInfos": []271 },272 {273 "@element": "DataItem",274 "name": "bi14",275 "xref": "sales",276 "geoInfos": []277 },278 {279 "@element": "DataItem",280 "name": "bi15",281 "xref": "type",282 "geoInfos": []283 },284 {285 "@element": "DataItem",286 "name": "bi16",287 "xref": "wght",288 "geoInfos": []289 },290 {291 "@element": "DataSource_PredefinedDataItem",292 "name": "bi17",293 "label": "Frequency",294 "usage": "quantitative",295 "format": "COMMA12.",296 "calculation": "totalCount",297 "geoInfos": []298 },299 {300 "@element": "DataSource_PredefinedDataItem",301 "name": "bi18",302 "label": "Frequency Percent",303 "usage": "quantitative",304 "format": "PERCENT20.2",305 "calculation": "totalCountPercent",306 "geoInfos": []307 }308 ]309 }310 }311 ],312 "visualElements": [313 {314 "@element": "Graph",315 "name": "ve20",316 "labelAttribute": "Bar - dealer 1",317 "graphType": "bar",318 "dataList": [319 "dd21"320 ],321 "title": {322 "@element": "Title",323 "auto": true,324 "elements": [],325 "paragraphList": [326 {327 "@element": "P",328 "elements": [329 {330 "@element": "DynamicSpan",331 "elements": [],332 "dynamicSpanKey": "bird.autotitle.template.oneOfTwo.fmt.txt",333 "substitutions": [334 {335 "@element": "Substitution",336 "valueType": "label",337 "itemsList": [338 "bi17"339 ]340 },341 {342 "@element": "Substitution",343 "valueType": "label",344 "itemsList": [345 "bi10"346 ]347 }348 ]349 }350 ]351 }352 ]353 },354 "gtml": "<StatGraph border=\"false\" opaque=\"false\" includeMissingDiscrete=\"true\" selectionMode=\"multiple\" missingValueDisplay=\"autolabel\">\r\n <Dimension/>\r\n <PadAttrs top=\"0px\" bottom=\"0px\" left=\"0px\" right=\"0px\"/>\r\n <Dimension/>\r\n <Meta>\r\n <DynVars>\r\n <DynVar name=\"CATEGORY\" description=\"CATEGORY_VAR\" required=\"true\" assignedType=\"character\" type=\"character\">\r\n <DefaultValues>\r\n <Value>dd23.bi24</Value>\r\n </DefaultValues>\r\n </DynVar>\r\n <DynVar name=\"RESPONSE\" description=\"MEASURE_VAR\" required=\"true\" assignedType=\"numeric\" type=\"numeric\" multiplesAllowed=\"true\">\r\n <DefaultValues>\r\n <Value>dd23.bi25</Value>\r\n </DefaultValues>\r\n </DynVar>\r\n <DynVar name=\"GROUP\" description=\"SUBGROUP_VAR\" required=\"false\" type=\"character\"/>\r\n <DynVar name=\"COLUMN\" description=\"HORIZONTAL_SERIES_VAR\" required=\"false\" type=\"character\" multiplesAllowed=\"true\"/>\r\n <DynVar name=\"ROW\" description=\"VERTICAL_SERIES_VAR\" required=\"false\" type=\"character\" multiplesAllowed=\"true\"/>\r\n <DynVar name=\"TIP\" description=\"TIP_VAR\" required=\"false\" assignedType=\"numeric\" type=\"any\" multiplesAllowed=\"true\">\r\n <DefaultValues>\r\n <Value>dd23.bi24</Value>\r\n <Value>dd23.bi25</Value>\r\n </DefaultValues>\r\n </DynVar>\r\n <DynVar name=\"KEY_FRAME\" description=\"ANIMATION\" required=\"false\" type=\"time\" multiplesAllowed=\"false\"/>\r\n <DynVar name=\"HIDDEN\" description=\"HIDDEN_VAR\" required=\"false\" type=\"character\" multiplesAllowed=\"true\"/>\r\n </DynVars>\r\n <DataNameMap>\r\n <Entry model=\"LayoutDataMatrix\" data=\"dd23\"/>\r\n </DataNameMap>\r\n </Meta>\r\n <LayoutDataMatrix cellHeightMin=\"1px\" cellWidthMin=\"1px\" includeMissingClass=\"true\" rowVars=\"ROW\" columnVars=\"COLUMN\" name=\"LayoutDataMatrix\">\r\n <LayoutPrototypeOverlay2D>\r\n <BarChartParm name=\"BarChart\" tipListPolicy=\"replace\" _stmt=\"barchart\" compactLabelFormats=\"true\" groupDisplay=\"cluster\" orient=\"horizontal\" stat=\"none\" tip=\"TIP\" category=\"CATEGORY\" responseVars=\"RESPONSE\" group=\"GROUP\"/>\r\n <XAxisOpts name=\"categoryAxis\">\r\n <DiscreteOpts sortOrder=\"data\"/>\r\n <LinearOpts>\r\n <TickValueFormatOpts extractScale=\"true\"/>\r\n </LinearOpts>\r\n </XAxisOpts>\r\n <YAxisOpts reverse=\"true\">\r\n <DiscreteOpts tickValueFitPolicy=\"staggertruncatedrop\" sortOrder=\"data\" tickValueAppearance=\"auto\"/>\r\n <LinearOpts>\r\n <TickValueFormatOpts extractScale=\"true\"/>\r\n </LinearOpts>\r\n </YAxisOpts>\r\n </LayoutPrototypeOverlay2D>\r\n </LayoutDataMatrix>\r\n <LayoutGlobalLegend legendTitlePosition=\"top\" allowCollapsed=\"true\">\r\n <AutoLegend>\r\n <GraphNames>\r\n <Value>BarChart</Value>\r\n </GraphNames>\r\n </AutoLegend>\r\n </LayoutGlobalLegend>\r\n <Animation keyFrameSortOrder=\"ascending_unformatted\" keyFrame=\"KEY_FRAME\"/>\r\n <OverviewAxis maxPlotSize=\"60px\" minPlotSize=\"35px\" visible=\"off\" axis=\"categoryAxis\"/>\r\n</StatGraph>\r\n",355 "supplementalVisualList": [356 "ve26"357 ],358 "resultDefinitionList": [359 "dd23"360 ],361 "sourceInteractionVariableList": [],362 "editorProperties": [363 {364 "@element": "Editor_Property",365 "value": "true",366 "key": "isAutoLabel"367 },368 {369 "@element": "Editor_Property",370 "value": "bi25",371 "key": "autoFrequencyQueryDataItemName"372 }373 ]374 },375 {376 "@element": "Table",377 "labels": [],378 "dataList": [379 "dd21"380 ],381 "columns": {382 "@element": "Table_Columns",383 "columns": [384 {385 "@element": "Table_Column",386 "variable": "bi24"387 },388 {389 "@element": "Table_Column",390 "variable": "bi25"391 }392 ]393 },394 "name": "ve26",395 "columnSizing": "autoFill",396 "resultDefinitionList": [397 "dd23"398 ],399 "sourceInteractionVariableList": []400 }401 ],402 "promptDefinitions": [],403 "view": {404 "@element": "View",405 "header": {406 "@element": "Header",407 "mediaContainerList": [408 {409 "@element": "MediaContainer",410 "target": "mt2",411 "layout": {412 "@element": "ResponsiveLayout",413 "orientation": "horizontal",414 "overflow": "fit",415 "weights": [416 {417 "@element": "Weights",418 "mediaTarget": "mt5",419 "unit": "percent",420 "values": [421 {422 "@element": "Weight",423 "value": "100%"424 }425 ]426 },427 {428 "@element": "Weights",429 "mediaTarget": "mt4",430 "unit": "percent",431 "values": [432 {433 "@element": "Weight",434 "value": "100%"435 }436 ]437 },438 {439 "@element": "Weights",440 "mediaTarget": "mt3",441 "unit": "percent",442 "values": [443 {444 "@element": "Weight",445 "value": "100%"446 }447 ]448 }449 ]450 },451 "containedElementList": []452 }453 ],454 "location": "top"455 },456 "sections": [457 {458 "@element": "Section",459 "name": "vi6",460 "label": "Page 1",461 "header": {462 "@element": "Header",463 "mediaContainerList": [464 {465 "@element": "MediaContainer",466 "target": "mt2",467 "layout": {468 "@element": "ResponsiveLayout",469 "orientation": "horizontal",470 "overflow": "fit",471 "weights": [472 {473 "@element": "Weights",474 "mediaTarget": "mt5",475 "unit": "percent",476 "values": [477 {478 "@element": "Weight",479 "value": "100%"480 }481 ]482 },483 {484 "@element": "Weights",485 "mediaTarget": "mt4",486 "unit": "percent",487 "values": [488 {489 "@element": "Weight",490 "value": "100%"491 }492 ]493 },494 {495 "@element": "Weights",496 "mediaTarget": "mt3",497 "unit": "percent",498 "values": [499 {500 "@element": "Weight",501 "value": "100%"502 }503 ]504 }505 ]506 },507 "containedElementList": []508 }509 ],510 "location": "top"511 },512 "body": {513 "@element": "Body",514 "mediaContainerList": [515 {516 "@element": "MediaContainer",517 "target": "mt2",518 "layout": {519 "@element": "ResponsiveLayout",520 "orientation": "vertical",521 "overflow": "fit",522 "weights": [523 {524 "@element": "Weights",525 "mediaTarget": "mt5",526 "unit": "percent",527 "values": [528 {529 "@element": "Weight",530 "value": "100%"531 }532 ]533 },534 {535 "@element": "Weights",536 "mediaTarget": "mt4",537 "unit": "percent",538 "values": [539 {540 "@element": "Weight",541 "value": "100%"542 }543 ]544 },545 {546 "@element": "Weights",547 "mediaTarget": "mt3",548 "unit": "percent",549 "values": [550 {551 "@element": "Weight",552 "value": "100%"553 }554 ]555 }556 ]557 },558 "containedElementList": [559 {560 "@element": "Visual",561 "name": "vi19",562 "ref": "ve20",563 "responsiveConstraint": {564 "@element": "ResponsiveConstraint",565 "widthConstraint": {566 "@element": "Responsive_WidthConstraint",567 "widths": [568 {569 "@element": "Width",570 "mediaTarget": "mt3",571 "preferredSizeBehavior": "ignore",572 "flexibility": "flexible"573 }574 ]575 },576 "heightConstraint": {577 "@element": "Responsive_HeightConstraint",578 "heights": [579 {580 "@element": "Height",581 "mediaTarget": "mt3",582 "preferredSizeBehavior": "ignore",583 "flexibility": "flexible"584 }585 ]586 }587 }588 }589 ]590 }591 ]592 }593 }594 ]595 },596 "actions": [],597 "interactions": [],598 "mediaSchemes": [599 {600 "@element": "MediaScheme",601 "name": "ms1",602 "baseStylesheetResource": {603 "@element": "BaseStylesheetResource",604 "theme": "opal"605 },606 "stylesheet": {607 "@element": "Stylesheet",608 "styles": {}609 }610 }611 ],612 "mediaTargets": [613 {614 "@element": "MediaTarget",615 "name": "mt2",616 "windowSize": "default",617 "scheme": "ms1"618 },619 {620 "@element": "MediaTarget",621 "name": "mt3",622 "windowSize": "small",623 "scheme": "ms1"624 },625 {626 "@element": "MediaTarget",627 "name": "mt4",628 "windowSize": "medium",629 "scheme": "ms1"630 },631 {632 "@element": "MediaTarget",633 "name": "mt5",634 "windowSize": "large",635 "scheme": "ms1"636 }637 ],638 "properties": [639 {640 "@element": "Property",641 "key": "displayDataSource",642 "value": "ds7"643 }644 ],645 "reportParts": [],646 "dataSourceMappings": [],647 "exportProperties": [648 {649 "@element": "Export",650 "destination": "pdf",651 "exportPropertyList": [652 {653 "@element": "Export_Property",654 "key": "showCoverPage",655 "value": "true",656 "content": ""657 },658 {659 "@element": "Export_Property",660 "key": "showPageNumbers",661 "value": "true",662 "content": ""663 }664 ]665 }666 ],667 "history": {668 "@element": "History",669 "editors": [670 {671 "@element": "Editor",672 "applicationName": "VA",673 "revisions": [674 {675 "@element": "Revision",676 "editorVersion": "2020",677 "lastDate": "2023-11-15T14:38:04.615Z"678 }679 ]680 }681 ]682 },683 "sasReportState": {684 "@element": "SASReportState",685 "view": {686 "@element": "View_State",687 "sections": []688 }689 },690 "features": [],691 "implicitInteractions": [692 "reportPrompt",693 "sectionPrompt",694 "sectionLink"695 ]696 }697}
Name | Type | Required | Description |
---|---|---|---|
reportId | string | true | The resource Id of the report that should be processed. |
Name | Type | Required | Description |
---|---|---|---|
failOnDataSourceError | boolean | false | When the replacement data source is tested for compatibility and serious errors occur, the service can either fail and return, or it can attempt to continue. This parameter can be used to force a change even if there are errors. Default: true |
The body of the request contains the input transform and the report content (or reference to the report) on which data mapping is performed.
The tranform is the primary payload in this service, for both requests and responses. Depending on the operation, some fields are required. For example, if the report to transform is a saved report, the inputReportUri
field is required. Otherwise, the input report is in the body of request (in the transform) and reportContent
is required.
Name | Type | Required | Description |
---|---|---|---|
id | string<identifier> | false | Identifier for this instance. Usually a GUID, but does not need to be globally unique. |
version | number | false | This media type's schema version number. This representation is version 1. |
creationTimeStamp | string<date-time> | false | The date and time the transform was generated. |
createdBy | string | false | User name or identity of service that created the transform object. |
modifiedTimeStamp | string<date-time> | false | The date and time the transform was modified. |
modifiedBy | string | false | User name or identity of service that modified the transform object last. Optional. |
inputReportUri | string<uri> | false | The persisted report from which the transform should create the result. |
resultReportName | string<uri> | false | On input, this specifies the human-readable name for the resulting report when the result is saved. It is not used on a response transform. |
resultParentFolderUri | string<uri> | false | An identifier (URI) for the parent folder in which to save the result report. If omitted, the default is the user's personal folder. |
resultReport | report | false | The representation of a report. This representation is version 1. |
dataSources | array [dataSource] | false | An array of data source objects, some of which are matched to CAS tables, some to the data sources in the report. |
schemaValidationStatus | string | false | A value indicating the status returned by schema validation. Allowed values: schemaValidschemaInvalid |
evaluationStatus | string | false | Success or failure designation. Allowed values: evaluationValidevaluationInvalid |
evaluation | array [string] | false | Text generated during semantic evaluation of the source. |
messages | array [codedMessage] | false | Localized messages generated in the process of creating the transformed report. |
errorMessages | array [codedMessage] | false | Error messages generated in the process of creating the transformed report with associated codes. |
substitutionParameters | array [object] | false | |
reportContent | sasReport | false | A report content that is the equivalent of the application/vnd.sas.report.content media type. The report content is defined by a non-public XML Schema. The structure shown here is an abbreviation showing only a few of the descriptive attributes of the object. |
links | array [Link] | false | Link objects, as described in SAS standards documentation. |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | Successful transformation. The resulting transform was "created" and returned. | Headers | Schema |
400 | Bad Request | The request was invalid. | Headers | Schema |
409 | Conflict | The service cannot return what is requested. This can happen if the data is unavailable or if there is a mismatch between the requested data and the report's current data. Error messages attempt to describe the root cause. | Headers | Schema |
415 | Unsupported Media Type | The media types and formats for the request and response should match (JSON or XML). | Headers | Schema |