|
1 |
| -export const replications = []; |
| 1 | +export const replications = [ |
| 2 | + { |
| 3 | + name: 'sco_certification_results', |
| 4 | + before: async ({ datamartKnex }) => { |
| 5 | + await datamartKnex('sco_certification_results').delete(); |
| 6 | + }, |
| 7 | + from: ({ datawarehouseKnex }) => { |
| 8 | + return datawarehouseKnex('data_export_parcoursup_certif_result').select('*'); |
| 9 | + }, |
| 10 | + to: ({ datamartKnex }, chunk) => { |
| 11 | + return datamartKnex('sco_certification_results').insert(chunk); |
| 12 | + }, |
| 13 | + }, |
| 14 | + { |
| 15 | + name: 'data_export_parcoursup_certif_result', |
| 16 | + before: async ({ datamartKnex }) => { |
| 17 | + await datamartKnex('data_export_parcoursup_certif_result').delete(); |
| 18 | + }, |
| 19 | + from: ({ datawarehouseKnex }) => { |
| 20 | + return datawarehouseKnex('data_export_parcoursup_certif_result').select('*'); |
| 21 | + }, |
| 22 | + to: ({ datamartKnex }, chunk) => { |
| 23 | + return datamartKnex('data_export_parcoursup_certif_result').insert(chunk); |
| 24 | + }, |
| 25 | + }, |
| 26 | + { |
| 27 | + name: 'certification_results', |
| 28 | + before: async ({ datamartKnex }) => { |
| 29 | + await datamartKnex('certification_results').delete(); |
| 30 | + }, |
| 31 | + from: ({ datawarehouseKnex }) => { |
| 32 | + return datawarehouseKnex('data_export_parcoursup_certif_result_code_validation').select('*'); |
| 33 | + }, |
| 34 | + to: ({ datamartKnex }, chunk) => { |
| 35 | + return datamartKnex('certification_results').insert(chunk); |
| 36 | + }, |
| 37 | + }, |
| 38 | + { |
| 39 | + name: 'data_export_parcoursup_certif_result_code_validation', |
| 40 | + before: async ({ datamartKnex }) => { |
| 41 | + await datamartKnex('data_export_parcoursup_certif_result_code_validation').delete(); |
| 42 | + }, |
| 43 | + from: ({ datawarehouseKnex }) => { |
| 44 | + return datawarehouseKnex('data_export_parcoursup_certif_result_code_validation').select('*'); |
| 45 | + }, |
| 46 | + to: ({ datamartKnex }, chunk) => { |
| 47 | + return datamartKnex('data_export_parcoursup_certif_result_code_validation').insert(chunk); |
| 48 | + }, |
| 49 | + }, |
| 50 | +]; |
2 | 51 |
|
3 | 52 | export function getByName(name, dependencies = { replications }) {
|
4 | 53 | return dependencies.replications.find((replication) => replication.name === name);
|
|
0 commit comments