Market Table

The Market Flow dataset is an anonymized ticketline table that represents all Treez

Unique Composite Key(s): dateclosed, masked_ticketlineid, masked_ticketid

Datetime Dataset Last Updated: last_retrieved_timestamp

Incremental Load Logic: dateclosed is when the transaction was complete. last_retrieved_timestamp is when the dataa was last uploaded for this table.

Pull Previous Day - Data-Raw Append Example:

{"sql": "SELECT * FROM table WHERE date(dateclosed) = date(date_add(now(), INTERVAL -1 day)) "}

Pull Previous Successful Update - Data-Raw Append Example:

{"sql": "SELECT * FROM table WHERE date(dateclosed) >= $stored_last_update_datetime"}
  • stored_last_update_datetime is your stored datetime for last successful data pull
Column NameDefinitionExample
verification_pending_minTime fulfillment order began verification.2020-07-25 17:41:52
verification_pending_maxTime fulfillment order finished verification.2020-07-25 17:41:52
awaiting_processing_minTime fulfillment order began awaiting processing.2020-07-25 17:41:52
awaiting_processing_maxTime fulfillment order finished awaiting processing.2020-07-25 17:41:52
in_process_minTime fulfillment order began being processed.2020-07-25 17:41:52
in_process_maxTime fulfillment order finished being processed.2020-07-25 17:41:52
packed_ready_minTime fulfillment order was packed and ready.2020-07-25 17:41:52
packed_ready_maxTime fulfillment order is moved out of packed and ready.2020-07-25 17:41:52
out_for_delivery_minTime fulfillment order started delivery.2020-07-25 17:41:52
out_for_delivery_maxTime fulfillment order finished delivery.2020-07-25 17:41:52
channelOrder Channel Type (In-store, eCommerce, Kiosk, etc.)VENDING_MACHINE
payment_dateDate-Time payment was received2020-07-25T18:01:42
pre_paidBoolean: Was the ticket pre-paid? (Y/N)N
masked_ticketlineidEncrypted Distinct Ticketline ID867a0b9694afde9c65ea82f8a9c3af82
masked_ticketidEncrypted Distinct Ticket ID764b570b5915ac79bc2c2f244052104e
masked_ticketalphaidEncrypted Distinct Ticket Alpha ID81aa1b852fb8ad030be98ef6f4524c34
masked_storeidEncrypted Store IDc5dda16166cb0aef92336a0d90f7b16c
masked_customer_uuidEncrypted Customer UUIDe62f7514b5839950173049af6ed42c9e
retail_brandRaw Brand Name10 BAG
registerRegister IDCD02
customer_typeRegistered Customer TypeADULT
typeTransaction Type (Sale or Return)SALE
customer_stateState customer is fromCA
customer_cityCity customer is fromFAIRFAX
zip_codeZip Code customer is from94930
ageCustomer Age28
age_groupCustomer Age Group21-29
cashierCashier’s NameAARON
approverDiscount ApproverAARON
producttypeProduct TypeFLOWER
productsubtypeProduct SubtypePREPACK
productattributesProduct Attributes (Multiple Attributes are separated by commas)CALM,GLUTEN FREE,VEGAN
tierDispensary Tier Pricing NameTOP SHELF
weightweight1
unitofmeasureUnit of MeasurementGRAM
priceunitPre Tax / Deduction Price20
qtyUnits sold for this transaction line1
grosssalesDefault Unit Price20
discountsSum of discounts6.25
returnsReturn Total0
netsalesSubtotal after discounts, but before taxes13.75
taxesTotal Taxes0.825
grossreceiptsGrand Total after discounts and taxes.14.575
costCost with Excise12.5
cost_without_exciseCost without Excise12.5
grossincomeProfit after cost (Net Sales – Cost)1.25
invoiceidTreez Generated Invoice #16
dateclosedDate Ticket was closed2019-10-16
date_time_closedDate–Time ticket was closed2019-10-16T08:23:51
date_time_openedDate–Time ticket was opened2019-10-16T07:57:54
customer_signup_dateDate–Time unique customer signed up.2019-09-09T16:46:47
reward_balanceRemaining Rewards balance for customer83
inventory_locationLocation inventory was sold from.FRONT OF HOUSE
ticket_updated_dateLast Date–Time the ticket was updated.2020-02-04T07:25:12
line_updated_dateLast Date–Time the line item was updated2019-10-16T08:07:19
last_visitLast time to the customer visited.2019-10-16 07:57:54
salestaxamountSales Tax Charged0.825
is_arms_lengthBoolean: 1 = Arm's Length, 0 = Non Arm's Length.1
is_cannabisBoolean: 1 = is cannabis, 0 = non cannabis.1
ticket_typeTicket Channel Type (POS, Delivery, Express, etc)POS
customer_countryCountry Customer is fromUSA
customer_groupsAssigned Customer GroupSENIOR
inventory_dateDate inventory was received2019-08-29T14:28:51
customer_mmid_expirationExpiration of Medical ID2022-06-24T00:00:00
ticket_notesNote added to customer ticketFTP
genderCustomer GenderM
open_dateDate Ticket Opened2019-02-26
tz_brand_idUnique Brand ID2502
tz_product_idUnique Product ID323310
tz_productnameProduct Name associated with Product IDBLACKWATER
tz_brandnameBrand Name associated with Brand IDDIME BAG
customer_sourceCustomer SourceWEEDMAPS
distributorDistributor NameHERBL DISTRIBUTION
first_visitBoolean: Is this the customer’s first time visiting?
1 = Y , 0 = N
0
repeat_purchBoolean: Has the customer purchased before?
1 = Y, 0 = N
1
ticket_statusTicket StatusCOMPLETED
customCustom / Local TaxCUSTOM
customtaxamountCustomer Tax Amount1.568
dynamicDelivery Sales TaxDYNAMIC
dynamictaxnameDelivery Sales TaxDYNAMIC SALES TAX
dynamicdtaxamountDelivery Sales Tax Amount2.55192
exciseAutomated Excise TaxEXCISE
excisetaxnameAutomated Excise TaxEXCISE TAX
excisetaxamountAutomated Excise Tax Amount3.36
salesRetail Sales TaxSALES
salestaxnameRetail Sales TaxSALES TAX
harvest_dateDate–Time product was harvested2019-09-13T12:25:28
external_idCustomer Assigned External IDHYBRID_009
total_mg_thcTotal MG of THC70
total_mg_cbdTotal mg of CBD30
extraction_methodExtraction MethodSOLID
thc_percTHC Percent0.34
cbd_percCBD Percent0
package_sizePackage SizeSINGLE-UNIT
productbrandCustomer Defined Brand10 BAG
productnameCustomer Defined Product NameGSC 3.5G
classificationClassificationINDICA
sizeCustomer Defined Size1G
thc_ratioTHC Ratio0
repeat_purch_skuBoolean: Has the customer purchased this item before?
1 = Y, 0 = N
0
zipCustomer Zipcode94930
latCustomer Lat32.38975
lngCustomer Lng-111.37702
income_household_medianAverage Income for Zip Code58672
BATCH_LAST_RUNLast Date-Time updated2020-10-06T10:30:14
cityCustomer CityFAIRFAX
county_nameCustomer CountyMARIN COUNTY
state_nameCustomer StateCALIFORNIA
regionState RegionBAY AREA
store_stateState Store is located inCA
yearYear of Purchase2021
monthMonth of Purchase9
week_yearYear - Week2020-38
BATCH_IDLast Run Job ID203
demo_storeBoolean: Is this the demo store?
TRUE = Y, FALSE = N
False