<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yann Floch on Medium]]></title>
        <description><![CDATA[Stories by Yann Floch on Medium]]></description>
        <link>https://medium.com/@yann.floch?source=rss-9da696c49173------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*V3pmy4vIj05gljoDtW3V4g.png</url>
            <title>Stories by Yann Floch on Medium</title>
            <link>https://medium.com/@yann.floch?source=rss-9da696c49173------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 16:53:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yann.floch/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Notion and Power bi integration with Rest]]></title>
            <link>https://medium.com/younited-tech-blog/notion-and-power-bi-integration-with-rest-e5dd329d9274?source=rss-9da696c49173------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5dd329d9274</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Yann Floch]]></dc:creator>
            <pubDate>Thu, 24 Nov 2022 17:39:08 GMT</pubDate>
            <atom:updated>2024-10-23T08:08:42.712Z</atom:updated>
            <content:encoded><![CDATA[<h3>Notion and Power BI integration with Rest in a Power BI Data Connector</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*We6MoiDjnEyectBANUUB2g.png" /><figcaption>Power BI Notion Integration with rest</figcaption></figure><p>In this blog post you will learn :<br>- How to <strong>do rest post query to Notion</strong> with Power BI.<br>- How to <strong>do pagination with cursor</strong> using Power BI.</p><p>My colleagues from product team chose Notion to manage their activities ( product strategy, discovery, roadmap management etc…)<br><strong>Data beats opinion</strong> and we do BI using Power BI 📈 with product and tech data to follow our cherished product the Younited Credit platform.</p><p><strong><em>Our need</em></strong><em> is to get all notion database rows at once.</em></p><p><em>Power bi services do not support necessary logic for header access token authentication. All right it is Microsoft choice. Its not a good practice to hardcode acces token in power m script. This is why the snippets above should be packaged in a </em><a href="https://github.com/microsoft/DataConnectors"><em>data connector</em></a><em> then </em><strong><em>credentials are stored in a secured space</em></strong><em> outside of script. In order to use the data connector with power bi services you will need to deploy it in a </em><a href="https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-onprem">on-premises data gateway</a>.</p><p>Long story short Four Power BI functions are necessary to integrate Power BI and Notion.</p><h3>Do rest post query to Notion with Power BI</h3><p>First function is doing the Post Rest Request and <strong>call database query Notion</strong> feature to get items in a Json Respons. <br>The <a href="https://developers.notion.com/reference/post-database-query">query Notion feature</a> provide paginated results with max page size set to 100 rows. <br><strong>Using cursor let you get a page</strong> from the cursor to next 99 rows. <br>As Notion is mostly base on data bases the function take data base id as parameter. It will let you query any base of your integration.</p><p>Access token should be the <a href="https://www.notion.so/help/add-and-manage-connections-with-the-api">integration</a> token provided by Notion</p><pre>fGetNotionItems=(cursor as text, databaseId as text) =&gt;<br>  let<br>    accesstoken = Extension.CurrentCredential()[Key], <br>    headers = [#&quot;Authorization&quot; = accesstoken , #&quot;Notion-Version&quot;=&quot;2022-06-28&quot; , #&quot;Content-Type&quot; = &quot;application/json&quot;],<br>    postData = Json.FromValue(<br>        [<br>            page_size = 100,<br>            start_cursor = cursor,<br>            sorts =Table.FromRecords({[timestamp=&quot;created_time&quot;, direction = &quot;ascending&quot;]})<br>        ]<br>        ), <br>    response =  Web.Contents(   &quot;https://api.notion.com&quot;,<br>        [   <br>            RelativePath=&quot;v1/databases/&quot;&amp;databaseId&amp;&quot;/query&quot;,<br>            Headers = headers,<br>            Content =postData<br>        ]<br>        ),<br>        jsonResponse = Json.Document(response)<br>  in<br>    jsonResponse;</pre><p>In order to be supported by power bi online Web.Content Relative path is used to build the url instead of basic string concatenation leading to the following error message <em>This dataset includes a dynamic data source</em>.</p><p>The second function get the First Cursor is very closed to the previous</p><pre>fGetNotionFirstCursor = (databaseId as text)=&gt;<br>let<br>    accesstoken = Extension.CurrentCredential()[Key],<br>    headers = [#&quot;Authorization&quot; = accesstoken , #&quot;Notion-Version&quot;=&quot;2022-06-28&quot; , #&quot;Content-Type&quot; = &quot;application/json&quot;],<br>    postData = Json.FromValue(<br>        [<br>            page_size = 1,<br>            sorts =Table.FromRecords({[timestamp=&quot;created_time&quot;, direction = &quot;ascending&quot;]})<br>        ]<br>        ), <br>    response =  Web.Contents(<br>        &quot;https://api.notion.com&quot;,<br>        [   <br>            RelativePath=&quot;v1/databases/&quot;&amp;databaseId&amp;&quot;/query&quot;,<br>            Headers = headers,<br>            Content =postData<br>        ]<br>        ),<br>        jsonResponse = Json.Document(response),<br>        fisrtCursor =  jsonResponse[results]{0}[id]<br>in fisrtCursor;</pre><h3>Pagination with cursor using Power BI</h3><p>The Third Function<strong> iterates to get all rows from a database</strong>. <br>This function uses <a href="https://learn.microsoft.com/en-us/powerquery-m/list-generate">List.Generate()</a> Power Query M function and iterates using next_cursor as described in Notion documentation.</p><pre>fNotionSearchPaginate=(cursor as text, databaseId as text) =&gt;<br>  let<br>    QueryNotion = List.Generate(<br>      () =&gt; [Result = try fGetNotionItems(cursor, databaseId) otherwise null, Cursor = &quot;cursor&quot;], <br>      each [Result] &lt;&gt; null, <br>      each [<br>        Result = try<br>          fGetNotionItems(Record.Field([Result], &quot;next_cursor&quot;), databaseId)<br>        otherwise<br>          null, <br>        Cursor = Record.Field([Result], &quot;next_cursor&quot;)<br>      ], <br>      each [Result]<br>    )<br>  in<br>    QueryNotion</pre><p>There is a good tutorial on Youtube to understand List.Generate() and pagination with a <strong>simple example</strong> if your are not familiar with this feature.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F05yhwnuCjRw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D05yhwnuCjRw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F05yhwnuCjRw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d72c27b53bdb82bc5ddebdd23768e3b5/href">https://medium.com/media/d72c27b53bdb82bc5ddebdd23768e3b5/href</a></iframe><h3>Getting database</h3><p>Finally our needs is supported and you just need to call Notion.DB( database id )</p><pre>[DataSource.Kind=&quot;Notion&quot;, Publish=&quot;Notion.Publish&quot;]<br>shared Notion.DB = (DatabaseID as text) =&gt;<br>    let<br>        cursor=fGetNotionFirstCursor(DatabaseID),<br>        database = fNotionSearchPaginate(cursor ,DatabaseID ),<br>        apiKey = Extension.CurrentCredential()[Key]<br>    in<br>        database;<br><br>// Data Source Kind description<br>Notion = [<br>    Authentication = [<br>         Key = []<br>        // UsernamePassword = [],<br>        // Windows = [],<br>        //Anonymous = []<br>    ]<br>];</pre><p>Enjoy Notion BI 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5dd329d9274" width="1" height="1" alt=""><hr><p><a href="https://medium.com/younited-tech-blog/notion-and-power-bi-integration-with-rest-e5dd329d9274">Notion and Power bi integration with Rest</a> was originally published in <a href="https://medium.com/younited-tech-blog">YounitedTech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SMOKE TEST]]></title>
            <link>https://medium.com/younited-tech-blog/smoke-test-eb686731d791?source=rss-9da696c49173------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb686731d791</guid>
            <category><![CDATA[quality-software]]></category>
            <category><![CDATA[smoke-test]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[Yann Floch]]></dc:creator>
            <pubDate>Tue, 11 Dec 2018 13:59:00 GMT</pubDate>
            <atom:updated>2018-12-11T13:59:00.330Z</atom:updated>
            <content:encoded><![CDATA[<p>Chez Younited Credit, nous pratiquons l’intégration continue et le déploiement continu. De ce fait, nous déployons très souvent nos applications. Nous n’aborderons pas dans ce billet les bénéfices de ces pratiques, en revanche, nous abordons un type de test qui supporte ces pratiques.</p><p><strong>Pourquoi faire des smoke tests ?</strong></p><p>La question que nous devons nous poser quand une application est déployée dans un environnement, qu’il soit d’intégration continue, de production ou autre est :</p><p>Roulements de tambour ….</p><p>Peut-on l’utiliser ou encore est-elle <strong>testable</strong> ?</p><p>Ainsi on pourra <strong>éviter de commencer</strong> un run de test inutile ayant pour conséquences :</p><ul><li>L’effet « mauvaise surprise »</li><li>auprès des testeurs ?</li><li>D’exécuter des tests automatiques sur une application qui n’est pas prête à être testée, donc d’économiser du cpu et des analyses inutiles</li></ul><p><strong>Origines de la pratique</strong></p><p>Nous nous sommes inspirés de nos prédécesseurs qui œuvraient dans l’industrie électronique.</p><p>Une image valant mieux qu’un beau discours, voici un exemple de résultat de <strong>smoke test KO</strong> :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/0*zq9PrFyIkB8Egqme.png" /><figcaption>circuit intégré — smoke test — <a href="https://commons.wikimedia.org/wiki/File:Lane_Guidance_Camera_PCB.jpg">contenu modifié de wikimedia</a></figcaption></figure><p>Dans ce cas, le testeur ne démarre pas la séance de test car le circuit est inutilisable une fois sous tension. L’idée d’un smoke test est donc d’attraper des gros poissons avec des gros filets.</p><p>Donc, notre<strong> smoke test</strong> doit être <strong>robuste</strong> et ainsi ne pas vérifier un comportement précis au sens d’une règle de gestion, mais plutôt un <strong>comportement général</strong>.</p><p><strong>Mise en application de la pratique dans le contexte Younited Credit</strong></p><p>Voyons comment appliquer cette pratique à un site web purement éditorial.</p><p>titre du test : websiteHomePageShouldHaveATitle</p><p>Il conviendrait de faire un test pour vérifier que la home page comporte un T<em>itle</em>pour confirmer que l’environnement est prêt.</p><p>Voyons comment appliquer cette pratique à l’API d’un CRM.</p><p>titre du test : customerShouldHaveAName</p><p>Il conviendrait de faire un test pour vérifier qu’un objet customer comporte un attribut <em>Name</em> .</p><p><strong>Mise en oeuvre des Smoke Tests de notre site edito</strong></p><p>Chez Younited Credit, nous utilisons Azure pour construire, déployer, héberger nos produits / softs.</p><p>Voici deux rapports de déploiement effectués à l’aide de Azure Release Management.</p><h3>Smoke test OK</h3><p>Voici un exemple de déploiement de notre site edito avec son étape de <strong>smoke test en succès</strong> donc un run de test fonctionnel exécuté. On trouve d’ailleurs une anomalie.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/0*l9avoseckkMKoURY.png" /><figcaption>Smoke test integré dans le Pipe line de release</figcaption></figure><h3>Smoke test KO</h3><p>Cette fois l’application déployée n’est pas testable : les étapes suivantes ne seront pas exécutées. On est informé du problème.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/0*6NnyE3e3n1G4oasu.png" /><figcaption>Smoke test integré dans le Pipe line de release avec le smoke test KO</figcaption></figure><h3>Configuration des étapes suivant le smoke test avec Release Management</h3><p>Après la tache de smoke test, nous laissons celle de publication de résultat du smoke test s’exécuter, même si le test est en erreur. En revanche, l’étape de test fonctionnel ne s’exécute que quand les précédentes tâches sont en succès.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MROUUsShuMpJPWoT.png" /><figcaption>Configuration smoke test avec azure release management</figcaption></figure><p><strong>Bon test !</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb686731d791" width="1" height="1" alt=""><hr><p><a href="https://medium.com/younited-tech-blog/smoke-test-eb686731d791">SMOKE TEST</a> was originally published in <a href="https://medium.com/younited-tech-blog">YounitedTech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>