Independent Table Configuration
Overview
You can deploy some or all of your tables independently from Config.zip
. Each independent table will have a corresponding effective date. You can add new versions of a table with their own content and effective date, or update tables in place with new content and the same effective date. See the Tables API topic for more information about the Tables API.
Configuring Independent Tables
You can add or update a specific table by uploading a single .csv file, or you can add or update multiple tables at once by uploading a zip file containing multiple .csv files.
An update can either create a new version of the table with a new effective date, or replace an existing table. In either case, you must use the same table name as the table you are updating.
To create a new version of a table, upload the new version with a new effective date.
To update an existing table, upload the new content with the same effective date as the content you are replacing.
To create a completely separate table, use a new table name.
Liquid
- To get a table as of an effective date using Liquid::
{% assign rate = “my_rate_table” | lookup_effective: my_lookup_key, as_of_timestamp %}
The optional
as_of_timestamp
is a unix epoch timestamp. Ifas_of_timestamp
is not specified, the current date and time will be used.
Plugins
- To get a table as of an effective date from a plugin::
socotraApi.tableLookup(configVersion, tableName, key, asOfTimestamp)
The optional
as_of_timestamp
is a unix epoch timestamp. Ifas_of_timestamp
is not specified, the current date and time will be used.If the table is not found,
tableLookup
will look for the table in the configuration fromConfig.zip
.The
configVersion
parameter is used only if: * An independent table matching the date is not found. * You use product versioning.