Customer Table

Provides an anonymized view of all your registered customers.

Dataset ID: 158ce9dd-7168-4b60-b4e0-060aa9f63ab2

Unique Composite Key(s): storeid, customer_signup_date, last_updated_at, customer_uuid

Datetime Dataset Last Updated: last_retrieved_timestamp

Incremental Load Logic: Use the column customer_signup_date as data appends per new customer creation

Pull Previous Day - Data-Raw Append Example:

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

Pull Previous Successful Update - Data-Raw Append Example:

{"sql": "SELECT * FROM table WHERE date(customer_signup_date) >= $stored_last_update_datetime"}
  • stored_last_update_datetime is your stored datetime for last successful data pull
  • Use the column last_updated_at to update rows with new data

TIP: As a best practice, we recommend that you save the timestamp for each of your dataset pulls as 'stored_last_update_datetime'. Note that this value is not saved in our datasets, but is a suggestion.

Column NameDefinitionExample Output
customer_uuidCustomer Universal ID45a0e197-685e-330a-98c2-711776d5f08b
customer_signup_dateDate–Time Customer Signed Up2000-01-01T00:00:00
last_updated_atDate–Time Customer Last Updated2000-01-01T00:00:00
last_visitDate–Time Customer Last Visited2000-01-01T00:00:00
signup_flagIs the customer signed up? (1 = Yes, 0 = No)1
genderGender (M = Male, F = Female, U = Unknown)U
age_groupCustomer Age Group60+
ageCustomer Age63
reward_balanceAvailable Reward Points For Customer0
customer_sourceCustomer SourceGOOGLE
Group NamesCustomer Group NameSENIOR
VisitsCustomer Visit Count1
NotesCustomer NoteLikes Edible Gummies
opted_inMarketing Opt In (Y = Yes, N = No)Y
patient_typeCustomer Patient TypeADULTUSE
customer_statusCustomer StatusACTIVE
violationsViolations: Warning 1, Warning 2, Ban. (0 = Toggled Off , 1 = Toggled On)0,0,0
cityCustomer CityBERKELEY
StateCustomer StateCA
zipcodeCustomer Zip Code94710
longitudelongitude0
latitudelatitude0
permit_expiration_dateCustomer Permit Expiration DateYYYY-MM-DD
tz_customer_idName Mapping IDn/a
storeidID of Store420
datalake_dateThe date that a store was added to the datalake.2021-12-01
lifetime_spendamount of money that was spent by the customer over their lifetime155.4558999136
purchasesnumber of purchases made by the customer.1.0
floweramount spent by product type0.0
beverageamount spent by product type96.17
cartridgeamount spent by product type155.45
cbdamount spent by product type0.0
edibleamount spent by product type0.0
extractamount spent by product type70.39
merchamount spent by product type0.0
miscamount spent by product type0.0
plantamount spent by product type0.0
pillamount spent by product type0.0
prerollamount spent by product type0.0
prepackamount spent by product type0.0
tinctureamount spent by product type0.0
topicalamount spent by product type0.0
avg_day_between_visitsAverage number of days between visits by the customer12.0
avg_visit_time_secondsaverage amount of time spent in store541.0
avg_checkout_time_secondsaverage amount of time spent with an open cart212.0
visit_without_purchasenumber of visits from the customer where they did not purchase anything.0.0
first_visit_mixMixture of categories purchased on first visitCARTRIDGE
second_visit_mixMixture of categories purchased on second visitCARTRIDGE,FLOWER
third_visit_mixMixture of categories purchased on third visitEDIBLE
most_freq_mixMixture of most frequently purchased categories based on historical purchasesCARTRIDGE
last_retrieved_timestampDate–Time we last retrieved data from SellTreez2021-06-09T14:18:30