CreateReportSchema
Creates a schema file based on the specified report.
CreateReportSchema
CreateReportSchema creates a schema file based on the specified report. This schema adds a table to your existing list that corresponds with the results of your report, which can then be queried like other tables. (Reports from the Amazon Marketplace are not modeled by 本製品 as queryable tables by default.)The generated schema file outlines the metadata for the report, such as columns and column data types. You can edit the file to adjust data types, rename columns, and include or exclude columns.
Updating a Report Schema
In the following example, the SP CreateReportSchema creates a new report using TestReportTest1 as a base template. It appends new columns to TestReportTest1 and creates a new report, named TestReport2. The new report is saved as ...\\TestReportTest2.rsd.EXECUTE [CreateReportSchema] [ReportName] = "TestReportTest2", [CustomFieldIdsPrimitive] = "1459925,1459928", [CustomFieldIdsDropdown] = "1469785", [CustomDimensionKeyIds] = "13539564", [BaseReportName] = "TestReportTest1", [FileName] = "...\\TestReportTest2.rsd"
Input
Name | Type | Required | Accepts Output Streams | Description |
TableName | String | True | False | The name for the new table. |
ReportId | String | True | False | The report document id. |
ReportName | String | True | False | The name of the report. |
FileName | String | False | False | The full file path and name of the schema to generate. Begin by choosing a parent directory (this parent directory should be set in the Location property). Complete the filepath by adding a directory corresponding to the schema used (VendorCentral), followed by a .rsd file with a name corresponding to the desired table name. For example : 'C:\\Users\\User\\Desktop\\AmazonMarketplace\\VendorCentral\\Filters.rsd' |
Description | String | False | False | An optional description for the table. |
WriteToFile | String | False | False | Whether to write the contents of the generated schema to a file or not. The input defaults to true. Set it to false to write to FileStream or FileData. |
FileStream | String | False | True | An instance of an output stream where file data is written to. Only used if WriteToFile=false. |
Result Set Columns
Name | Type | Description |
Success | String | Whether or not the schema was created successfully. |
FileData | String | The generated schema encoded in base64. Only returned if FileName is not set. |