[{"data":1,"prerenderedAt":1177},["ShallowReactive",2],{"navigation_docs_en":3,"-en-using-configuration-adapts-seeds":241,"-en-using-configuration-adapts-seeds-surround":1173},[4,17,42,206,232],{"title":5,"redirect":6,"path":7,"stem":8,"children":9,"page":16},"Introduction","\u002Fen\u002Fintroduction\u002Fintroduction","\u002Fen\u002Fintroduction","en\u002F1.introduction",[10,12],{"title":5,"path":6,"stem":11},"en\u002F1.introduction\u002F1.introduction",{"title":13,"path":14,"stem":15},"Prerequisites","\u002Fen\u002Fintroduction\u002Fprerequisites","en\u002F1.introduction\u002F2.prerequisites",false,{"title":18,"redirect":19,"path":20,"stem":21,"children":22,"page":16},"Installation","\u002Fen\u002Finstallation\u002Fsetup","\u002Fen\u002Finstallation","en\u002F2.installation",[23,26,30,34,38],{"title":24,"path":19,"stem":25},"Machine set-up","en\u002F2.installation\u002F1.setup",{"title":27,"path":28,"stem":29},"A Tale of Two Repos","\u002Fen\u002Finstallation\u002Ftale-repos","en\u002F2.installation\u002F2.tale-repos",{"title":31,"path":32,"stem":33},"Database connection","\u002Fen\u002Finstallation\u002Fdbt-profile","en\u002F2.installation\u002F3.dbt-profile",{"title":35,"path":36,"stem":37},"Smoke-testing","\u002Fen\u002Finstallation\u002Fsmoke-testing","en\u002F2.installation\u002F4.smoke-testing",{"title":39,"path":40,"stem":41},"What now ?","\u002Fen\u002Finstallation\u002Fwhat-now","en\u002F2.installation\u002F5.what-now",{"title":43,"path":44,"stem":45,"children":46,"page":16},"Users Guide","\u002Fen\u002Fusing","en\u002F3.using",[47,50,54,88,188,202],{"title":5,"path":48,"stem":49},"\u002Fen\u002Fusing\u002Fintroduction","en\u002F3.using\u002F1.introduction",{"title":51,"path":52,"stem":53},"Running the ETL","\u002Fen\u002Fusing\u002Frunning","en\u002F3.using\u002F2.running",{"title":55,"path":56,"stem":57,"children":58,"page":16},"Configuration","\u002Fen\u002Fusing\u002Fconfiguration","en\u002F3.using\u002F3.configuration",[59,72,76,80,84],{"title":60,"path":61,"stem":62,"children":63,"page":16},"Architecture","\u002Fen\u002Fusing\u002Fconfiguration\u002Farchitecture","en\u002F3.using\u002F3.configuration\u002F1.architecture",[64,68],{"title":65,"path":66,"stem":67},"Overview","\u002Fen\u002Fusing\u002Fconfiguration\u002Farchitecture\u002Foverview","en\u002F3.using\u002F3.configuration\u002F1.architecture\u002F1.overview",{"title":69,"path":70,"stem":71},"Marts and reporting layer","\u002Fen\u002Fusing\u002Fconfiguration\u002Farchitecture\u002Fmarts-reporting","en\u002F3.using\u002F3.configuration\u002F1.architecture\u002F2.marts-reporting",{"title":73,"path":74,"stem":75},"Linking the databases","\u002Fen\u002Fusing\u002Fconfiguration\u002Fdatabases","en\u002F3.using\u002F3.configuration\u002F2.databases",{"title":77,"path":78,"stem":79},"Adapters and seeds","\u002Fen\u002Fusing\u002Fconfiguration\u002Fadapts-seeds","en\u002F3.using\u002F3.configuration\u002F3.adapts-seeds",{"title":81,"path":82,"stem":83},"Enabling a resource","\u002Fen\u002Fusing\u002Fconfiguration\u002Fenabling","en\u002F3.using\u002F3.configuration\u002F4.enabling",{"title":85,"path":86,"stem":87},"Overriding","\u002Fen\u002Fusing\u002Fconfiguration\u002Foverriding","en\u002F3.using\u002F3.configuration\u002F5.overriding",{"title":89,"redirect":90,"path":91,"stem":92,"children":93,"page":16},"Dashboards","\u002Fen\u002Fusing\u002F","\u002Fen\u002Fusing\u002Fdashboards","en\u002F3.using\u002F4.dashboards",[94,97,126,167,176,184],{"title":5,"path":95,"stem":96},"\u002Fen\u002Fusing\u002Fdashboards\u002Fintroduction","en\u002F3.using\u002F4.dashboards\u002F1.introduction",{"title":98,"redirect":99,"path":99,"stem":100,"children":101,"page":16},"Human resources","\u002Fen\u002Fusing\u002Fdashboards\u002Fhr","en\u002F3.using\u002F4.dashboards\u002F2. hr",[102,106,110,114,118,122],{"title":103,"path":104,"stem":105},"Employees leaves","\u002Fen\u002Fusing\u002Fdashboards\u002Fhr\u002Femp_conge","en\u002F3.using\u002F4.dashboards\u002F2. hr\u002F1.emp_conge",{"title":107,"path":108,"stem":109},"Active employees","\u002Fen\u002Fusing\u002Fdashboards\u002Fhr\u002Fempl_actif","en\u002F3.using\u002F4.dashboards\u002F2. hr\u002F2.empl_actif",{"title":111,"path":112,"stem":113},"Retirement","\u002Fen\u002Fusing\u002Fdashboards\u002Fhr\u002Fretirement","en\u002F3.using\u002F4.dashboards\u002F2. hr\u002F3.retirement",{"title":115,"path":116,"stem":117},"Efficacité","\u002Fen\u002Fusing\u002Fdashboards\u002Fhr\u002Fefficacite","en\u002F3.using\u002F4.dashboards\u002F2. hr\u002F4.efficacite",{"title":119,"path":120,"stem":121},"Absences des employé(e)s","\u002Fen\u002Fusing\u002Fdashboards\u002Fhr\u002Femp_abs","en\u002F3.using\u002F4.dashboards\u002F2. hr\u002F5.emp_abs",{"title":123,"path":124,"stem":125},"Resignation","\u002Fen\u002Fusing\u002Fdashboards\u002Fhr\u002Fresignation","en\u002F3.using\u002F4.dashboards\u002F2. hr\u002F6.resignation",{"title":127,"redirect":128,"path":128,"stem":129,"children":130,"page":16},"Educational service","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv",[131,135,139,143,147,151,155,159,163],{"title":132,"path":133,"stem":134},"Res epreuves","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fres_epreuves","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F1.res_epreuves",{"title":136,"path":137,"stem":138},"Students results monitoring","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fsuivi_resultats","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F2.suivi_resultats",{"title":140,"path":141,"stem":142},"Students headcount","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Feffectif_css","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F3.effectif_css",{"title":144,"path":145,"stem":146},"Students absenteeism","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fchronic_absenteeism","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F4.chronic_absenteeism",{"title":148,"path":149,"stem":150},"Academic results","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fres_scolaires","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F5.res_scolaires",{"title":152,"path":153,"stem":154},"Predictive modelling - aggregated","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fpredictive-aggregated","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F6.predictive-aggregated",{"title":156,"path":157,"stem":158},"PEVR","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fpevr","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F7.pevr",{"title":160,"path":161,"stem":162},"Absenteeism","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fabsenteeism","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F8.absenteeism",{"title":164,"path":165,"stem":166},"Diplôme","\u002Fen\u002Fusing\u002Fdashboards\u002Feduc-serv\u002Fdiplome","en\u002F3.using\u002F4.dashboards\u002F3.educ-serv\u002F9.diplome",{"title":168,"redirect":169,"path":169,"stem":170,"children":171,"page":16},"School organisation","\u002Fen\u002Fusing\u002Fdashboards\u002Fschool-org","en\u002F3.using\u002F4.dashboards\u002F4.school-org",[172],{"title":173,"path":174,"stem":175},"Anomalies","\u002Fen\u002Fusing\u002Fdashboards\u002Fschool-org\u002Fanomalies","en\u002F3.using\u002F4.dashboards\u002F4.school-org\u002F1.anomalies",{"title":177,"path":178,"stem":179,"children":180,"page":16},"DirectionGenerale","\u002Fen\u002Fusing\u002Fdashboards\u002Fdirection_generale","en\u002F3.using\u002F4.dashboards\u002F5.direction_generale",[181],{"title":156,"path":182,"stem":183},"\u002Fen\u002Fusing\u002Fdashboards\u002Fdirection_generale\u002Fpevr","en\u002F3.using\u002F4.dashboards\u002F5.direction_generale\u002F1.pevr",{"title":185,"path":186,"stem":187},"Row Level Security","\u002Fen\u002Fusing\u002Fdashboards\u002Frls","en\u002F3.using\u002F4.dashboards\u002F5.rls",{"title":189,"redirect":90,"path":190,"stem":191,"children":192,"page":16},"Data marts","\u002Fen\u002Fusing\u002Fmarts","en\u002F3.using\u002F6.marts",[193,196,199],{"title":5,"path":194,"stem":195},"\u002Fen\u002Fusing\u002Fmarts\u002Fmarts","en\u002F3.using\u002F6.marts\u002F1.marts",{"title":127,"path":197,"stem":198},"\u002Fen\u002Fusing\u002Fmarts\u002Feducational-service","en\u002F3.using\u002F6.marts\u002F2.educational-service",{"title":98,"path":200,"stem":201},"\u002Fen\u002Fusing\u002Fmarts\u002Fhuman-resources","en\u002F3.using\u002F6.marts\u002F3.human-resources",{"title":203,"path":204,"stem":205},"Production checklist","\u002Fen\u002Fusing\u002Fproduction","en\u002F3.using\u002F7.production",{"title":207,"redirect":208,"path":209,"stem":210,"children":211,"page":16},"Developers Guide","\u002Fen\u002Fcontributing\u002Fgetting-started","\u002Fen\u002Fcontributing","en\u002F4.contributing",[212,215,223],{"title":213,"path":208,"stem":214},"Getting Started","en\u002F4.contributing\u002F1.getting-started",{"title":216,"redirect":217,"path":218,"stem":219,"children":220,"page":16},"Conventions","\u002Fen\u002Fcontributing\u002Fconventions\u002Fgetting-started","\u002Fen\u002Fcontributing\u002Fconventions","en\u002F4.contributing\u002F2.conventions",[221],{"title":213,"path":217,"stem":222},"en\u002F4.contributing\u002F2.conventions\u002F1.getting-started",{"title":224,"path":225,"stem":226,"children":227,"page":16},"Docs Ref","\u002Fen\u002Fcontributing\u002Fdocs","en\u002F4.contributing\u002F99.docs",[228],{"title":229,"path":230,"stem":231},"Components","\u002Fen\u002Fcontributing\u002Fdocs\u002Fcomponents","en\u002F4.contributing\u002F99.docs\u002F1.components",{"title":233,"redirect":6,"path":234,"stem":235,"children":236,"page":16},"Migrations","\u002Fen\u002Fmigrations","en\u002F5.migrations",[237],{"title":238,"path":239,"stem":240},"V0.17 -> V0.18","\u002Fen\u002Fmigrations\u002Fv0.17_to_v0.18","en\u002F5.migrations\u002F1.v0.17_to_v0.18",{"id":242,"title":77,"body":243,"description":352,"extension":1168,"links":1169,"meta":1170,"navigation":884,"path":78,"seo":1171,"stem":79,"__hash__":1172},"docs_en\u002Fen\u002F3.using\u002F3.configuration\u002F3.adapts-seeds.md",{"type":244,"value":245,"toc":1157},"minimark",[246,251,280,311,314,319,330,343,346,400,404,419,575,607,615,625,642,644,648,651,658,662,667,677,690,693,708,711,722,1002,1053,1148,1153],[247,248,250],"h1",{"id":249},"configuring-the-adapters-and-seeds","Configuring the Adapters and Seeds",[252,253,255,259,260,263,264,267,268,259,272,275,276,279],"alert",{"type":254},"warning",[256,257,258],"strong",{},"Seeds"," and ",[256,261,262],{},"adapters"," are ",[256,265,266],{},"contracts"," defined by the ",[269,270,271],"code",{},"Core",[256,273,274],{},"implemented"," by the ",[269,277,278],{},"cssXX.dashboards_store"," project. If you don't implement them, the ETL will fail. Please refer to the Marts documentation to know which seeds and adapters are required by each one.",[281,282,283,284,287,288,291,292,259,294,297,298,263,300,303,304,263,307,310],"p",{},"Both the ",[269,285,286],{},"human_resources"," and the ",[269,289,290],{},"educ_serv"," marts use ",[256,293,262],{},[256,295,296],{},"seeds"," to configure the ETL. As explained in the \"Architecture\" page, both are used to provide school board-specific business rules to the ETL. ",[256,299,258],{},[256,301,302],{},"csv"," files used to create dimensions later used to filter or map data. ",[256,305,306],{},"Adapters",[256,308,309],{},"SQL"," files with arbitrary SQL used to create dimensions or facts. We tend to prefer seeds over adapters as they are easier to maintain and understand. But sometimes, you just need to write SQL.",[312,313,258],"h2",{"id":296},[315,316,318],"h3",{"id":317},"implementing-a-seed","Implementing a seed",[252,320,322,323,325,326,329],{"type":321},"info","The ",[269,324,271],{}," provides the seed definition. It is up to you to populate it. The seed definition is located in ",[269,327,328],{},"core.dashboards_store\u002Fseeds\u002F**\u002F*\u002Fschema.yml",".",[281,331,332,333,335,336,338,339,342],{},"To implement a seed, create a ",[269,334,302],{}," file with the columns defined by the seed contract. The ",[269,337,302],{}," file must be located in the matching path under ",[269,340,341],{},"cssXX.dashboards_store\u002Fseeds\u002F**\u002F*\u002F"," and must use the seed name defined in the YAML file. The definition file gives information about the expected column types and describes each field to help you populate it.",[281,344,345],{},"Once populated, you can load in the database and test the seed with the command :",[347,348,353],"pre",{"className":349,"code":350,"language":351,"meta":352,"style":352},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","dbt build --full-refresh --select \u003Cthe name of the seed>\n","bash","",[269,354,355],{"__ignoreMap":352},[356,357,360,364,368,371,374,378,381,384,387,390,393,397],"span",{"class":358,"line":359},"line",1,[356,361,363],{"class":362},"sBMFI","dbt",[356,365,367],{"class":366},"sfazB"," build",[356,369,370],{"class":366}," --full-refresh",[356,372,373],{"class":366}," --select",[356,375,377],{"class":376},"sMK4o"," \u003C",[356,379,380],{"class":366},"the",[356,382,383],{"class":366}," name",[356,385,386],{"class":366}," of",[356,388,389],{"class":366}," the",[356,391,392],{"class":366}," see",[356,394,396],{"class":395},"sTEyZ","d",[356,398,399],{"class":376},">\n",[315,401,403],{"id":402},"example","Example:",[281,405,406,407,410,411,414,415,418],{},"Let's say I want to implement a seed named ",[269,408,409],{},"example_seed"," and defined by ",[269,412,413],{},"core.dashboards_store\u002Fseeds\u002Fmarts\u002Fexample\u002Fschema.yml",".\nThe content of the ",[269,416,417],{},"schema.yml"," file is :",[347,420,424],{"className":421,"code":422,"language":423,"meta":352,"style":352},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","seeds:\n  - name: example_seed\n    description: >\n      This is the example seed.\n      This seed is a deliberately useless seed. It consists of any set of integers you can think of.\n    # The fields' description\n    columns:\n      - name: seq_value\n        description: The random integer\n        tests:\n          - not_null  # Null values are not allowed\n          - unique  # The integer must be unique\n    # The seed's data type\n    config:\n      column_types:\n        value: int\n","yaml",[269,425,426,434,448,460,466,472,479,487,500,511,519,531,542,548,556,564],{"__ignoreMap":352},[356,427,428,431],{"class":358,"line":359},[356,429,296],{"class":430},"swJcz",[356,432,433],{"class":376},":\n",[356,435,437,440,442,445],{"class":358,"line":436},2,[356,438,439],{"class":376},"  -",[356,441,383],{"class":430},[356,443,444],{"class":376},":",[356,446,447],{"class":366}," example_seed\n",[356,449,451,454,456],{"class":358,"line":450},3,[356,452,453],{"class":430},"    description",[356,455,444],{"class":376},[356,457,459],{"class":458},"s7zQu"," >\n",[356,461,463],{"class":358,"line":462},4,[356,464,465],{"class":366},"      This is the example seed.\n",[356,467,469],{"class":358,"line":468},5,[356,470,471],{"class":366},"      This seed is a deliberately useless seed. It consists of any set of integers you can think of.\n",[356,473,475],{"class":358,"line":474},6,[356,476,478],{"class":477},"sHwdD","    # The fields' description\n",[356,480,482,485],{"class":358,"line":481},7,[356,483,484],{"class":430},"    columns",[356,486,433],{"class":376},[356,488,490,493,495,497],{"class":358,"line":489},8,[356,491,492],{"class":376},"      -",[356,494,383],{"class":430},[356,496,444],{"class":376},[356,498,499],{"class":366}," seq_value\n",[356,501,503,506,508],{"class":358,"line":502},9,[356,504,505],{"class":430},"        description",[356,507,444],{"class":376},[356,509,510],{"class":366}," The random integer\n",[356,512,514,517],{"class":358,"line":513},10,[356,515,516],{"class":430},"        tests",[356,518,433],{"class":376},[356,520,522,525,528],{"class":358,"line":521},11,[356,523,524],{"class":376},"          -",[356,526,527],{"class":366}," not_null",[356,529,530],{"class":477},"  # Null values are not allowed\n",[356,532,534,536,539],{"class":358,"line":533},12,[356,535,524],{"class":376},[356,537,538],{"class":366}," unique",[356,540,541],{"class":477},"  # The integer must be unique\n",[356,543,545],{"class":358,"line":544},13,[356,546,547],{"class":477},"    # The seed's data type\n",[356,549,551,554],{"class":358,"line":550},14,[356,552,553],{"class":430},"    config",[356,555,433],{"class":376},[356,557,559,562],{"class":358,"line":558},15,[356,560,561],{"class":430},"      column_types",[356,563,433],{"class":376},[356,565,567,570,572],{"class":358,"line":566},16,[356,568,569],{"class":430},"        value",[356,571,444],{"class":376},[356,573,574],{"class":366}," int\n",[281,576,577,578,580,581,584,585,588,589,592,593,596,597,599,600,603,604,606],{},"I first create an empty ",[269,579,302],{}," and save it under ",[269,582,583],{},"cssXX.dashboards_store\u002Fseeds\u002Fmarts\u002Fexample\u002Fexample_seed.csv",". Note that the seed is saved in the ",[269,586,587],{},"cssXX"," project folder, ",[256,590,591],{},"not"," in the ",[269,594,595],{},"core"," project. The name of the file is the one indicated in the second line of the seed definition: ",[269,598,409],{},".\nFrom the seed definition, I know that my implementation should have only one column named ",[269,601,602],{},"seq_value"," filled with a set of unique, not null, integers. I can now populate the ",[269,605,302],{}," file with the following content :",[347,608,613],{"className":609,"code":611,"language":612},[610],"language-text","seq_value\n1\n2\n3\n4\n6\n7\n9\n","text",[269,614,611],{"__ignoreMap":352},[281,616,617,618,620,621,624],{},"I then load, and test, my seed in the database. A table will be automatically created and populated with the content of the ",[269,619,302],{}," file. The table will be named ",[269,622,623],{},"exemple_seed",". To do so, I just enter the following command :",[347,626,628],{"className":349,"code":627,"language":351,"meta":352,"style":352},"dbt build --full-refresh --select example_seed\n",[269,629,630],{"__ignoreMap":352},[356,631,632,634,636,638,640],{"class":358,"line":359},[356,633,363],{"class":362},[356,635,367],{"class":366},[356,637,370],{"class":366},[356,639,373],{"class":366},[356,641,447],{"class":366},[312,643,306],{"id":262},[315,645,647],{"id":646},"mandatory-adapters","Mandatory adapters",[252,649,650],{"type":254},"These adapters must be populated for the ETL to work.",[281,652,653,654,657],{},"The next table shows the required adapter definitions and the paths where the ",[269,655,656],{},"sql"," files should be placed.",[315,659,661],{"id":660},"implementing-an-adapter","Implementing an adapter",[252,663,322,664,666],{"type":321},[269,665,271],{}," can only provide you with the adapter definition. The concrete implementation is usually quite specific to your school board.",[281,668,669,670,673,674,329],{},"Adapters are described in ",[269,671,672],{},"adapters.yml"," files. Those files are located under ",[269,675,676],{},"core.dashboards_store\u002Fmodels\u002F**\u002Fadapters.yml",[281,678,679,680,682,683,685,686,689],{},"To implement an adapter, create a ",[269,681,656],{}," file with arbitrary SQL. The ",[269,684,656],{}," file should be saved under ",[269,687,688],{},"cssXX.dashboards_store\u002Fmodels\u002F**\u002F*\u002F\u003Cadapter_name>.sql",". The exact file path should match the path from the YAML definition, suffixed by the name of the adapter.",[281,691,692],{},"The definition file gives information about the expected column types and describes each field. Please refer to the definition file for the column specification and description.",[281,694,695,696,699,700,703,704,707],{},"We try to add a dbt ",[269,697,698],{},"analysis"," as an example of how to implement an adapter. When available, the analysis is saved under ",[269,701,702],{},"core.dashboards_store\u002Fanalyses\u002F**\u002F*\u002F\u003Cadapter_name>.sql",", where ",[269,705,706],{},"**\u002F*\u002F\u003Cadapter_name>.sql"," is the path from the adapter definition file.",[315,709,403],{"id":710},"example-1",[281,712,713,714,717,718,721],{},"Let's say I have to implement the ",[269,715,716],{},"stg_ele_prescolaire"," adapter. This adapter is defined in ",[269,719,720],{},"core.dashboards_store\u002Fmodels\u002Fmarts\u002Feduc_serv\u002Fadapters.yml",". The adapter's definition is :",[347,723,725],{"className":421,"code":724,"language":423,"meta":352,"style":352},"# core.dashboards_store\u002Fmodels\u002Fmarts\u002Feduc_serv\u002Fadapters.yml\nsources:\n  - name: populations\n    description: >\n      The populations identify groups of students with consistent profiles, such as regular students, students in special education or students in general adult education.\n    schema: \"{{ target.schema }}_educ_serv_staging\"\n    tables:\n      - name: stg_ele_prescolaire\n        description: >\n          Identification of the population in 4-year-old kindergarten \u002F passe partout \u002F 5-year-old kindergarten.\n        columns:\n          - name: code_perm\n            description: The specific unique identifier for a student\n          - name: id_eco\n            description: The specific unique identifier for a school by year\n          - name: annee\n            description: The years the student was active\n\nmodels:\n  - name: stg_ele_prescolaire\n    config:\n      schema: \"educ_serv_staging\"\n      \u003C\u003C: *x-common-tags\n    description: >\n      Identification of the population in 4-year-old kindergarten \u002F passe partout \u002F 5-year-old kindergarten.\n    tests:\n      - resolution:\n          combination_of_columns:\n            - code_perm\n            - id_eco\n            - annee\n",[269,726,727,732,739,750,758,763,779,786,797,805,810,817,828,838,849,858,869,879,886,894,905,912,927,939,948,954,962,972,980,988,995],{"__ignoreMap":352},[356,728,729],{"class":358,"line":359},[356,730,731],{"class":477},"# core.dashboards_store\u002Fmodels\u002Fmarts\u002Feduc_serv\u002Fadapters.yml\n",[356,733,734,737],{"class":358,"line":436},[356,735,736],{"class":430},"sources",[356,738,433],{"class":376},[356,740,741,743,745,747],{"class":358,"line":450},[356,742,439],{"class":376},[356,744,383],{"class":430},[356,746,444],{"class":376},[356,748,749],{"class":366}," populations\n",[356,751,752,754,756],{"class":358,"line":462},[356,753,453],{"class":430},[356,755,444],{"class":376},[356,757,459],{"class":458},[356,759,760],{"class":358,"line":468},[356,761,762],{"class":366},"      The populations identify groups of students with consistent profiles, such as regular students, students in special education or students in general adult education.\n",[356,764,765,768,770,773,776],{"class":358,"line":474},[356,766,767],{"class":430},"    schema",[356,769,444],{"class":376},[356,771,772],{"class":376}," \"",[356,774,775],{"class":366},"{{ target.schema }}_educ_serv_staging",[356,777,778],{"class":376},"\"\n",[356,780,781,784],{"class":358,"line":481},[356,782,783],{"class":430},"    tables",[356,785,433],{"class":376},[356,787,788,790,792,794],{"class":358,"line":489},[356,789,492],{"class":376},[356,791,383],{"class":430},[356,793,444],{"class":376},[356,795,796],{"class":366}," stg_ele_prescolaire\n",[356,798,799,801,803],{"class":358,"line":502},[356,800,505],{"class":430},[356,802,444],{"class":376},[356,804,459],{"class":458},[356,806,807],{"class":358,"line":513},[356,808,809],{"class":366},"          Identification of the population in 4-year-old kindergarten \u002F passe partout \u002F 5-year-old kindergarten.\n",[356,811,812,815],{"class":358,"line":521},[356,813,814],{"class":430},"        columns",[356,816,433],{"class":376},[356,818,819,821,823,825],{"class":358,"line":533},[356,820,524],{"class":376},[356,822,383],{"class":430},[356,824,444],{"class":376},[356,826,827],{"class":366}," code_perm\n",[356,829,830,833,835],{"class":358,"line":544},[356,831,832],{"class":430},"            description",[356,834,444],{"class":376},[356,836,837],{"class":366}," The specific unique identifier for a student\n",[356,839,840,842,844,846],{"class":358,"line":550},[356,841,524],{"class":376},[356,843,383],{"class":430},[356,845,444],{"class":376},[356,847,848],{"class":366}," id_eco\n",[356,850,851,853,855],{"class":358,"line":558},[356,852,832],{"class":430},[356,854,444],{"class":376},[356,856,857],{"class":366}," The specific unique identifier for a school by year\n",[356,859,860,862,864,866],{"class":358,"line":566},[356,861,524],{"class":376},[356,863,383],{"class":430},[356,865,444],{"class":376},[356,867,868],{"class":366}," annee\n",[356,870,872,874,876],{"class":358,"line":871},17,[356,873,832],{"class":430},[356,875,444],{"class":376},[356,877,878],{"class":366}," The years the student was active\n",[356,880,882],{"class":358,"line":881},18,[356,883,885],{"emptyLinePlaceholder":884},true,"\n",[356,887,889,892],{"class":358,"line":888},19,[356,890,891],{"class":430},"models",[356,893,433],{"class":376},[356,895,897,899,901,903],{"class":358,"line":896},20,[356,898,439],{"class":376},[356,900,383],{"class":430},[356,902,444],{"class":376},[356,904,796],{"class":366},[356,906,908,910],{"class":358,"line":907},21,[356,909,553],{"class":430},[356,911,433],{"class":376},[356,913,915,918,920,922,925],{"class":358,"line":914},22,[356,916,917],{"class":430},"      schema",[356,919,444],{"class":376},[356,921,772],{"class":376},[356,923,924],{"class":366},"educ_serv_staging",[356,926,778],{"class":376},[356,928,930,933,936],{"class":358,"line":929},23,[356,931,932],{"class":376},"      \u003C\u003C:",[356,934,935],{"class":458}," *",[356,937,938],{"class":395},"x-common-tags\n",[356,940,942,944,946],{"class":358,"line":941},24,[356,943,453],{"class":430},[356,945,444],{"class":376},[356,947,459],{"class":458},[356,949,951],{"class":358,"line":950},25,[356,952,953],{"class":366},"      Identification of the population in 4-year-old kindergarten \u002F passe partout \u002F 5-year-old kindergarten.\n",[356,955,957,960],{"class":358,"line":956},26,[356,958,959],{"class":430},"    tests",[356,961,433],{"class":376},[356,963,965,967,970],{"class":358,"line":964},27,[356,966,492],{"class":376},[356,968,969],{"class":430}," resolution",[356,971,433],{"class":376},[356,973,975,978],{"class":358,"line":974},28,[356,976,977],{"class":430},"          combination_of_columns",[356,979,433],{"class":376},[356,981,983,986],{"class":358,"line":982},29,[356,984,985],{"class":376},"            -",[356,987,827],{"class":366},[356,989,991,993],{"class":358,"line":990},30,[356,992,985],{"class":376},[356,994,848],{"class":366},[356,996,998,1000],{"class":358,"line":997},31,[356,999,985],{"class":376},[356,1001,868],{"class":366},[1003,1004,1005,1016,1043],"ol",{},[1006,1007,1008,1009,1012,1013,1015],"li",{},"I first create a file under ",[269,1010,1011],{},"cssXX.dashboards_store\u002Fmodels\u002Fmarts\u002Feduc_serv\u002Fstg_ele_prescolaire.sql",". Note that the file is created in ",[269,1014,587],{}," with the same name as the one in the definition file.",[1006,1017,1018,1019],{},"I then check the definition:\n",[1003,1020,1021,1038],{},[1006,1022,1023,1024,1027,1028,1031,1032,1031,1035,329],{},"From the definition (",[269,1025,1026],{},"source"," key), I know that the adapter should have the three columns: ",[269,1029,1030],{},"code_perm",", ",[269,1033,1034],{},"id_eco",[269,1036,1037],{},"annee",[1006,1039,1023,1040,1042],{},[269,1041,891],{}," key), I know the table should pass a resolution test on the three columns, meaning that my table should not have duplicates on the three columns.",[1006,1044,1045,1046,1049,1050,1052],{},"I then check under ",[269,1047,1048],{},"core.dashboards_store\u002Fanalyses\u002Fmarts\u002Feduc_serv\u002Fstg_ele_prescolaire.sql"," to see whether an analysis is available. In this case, there is one. I copy and adapt the analysis in my ",[269,1051,656],{}," file to bootstrap the adapter implementation.",[347,1054,1057],{"className":1055,"code":1056,"language":656,"meta":352,"style":352},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- cssXX.dashboards_store\u002Fmodels\u002Fmarts\u002Feduc_serv\u002Fstg_ele_prescolaire.sql\nselect distinct ele.code_perm, eco.id_eco, eco.annee\nfrom {{ ref(\"i_gpm_e_dan\") }} as eledan\nleft join {{ ref(\"i_gpm_t_eco\") }} as eco on eledan.id_eco = eco.id_eco\nleft join\n    {{ ref(\"i_gpm_e_ele\") }} as ele on eledan.fiche = ele.fiche\n    \u002F*WHERE \n    eledan.statut_don_an = 'A' AND (\n        (\n            eledan.ordre_ens = '1'\n            AND eledan.grp_rep IN ('MA4','MA5','M41','M42')\n        )\n\n        OR (\n            eledan.ordre_ens = '2'\n            AND (eledan.grp_rep NOT LIKE '9%' OR eledan.grp_rep IS NULL)\n            )\n    )*\u002F\n",[269,1058,1059,1064,1069,1074,1079,1084,1089,1094,1099,1104,1109,1114,1119,1123,1128,1133,1138,1143],{"__ignoreMap":352},[356,1060,1061],{"class":358,"line":359},[356,1062,1063],{},"-- cssXX.dashboards_store\u002Fmodels\u002Fmarts\u002Feduc_serv\u002Fstg_ele_prescolaire.sql\n",[356,1065,1066],{"class":358,"line":436},[356,1067,1068],{},"select distinct ele.code_perm, eco.id_eco, eco.annee\n",[356,1070,1071],{"class":358,"line":450},[356,1072,1073],{},"from {{ ref(\"i_gpm_e_dan\") }} as eledan\n",[356,1075,1076],{"class":358,"line":462},[356,1077,1078],{},"left join {{ ref(\"i_gpm_t_eco\") }} as eco on eledan.id_eco = eco.id_eco\n",[356,1080,1081],{"class":358,"line":468},[356,1082,1083],{},"left join\n",[356,1085,1086],{"class":358,"line":474},[356,1087,1088],{},"    {{ ref(\"i_gpm_e_ele\") }} as ele on eledan.fiche = ele.fiche\n",[356,1090,1091],{"class":358,"line":481},[356,1092,1093],{},"    \u002F*WHERE \n",[356,1095,1096],{"class":358,"line":489},[356,1097,1098],{},"    eledan.statut_don_an = 'A' AND (\n",[356,1100,1101],{"class":358,"line":502},[356,1102,1103],{},"        (\n",[356,1105,1106],{"class":358,"line":513},[356,1107,1108],{},"            eledan.ordre_ens = '1'\n",[356,1110,1111],{"class":358,"line":521},[356,1112,1113],{},"            AND eledan.grp_rep IN ('MA4','MA5','M41','M42')\n",[356,1115,1116],{"class":358,"line":533},[356,1117,1118],{},"        )\n",[356,1120,1121],{"class":358,"line":544},[356,1122,885],{"emptyLinePlaceholder":884},[356,1124,1125],{"class":358,"line":550},[356,1126,1127],{},"        OR (\n",[356,1129,1130],{"class":358,"line":558},[356,1131,1132],{},"            eledan.ordre_ens = '2'\n",[356,1134,1135],{"class":358,"line":566},[356,1136,1137],{},"            AND (eledan.grp_rep NOT LIKE '9%' OR eledan.grp_rep IS NULL)\n",[356,1139,1140],{"class":358,"line":871},[356,1141,1142],{},"            )\n",[356,1144,1145],{"class":358,"line":881},[356,1146,1147],{},"    )*\u002F\n",[1003,1149,1150],{"start":462},[1006,1151,1152],{},"I then fine-tune or completely rewrite the code I have just copied to match my school board's reality.",[1154,1155,1156],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":352,"searchDepth":436,"depth":436,"links":1158},[1159,1163],{"id":296,"depth":436,"text":258,"children":1160},[1161,1162],{"id":317,"depth":450,"text":318},{"id":402,"depth":450,"text":403},{"id":262,"depth":436,"text":306,"children":1164},[1165,1166,1167],{"id":646,"depth":450,"text":647},{"id":660,"depth":450,"text":661},{"id":710,"depth":450,"text":403},"md",null,{},{"title":77,"description":352},"D3RNjG9_0Cr7hP2zKmas0ElUgjxJjyqGBAuQCFz_sYo",[1174,1175],{"title":73,"path":74,"stem":75,"description":352,"children":-1},{"title":81,"path":82,"stem":83,"description":1176,"children":-1},"By default, the Store does not materialize anything. You need to enable the models you want to materialize. We do this to avoid materializing data you do not need: if you are interested in only one dashboard, then you do not need to materialize the whole core_dashboards_store.",1781106580887]