Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Columns in the table and column definitions

Column

Definition

Tips

barcode

this is the scanned barcode on a loyalty account

to join with loyalty Account ID, Use :

REGEXP_EXTRACT(BARCODE, '(\\d+)|(\\d+)', 0) as Loyalty_account_id

and to filter for Canada only accounts use : left(barcode,4) = '0463'

transactionID

Same as transaction ID in PRODRT.CURATED_TRANS_EVENTS_NEW

timestamp

unix timestamp

pointsUsed

This is the number of points used in a team transaction

pointsEarned

This is the number of points earned for that transaction

tag

See the distinct tags list below

restaurant

Restaurant number

pointsRemoved

these are removed points either because of expiry or testing

isPointsUsed

Flag for if the points were used in the transaction

Points can be earned and used in the same transaction on base points earned ,points offers , and challenges

isPointReceived

This would be false for when a transaction only has points used and no earns

partition_date_key

Date

TO_DATE(PARTITION_DATE_KEY, "yyyyMMdd") to cast it in the yyyy-mm-dd format

...