schema.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License in the LICENSE file at the
  6. # root of this repository, or online at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. version: 2
  16. # https://materialize.com/docs/get-started/quickstart/
  17. models:
  18. - name: fraud_activity
  19. description: "Detects when a user wins an auction as a bidder, and then is identified as a seller for an item at a higher price."
  20. columns:
  21. - name: seller
  22. description: "The seller for an auction"
  23. data_tests:
  24. - unique
  25. - not_null
  26. - name: seller_item
  27. description: "The name of the seller item"
  28. - name: seller_amount
  29. description: "The bid amount of the seller"
  30. - name: buyer_item
  31. description: "The name of the buyer item"
  32. - name: buyer_amount
  33. description: "The bid amount of the buyer"
  34. - name: funds_movement
  35. description: "Tracks the credits and debits of all winning bids."
  36. columns:
  37. - name: id
  38. description: "The id of the buyer or seller"
  39. data_tests:
  40. - not_null
  41. - name: credits
  42. description: "Credit from an auction"
  43. - name: debits
  44. description: "Debit from an auction"
  45. - name: winning_bids
  46. description: "joins data from `auctions` and `bids` to get the bid with the highest `amount` for each auction at its `end_time`."
  47. columns:
  48. - name: id
  49. description: "The primary key of the auction"
  50. data_tests:
  51. - unique
  52. - not_null
  53. - name: buyer
  54. description: "The id of the buyer"
  55. - name: auction_id
  56. description: "The id of the auction"
  57. - name: amount
  58. description: "The bid amount"
  59. - name: bid_time
  60. description: "The time the bid was executed"
  61. - name: item
  62. description: "The name of the item"
  63. - name: seller
  64. description: "The id of the seller"
  65. - name: my_first_dbt_model
  66. description: "A starter dbt model"
  67. columns:
  68. - name: id
  69. description: "The primary key for this table"
  70. data_tests:
  71. - unique
  72. - not_null
  73. - name: my_second_dbt_model
  74. description: "A starter dbt model"
  75. columns:
  76. - name: id
  77. description: "The primary key for this table"
  78. data_tests:
  79. - unique
  80. - not_null