Anda di halaman 1dari 27

The UnifiedSubledger

An Overview of some depth


Some Prehistory
In 2011 GFS was operating 8 Subledgers
Supporting new launches was painful
Substantiating GL Balances was hard
Operating costs were astronomical
Needed Functionality had to be built in each:
Scale
Adjustments
Globalization
Reconciliation
Why a UnifiedSubledger?
Operate at Amazon Scale
Improve visibility
Simplify and Automate Reconciliations
Simplify Operations
Simplify Launches
Support Globalization
USL in Context
Like a Camel, USL has 3 Stomachs
Subledger Lines and Entries
Millions of Entries per hour
Roughly 4x as many Lines
Hourly Activity Summaries
1 Entry per Hour
Hundreds of thousands of Lines
General Ledger Journal Entries
Tens of Entries per Hour
Hundreds of Lines

* All numbers are approximations for the NA stack as of November 2015


Subledger Entries and Lines:
The Booking Process
Key Validations
Key Derivations
Versioned Idempotence prevents double
booking and allows Entry replacement
Key Validations
Necessary data is present
Ledger information
Chart of Accounts
Amounts
Entry Balances by key dimensions
Functional Currency matches Ledger Currency
The UK Ledger knows nothing about Euros!
Currency exponent is correct
The Japanese Yen does not have fractional digits!
Key Derivations
Entry Record Version
Booking Date
The instant at which USL recorded the Entry
Accounting Date
Ledger Information
Ledger Timezone
Booking date (relative to Ledger)
Derived Entry and Line External Ids
Post to GL Flag
Subledger Entry Idempotence
Prevents Double Booking, but allows Versioning
Think of it as a Major/Minor version scheme
Allows Flash Personnel and Adjustment tooling to
correct Entries
Ensures that Business Systems can always replace
an Entry
Utilized Attributes:
Journal Entry External Id
Business Event Version
Adjustment Id
Derives Record Version Number and Entry Intent
Entry Versioning Logic
If Journal Entry External Id is new:
Book Original Entry
If Journal Entry External Id, Business Event Version, and Adjustment
Id match existing:
Ignore duplicate Entry
If Business Event Version is higher than the currently recorded
highest for the Entry:
Book Replacement Entry
If Adjustment Id is higher than the currently recorded highest for
the Journal Entry Ext Id and Business Event Version *:
Book Replacement Entry
Else:
Entry Version Conflict!

* There is also validation that the reversalAdjustmentId matches whats On The


Books. We are currently reviewing the necessity of having both.
Intro to Accounting Dates and Periods
All lines in the GL have an Effective Date
Each date must be in an Accounting Period
Amazon uses monthly Accounting Periods
After about noon on the 5th Accounting Day
past month end, the GL Closes and will not
accept anything from the prior period
To prepare for the closing of a period, and
provide a short window for special cases to
occur, we go into Override
Accounting Date Derivations
Derived from:
Lines Transaction Date
Entrys Booking Date
Authoritative Subledger
Accounting Period Schedules
Accounting Date Override if present
Example Schedule:
USL in Context (a refresher)

Now that weve looked at the Booking Process, well look at the USL
Data Model conceptually, and walk through the USL Aggregation
process
USL as a spreadsheet:
Ledger Entry Model in abstract
Columns are attributes
in a journal line
Attributes are organized
into groups that are
related
Those groups are called
Attribute Families
Attribute Families are
versioned
Aggregation
Each Archive Interval is aggregated
Transaction Level Attributes, like the Line External Id and
Reconciliation Details, are dropped
Like Lines are combined, and their amounts summed
All Archive Intervals for an hour are aggregated
together, forming 1 Hourly Summary
Each Hourly Summary is Re-aggregated
Summary Level Attributes that are not GL Relevant, like
Custom and Financial Dimensions, are dropped
Again, like Lines are combined and their amounts summed
GL Journal Entries are created
Re-aggregated data is split by
GeneralLedgerJournalEntryKey
Aggregation Illustrated
(a trivial example)
Given Subledger Entries:
Aggregation Illustrated
(a trivial example)
Transaction Level Details are Dropped:
Aggregation Illustrated
(a trivial example)
Like Lines are summed, creating the Activity Summary:
Aggregation Illustrated
(a trivial example)
Non-GL Impacting Attributes are dropped:
Aggregation Illustrated
(a trivial example)
Like Lines are again summed, creating the GL Journal Entries and Lines:

This process occurs every hour currently.


After the GL JEs are created, they are batched and sent to the GL.
Throughout the process, artifacts which map each line into the aggregated
representation are kept.
A little more on GFS-BI and the GL
GFS-BI and GL Reconciliations
Controls are implemented in GFS-BI

Check that total amounts and line counts


match between:
AccountingEvents and Summary Rows
Summary Rows and Posted GL Batches
GFS-BI Staging
Accounting Events
Journal Dimensions and Chart Of Accounts
Reporting Attributes
All pulled from CalvinFinancialEventAttributes
Mapped via STG_REPORTING_MAPPING
Typed as String, Number or Date
This mapping is brittle, prone to breakage and
missed attributes
GFS-BI Staging
Activity Summaries
Journal Dimensions and Chart Of Accounts
(like the lines)
Reporting Dimensions
Mapped from USL.CustomDimensions
LETS populates these for GFSCalvinAccounting
Events
Disjoint columns from AccountingEvents?!?
This mapping is inflexible, and is also prone to
missed attributes
GL Batching and Posting
All batches for which USL is authoritative may be
Posted to the GL
Some of these batches may be Non-GL Impacting,
they are filtered
Batches which Fail in the GL may be combined
with adjustment batches through a process called
Rebatching so that they may eventually post
Batches posted from USL should never be
modified in the GL
Re-cap
USL Supports Amazon growth, both in scale of
transactions, and diversity of Business data
Traceability from GL Lines to Business data
Versioned Entry Idempotence
Accounting Dates
USL Data Model in abstract as spreadsheet
Aggregation
GFS-BI and OFA Consumption
Questions?

Anda mungkin juga menyukai