Commit graph

167 commits

Author SHA1 Message Date
Oriol Roqué Paniagua
7177b41e19 Merged PR 2516: Create host_user and user_role in intermediate
# Description

Adds 2 new tables:
- `int_core__user_role`: contains the relationship of a given user has a role.
- `int_core__user_host`: based on the previous table, it selects the users and main information from those users that are considered as hosts according to the role they have.

Note: I needed to change the test in stg. A user, generally, can have no role, one role, or multiple roles. Thus we cannot propagate this information in the unified_user model.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #19513
2024-08-07 14:28:34 +00:00
Oriol Roqué Paniagua
ad7d94b604 Merged PR 2511: Adding stg_core__role and stg_core__user_role in staging
# Description

Adds Role and UserRole in staging, in dedicated tables.
Open to discussion if you want me to directly apply this at User table level instead of having them in staging as standalone tables. Otherwise, staying with this PR as is, next step would be to integrate these roles in unified_user and create a dedicated user_host table in intermediate

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #19513
2024-08-07 13:17:31 +00:00
Pablo Martin
43a7ead6d3 missing field in stg 2024-07-08 16:29:35 +02:00
Pablo Martin
64377da570 PK test 2024-07-01 16:54:58 +02:00
Pablo Martin
83f67a06bf model 2024-07-01 16:53:54 +02:00
Pablo Martin
2f133c1424 add source 2024-07-01 16:50:12 +02:00
Pablo Martin
883618add1 subquery to CTE 2024-07-01 14:02:13 +02:00
Pablo Martin
0e9c608894 more docs 2024-07-01 11:39:40 +02:00
Pablo Martin
1b942b7506 add col 2024-07-01 11:39:36 +02:00
Pablo Martin
f0f6382bbd update docs 2024-07-01 11:34:26 +02:00
Pablo Martin
e963ba274d implement transaction sign 2024-07-01 11:27:18 +02:00
Pablo Martin
5182a804b2 fix typos 2024-06-25 17:09:02 +02:00
Pablo Martin
f9fcb76ed1 schemas 2024-06-25 16:42:40 +02:00
Pablo Martin
8dc31f3489 add accounts to staging 2024-06-25 15:07:39 +02:00
Pablo Martin
4b0b15814e add date converted in staging 2024-06-25 15:07:39 +02:00
Pablo Martin
08ff92b3e9 make stg naming coherent with other xero models 2024-06-25 15:07:39 +02:00
Pablo Martin
cfd752843b add tests 2024-06-25 11:07:53 +02:00
Pablo Martin
c23e79b5fe add staging model 2024-06-25 11:04:28 +02:00
Pablo Martin
8fbbb1d10b add source 2024-06-25 11:04:16 +02:00
Pablo Martin
696490aecb docs for bank transactions table 2024-06-20 15:52:55 +02:00
Pablo Martin
26e7358648 credit notes docs 2024-06-20 15:26:33 +02:00
Pablo Martin
e1a4faf3b9 more contact tests 2024-06-20 15:15:19 +02:00
Pablo Martin
7aa667f7cf boy scout: tests for invoices 2024-06-20 15:00:59 +02:00
Pablo Martin
c671701071 boy scout: contact tests 2024-06-20 14:37:55 +02:00
Pablo Martin
79d69a9286 staging model 2024-06-20 14:31:12 +02:00
Pablo Martin
cd9c797f02 add source 2024-06-20 14:12:30 +02:00
Pablo Martin
05f35fcb69 add value to test 2024-06-19 18:25:49 +02:00
Pablo Martin
6ad203b92f add some comments 2024-06-19 18:18:38 +02:00
Oriol Roqué Paniagua
fb86850ffe Merged PR 2074: Adding country to staging
Adding country to staging

Related work items: #17312
2024-06-19 08:40:08 +00:00
Pablo Martin
c051831d6d upper in payments 2024-06-18 13:09:45 +02:00
Pablo Martin
79345a6ab7 make model incremental 2024-06-14 16:01:33 +02:00
Pablo Martin
97f1c6216b fix typos 2024-06-14 14:28:26 +02:00
Pablo Martin
bf97a947ed small text fixes 2024-06-14 13:24:23 +02:00
Pablo Martin
0d6e980832 documentation 2024-06-14 13:21:21 +02:00
Pablo Martin
8979f4d092 add composite key 2024-06-14 13:15:35 +02:00
Pablo Martin
7e548f5feb staging model 2024-06-14 12:21:36 +02:00
Pablo Martin
e41774e6a4 typo 2024-06-14 12:19:52 +02:00
Pablo Martin
cf0019fd20 add to sources 2024-06-14 12:18:45 +02:00
Pablo Martin
7aa100d115 add tests 2024-06-05 17:39:53 +02:00
Pablo Martin
85a299da96 staging accommodation to user 2024-06-05 17:38:02 +02:00
Pablo Martin
cd8fc9893d add accommodationtouser in sources 2024-06-05 17:31:19 +02:00
Pablo Martin
21f9a63db2 add test 2024-06-05 17:30:19 +02:00
Pablo Martin
26ce452a0c accommodation staging model 2024-06-05 17:24:59 +02:00
Pablo Martin
f216e7708a add accommodation to sources 2024-06-05 17:24:39 +02:00
Pablo Martin
60063b5455 propagate fix 2024-06-05 17:15:35 +02:00
Pablo Martin
c87efc7d1d low-hanging fruit refactor. Fix name 2024-06-05 16:50:14 +02:00
Pablo Martin
bfd05a6410 add missing _utc suffix 2024-06-04 18:21:56 +02:00
Pablo Martin
f5ae39e443 add integration type model 2024-06-04 15:05:26 +02:00
Pablo Martin
8ec14a14c1 add integration type to sources 2024-06-04 14:58:16 +02:00
Pablo Martin
a312b1730b staging model for integration table 2024-06-04 14:51:03 +02:00