Toggle menu

purgeImportData

This method deletes previously imported data.

Parameters

NameTypeDescription
datasourceStringThe name of the datasource to delete data from
tablenameStringThe name of the table to delete data from
keepNVersionsIntegerThe number of most recent versions to keep. For example if there are five versions of the data (numbered 1 to 5) and "keepNVersions": 2, versions 1, 2 and 3 would be deleted
keepNDaysIntegerDeletes any versions older than this number of days

Note that if you set both keepNVersions and keepNDays then both conditions must be met for data to be deleted. That is, nothing will get deleted until it is BOTH too old AND has been superceded by too many versions.

Example

This example deletes all but the most recent version of the data in the named table.

{
  "id": 1234567,
  "method": "purgeImportData",
  "params": {
    "tablename": "di_stars11",
    "keepNVersions": 1
  },
  "jsonrpc": "2.0"    
}

Last modified on September 05, 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon