<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aura – </title>
    <link>/docs/components/kpi-entities/</link>
    <description>Recent content on Aura</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="/docs/components/kpi-entities/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/kpi-entities/aura-entities-definition/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/kpi-entities/aura-entities-definition/</guid>
      <description>
        
        
        &lt;h1 id=&#34;aura-entities-definition&#34;&gt;Aura entities definition&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Aura entities definition versions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Version 5.0.0&lt;/strong&gt; for those entities using &lt;strong&gt;CSV format&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Version 6.0.0&lt;/strong&gt; for those entities using &lt;strong&gt;Avro format&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Aura entities definition&lt;/strong&gt; includes the different entities currently written in Aura and required to calculate Aura KPIs and generate Aura&amp;rsquo;s invoices.&lt;/p&gt;
&lt;p&gt;Entities are organized by types, as shown in the table below, together with the definition, how they are generated and its format, currently, CSV or Avro.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Entities types&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Generation&lt;/th&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-avro-format/dimensions/&#34;&gt;Dimensions&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;They are Aura&amp;rsquo;s configuration settings that are needed to understand Aura&amp;rsquo;s entities&lt;/td&gt;
&lt;td&gt;They are generated directly by &lt;em&gt;&lt;strong&gt;aura-kpis-uploader&lt;/strong&gt;&lt;/em&gt; from the content of the &lt;em&gt;&lt;strong&gt;aura-configuration-api&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;Avro&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-csv-format/message/&#34;&gt;Message&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Message entity is used to store information about the messages handled by &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; and the actions performed on them.&lt;/td&gt;
&lt;td&gt;They are created in &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;CSV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-csv-format/recognizer/&#34;&gt;Recognizer&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Recognizer entity is used to store the request to any of the recognizers during the utterance recognition phase of the messages.&lt;/td&gt;
&lt;td&gt;They are created by &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;, &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;aura-nlp&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;CSV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-csv-format/extended-message/&#34;&gt;Extended Message&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Extended Message entity is used to store extra information of a Message.&lt;/td&gt;
&lt;td&gt;They are created in &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;CSV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-csv-format/groot-message/&#34;&gt;Groot Message&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Groot Message entity is used to store information about the messages handled by &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;They are created in &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;CSV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-avro-format/gateway-message/&#34;&gt;Gateway Message&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Gateway Message entity is used to store information about the messages handled by &lt;em&gt;&lt;strong&gt;aura-gateway-api&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;They are created by &lt;em&gt;&lt;strong&gt;aura-gateway-api&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;td&gt;Avro&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-avro-format/audit/&#34;&gt;Audit&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Audit entity is used to store information about the interactions handled by Aura components. They will be used to generate Aura&amp;rsquo;s invoices.&lt;/td&gt;
&lt;td&gt;They are created by  &lt;em&gt;&lt;strong&gt;aura-kpis-uploader&lt;/strong&gt;&lt;/em&gt; based on the information received in &lt;strong&gt;Groot Message&lt;/strong&gt; and &lt;strong&gt;Gateway Message&lt;/strong&gt;.&lt;/td&gt;
&lt;td&gt;Avro&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;entities-generation&#34;&gt;Entities generation&lt;/h2&gt;
&lt;p&gt;Until Aura&amp;rsquo;s release 9.3.0 (Gwen Stefani), all entities in Aura were generated in CSV format.&lt;br&gt;
The full procedure is explained in &lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-csv-format/&#34;&gt;Aura Entities in CSV format&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In release 9.4.0 (Hannah Montana), the process to migrate Aura entities format from CSV to full-URM-compliant Avro format started. It is going to be a phased process, with entities being migrated in small groups to minimize the impact on services already consuming Aura entities in CSV.&lt;br&gt;
The full procedure is explained in &lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-avro-format/&#34;&gt;Aura Entities in Avro format&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/kpi-entities/aura-kpis-uploader/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/kpi-entities/aura-kpis-uploader/</guid>
      <description>
        
        
        &lt;h1 id=&#34;aura-kpis-uploader&#34;&gt;Aura KPIs uploader&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Aura KPIs uploader is the component in charge of the management of Aura entities and KPIs dimensions&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;aura-kpis-uploader&lt;/strong&gt;&lt;/em&gt; is the component responsible for handling entities and KPIs dimensions in Aura.&lt;/p&gt;
&lt;p&gt;Currently, it manages both &lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-csv-format/&#34;&gt;CSV entities&lt;/a&gt; and &lt;a href=&#34;../../../docs/components/kpi-entities/aura-entities-definition/entities-avro-format/&#34;&gt;AVRO ones&lt;/a&gt;, that coexist in Aura.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;aura-kpis-uploader-cli&lt;/strong&gt;&lt;/em&gt; is an executable script that uploads KPIs in the storage location indicated in the destination config. It is a cron-job deployed in Aura&amp;rsquo;s cluster that is executed every hour (although it is configurable in the range from 1h to 24h). It is developed with &lt;a href=&#34;https://nodejs.org/en/download/releases/&#34;&gt;Node 14&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Detailed information regarding &lt;em&gt;&lt;strong&gt;aura-kpis-uploader-cli&lt;/strong&gt;&lt;/em&gt; is found in the following documents:&lt;br&gt;
. &lt;a href=&#34;#aura-kpis-uploader-architecture&#34;&gt;Architecture&lt;/a&gt; and &lt;a href=&#34;#aura-kpis-uploader-components&#34;&gt;main components&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;#aura-kpis-uploader-operation&#34;&gt;How does Aura KPIs uploader work?&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-uploader-use/&#34;&gt;How to use Aura KPIs uploader?&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/environment-variables/&#34;&gt;Environment variables&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-dimensions/&#34;&gt;KPIs dimensions&lt;/a&gt; and &lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-entities/&#34;&gt;Aura entities&lt;/a&gt; processing &lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/troubleshooting/&#34;&gt;Troubleshooting&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;aura-kpis-uploader-architecture&#34;&gt;Aura KPIs uploader architecture&lt;/h2&gt;
&lt;p&gt;In the following diagram the architecture of &lt;em&gt;&lt;strong&gt;aura-kpis-uploader-cli&lt;/strong&gt;&lt;/em&gt; is represented, including its main components, which are described in the following sections.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/aura-kpis-uploader/kpis-uploader-cli.svg&#34; alt=&#34;Components diagram&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;aura-kpis-uploader-components&#34;&gt;Aura KPIs uploader components&lt;/h3&gt;
&lt;h4 id=&#34;configurationmanager&#34;&gt;ConfigurationManager&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;ConfigurationManager&lt;/code&gt; is a handler for configuration, obtained through a channel configuration or environment variables.&lt;/p&gt;
&lt;h4 id=&#34;main-process&#34;&gt;Main process&lt;/h4&gt;
&lt;p&gt;Main process is referred to the process that a cron-job executes in Aura&amp;rsquo;s cluster.&lt;/p&gt;
&lt;h4 id=&#34;kpi-upload&#34;&gt;KPI Upload&lt;/h4&gt;
&lt;p&gt;It contains the logic to perform the upload of KPIs dimensions and Aura entities in parallel mode to &lt;strong&gt;Kernel&lt;/strong&gt; Azure Storage Account.&lt;/p&gt;
&lt;p&gt;This process is in charge of converting Aura entity files to Avro format, so that they can be imported in &lt;strong&gt;Kernel&lt;/strong&gt; DataLake and be consumed by third-party teams, such as Network Tokenization or BI of each OB. &lt;strong&gt;Aura DataSet Importer&lt;/strong&gt; can only handle blobs of type &lt;em&gt;Block Blob&lt;/em&gt;.&lt;/p&gt;
&lt;h4 id=&#34;kpis-processes&#34;&gt;KPIs Processes&lt;/h4&gt;
&lt;p&gt;The processes are defined in a configuration file configured in &lt;code&gt;AURA_SOURCE_PATH_AVRO_ADAPTERS&lt;/code&gt; and they are classified into:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-dimensions&#34;&gt;KPIs Dimensions AVRO&lt;/a&gt;&lt;br&gt;
Currently, KPIs dimensions are generated in Avro format&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-entities&#34;&gt;KPIs Entities&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-entities/#aura-kpis-entities-processing-for-csv-files&#34;&gt;KPIs Entities CSV&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-entities/#aura-kpis-entities-processing-for-avro-files&#34;&gt;KPIs Entities AVRO&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;storage-file-manager&#34;&gt;Storage File Manager&lt;/h4&gt;
&lt;p&gt;This module is used to download and upload files from and to Azure Storage.&lt;/p&gt;
&lt;h2 id=&#34;aura-kpis-uploader-operation&#34;&gt;Aura KPIs uploader operation&lt;/h2&gt;
&lt;p&gt;The execution flowchart of &lt;em&gt;&lt;strong&gt;aura-kpis-uploader-cli&lt;/strong&gt;&lt;/em&gt; is shown in the following image:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/aura-kpis-uploader/kpis-uploader-execution-flowchart.png&#34; alt=&#34;Execution flowchart&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;aura-kpis-uploader-cli&lt;/strong&gt;&lt;/em&gt; is responsible for copying the CSV files in Aura KPIs container (environment variables: &lt;code&gt;AURA_MICROSOFT_AZURE_STORAGE_COMMON_ACCOUNT&lt;/code&gt;) to the correspondent container in &lt;strong&gt;Kernel&lt;/strong&gt; Azure Storage (environment variable: &lt;code&gt;AURA_KPI_UPLOADER_MICROSOFT_AZURE_STORAGE_CONTAINER_DESTINATION&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Once the files are copied, the local copy is moved to a folder inside the container (environment variables: &lt;code&gt;AURA_MICROSOFT_AZURE_STORAGE_COMMON_ACCOUNT/AURA_KPI_UPLOADER_PROCESSED_FOLDER&lt;/code&gt;) and kept there during a fixed time, for recovering purposes.&lt;/p&gt;
&lt;p&gt;The configured time by default is 7 days and is set in &lt;a href=&#34;../../../docs/deployment/installer/&#34;&gt;installer aurak8s&lt;/a&gt; in the template &lt;a href=&#34;https://github.com/Telefonica/aurak8s/blob/master/deploy/templates/infra/lifecycle.json.j2&#34;&gt;lifecycle.json.j2&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;retention-kpis-processed-policy&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;enabled&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Lifecycle&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;definition&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;filters&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;blobTypes&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;blockBlob&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;prefixMatch&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{{ kpi_blob_container_name_processed }}&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;actions&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;baseBlob&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;delete&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;daysAfterModificationGreaterThan&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#a40000&#34;&gt;{&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;backup_retention_time&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;|&lt;/span&gt; &lt;span style=&#34;color:#a40000&#34;&gt;default(7)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}}&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a40000&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Independently of when it runs, &lt;em&gt;&lt;strong&gt;aura-kpis-uploader-cli&lt;/strong&gt;&lt;/em&gt; always performs the same process:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It gets all the files in KPIs container (environment variable: &lt;code&gt;AURA_MICROSOFT_AZURE_STORAGE_COMMON_ACCOUNT&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Firstly, it verifies the number of files to process in order not to overload the memory. This is given by the environment variable &lt;code&gt;AURA_KPI_NUM_MAX_FILES_FOR_EXECUTION&lt;/code&gt;. If the number of files exceeds this number, it will adapt the dates until it gets a range that fulfills the condition. The initial date is determined by &lt;code&gt;AURA_DAYS_INTERVAL&lt;/code&gt; and the final date is calculated by subtracting the hours indicated in &lt;code&gt;AURA_KPI_HOURS_TO_SUBTRACT_TO_GET_NUM_MAX_FILES&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When the number of files condition is fulfilled, all the &lt;em&gt;&lt;strong&gt;aura-kpis-uploader&lt;/strong&gt;&lt;/em&gt; processes will use that date range, except for the generation of the &lt;code&gt;AUDIT&lt;/code&gt; file, since this file is generated at run time and must be moved to the &lt;em&gt;entities&lt;/em&gt; folder if everything has proceeded successfully, with the current date.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It can also be launched manually to process old files that have not been processed in the regular execution, due to lack of communication with &lt;strong&gt;Kernel&lt;/strong&gt; or any other error.&lt;/p&gt;
&lt;p&gt;Furthermore, &lt;em&gt;&lt;strong&gt;aura-kpis-uploader-cli&lt;/strong&gt;&lt;/em&gt; generates for dimensions of &lt;code&gt;entity&lt;/code&gt; type files: Channels, Skills, Presets, Applications, Components and Recognizers. You can see more information in &lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/kpis-dimensions&#34;&gt;KPIs dimensions&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/kpi-entities/aura-databricks-jobs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/kpi-entities/aura-databricks-jobs/</guid>
      <description>
        
        
        &lt;h1 id=&#34;aura-databricks-jobs&#34;&gt;Aura Databricks Jobs&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;aura-databricks-jobs&lt;/strong&gt;&lt;/em&gt; is a component based on Databricks. Discover in the current section its technical description and main components.&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;aura-databricks-jobs&lt;/strong&gt;&lt;/em&gt; is a component based on &lt;a href=&#34;https://www.databricks.com/&#34;&gt;Databricks&lt;/a&gt; for the optimization of data processing and the training of ML-based models.&lt;/p&gt;
&lt;p&gt;Currently, its primary function is to import Avro-formatted files into &lt;strong&gt;Kernel&lt;/strong&gt; datasets. For this purpose, we will see later that it is necessary to configure a run job in the Databricks environment. Find the method of the job in &lt;a href=&#34;https://github.com/Telefonica/aura-databricks-jobs/tree/master/packages/aura-databricks-jobs/aura_databricks_jobs/jobs/avro_to_dataset_job.py&#34;&gt;avro_to_dataset_job.py&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;aura-to-dataset-job-cli&lt;/strong&gt;&lt;/em&gt; is an executable script that imports Avro KPIs into the storage location indicated in the &lt;strong&gt;Kernel&lt;/strong&gt; dataset destination config. It is configured in a Databricks cluster that is executed every day (although it is configurable in the job schedule). It is developed with &lt;a href=&#34;hhttps://es.python.org/&#34;&gt;Python&lt;/a&gt; and uses the &lt;a href=&#34;https://developers.baikalplatform.com/tech-doc/release/latest/data-ai/kernel-spark-sdk/&#34;&gt;Kernel Spark SDK&lt;/a&gt; to read the Avro files and write in &lt;strong&gt;Kernel&lt;/strong&gt; datasets.&lt;/p&gt;
&lt;p&gt;Detailed information regarding &lt;em&gt;&lt;strong&gt;aura-databricks-jobs&lt;/strong&gt;&lt;/em&gt; is found in the following documents:&lt;br&gt;
. &lt;a href=&#34;#aura-databricks-jobs-architecture&#34;&gt;Architecture&lt;/a&gt; and &lt;a href=&#34;#avro-to-dataset-job-components&#34;&gt;main components&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;#aura-databricks-job-operation&#34;&gt;How does &lt;em&gt;&lt;strong&gt;aura-databricks-jobs&lt;/strong&gt;&lt;/em&gt; work?&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-databricks-jobs/aura-databricks-jobs-configuration/&#34;&gt;&lt;em&gt;&lt;strong&gt;aura-databricks-jobs&lt;/strong&gt;&lt;/em&gt; configuration&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-databricks-jobs/aura-databricks-jobs-use/&#34;&gt;How to use &lt;em&gt;&lt;strong&gt;aura-databricks-jobs&lt;/strong&gt;&lt;/em&gt;?&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-databricks-jobs/environment-variables/&#34;&gt;Environment variables&lt;/a&gt;&lt;br&gt;
. &lt;a href=&#34;../../../docs/components/kpi-entities/aura-databricks-jobs/troubleshooting/&#34;&gt;Troubleshooting&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;aura-databricks-jobs-architecture&#34;&gt;Aura Databricks Jobs architecture&lt;/h2&gt;
&lt;p&gt;In the following diagram, the architecture of &lt;em&gt;&lt;strong&gt;aura-to-dataset-job-cli&lt;/strong&gt;&lt;/em&gt; is represented, including its main components, which are described in the following sections.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/aura-databricks-jobs/aura-to-dataset-job-cli.svg&#34; alt=&#34;Components diagram&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;avro-to-dataset-job-components&#34;&gt;Avro to Dataset Job components&lt;/h3&gt;
&lt;h4 id=&#34;configmanager&#34;&gt;ConfigManager&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;ConfigManager&lt;/code&gt; is a handler for configuration that is gathered from input &lt;code&gt;config_dict&lt;/code&gt; to fulfill the variables needed in the import process. It also validates the configuration. In any error case, the process is not executed.&lt;/p&gt;
&lt;h4 id=&#34;auralogging&#34;&gt;AuraLogging&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;AuraLogging&lt;/code&gt; is a wrapper of &lt;code&gt;LoggerWrapper&lt;/code&gt; class imported from &lt;a href=&#34;https://github.com/Telefonica/aura-pytraces&#34;&gt;aura-pytraces library&lt;/a&gt;. It used to register logs adding the required items such as &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;app&lt;/code&gt;, &lt;code&gt;stck&lt;/code&gt; etc.&lt;/p&gt;
&lt;p&gt;The behavior of logs in the file &lt;a href=&#34;https://github.com/Telefonica/aura-databricks-jobs/master/packages/aura-databricks-jobs/aura_databricks_jobs/common/logging/logging.cfg&#34;&gt;logging.cfg&lt;/a&gt; is internally configurable, following the format established by the &lt;code&gt;aura-pytraces&lt;/code&gt; library.
This configuration may be overwritten:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;level&lt;/code&gt; of handler config by environment variable &lt;code&gt;AURA_LOGGING_LEVEL&lt;/code&gt;. By default, &lt;code&gt;INFO&lt;/code&gt; value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;formatter&lt;/code&gt; of handler config by environment variable &lt;code&gt;AURA_LOGGING_FORMAT&lt;/code&gt;. By default, &lt;code&gt;simple&lt;/code&gt; value.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;version&lt;/code&gt; by environment variable &lt;code&gt;AURA_VERSION&lt;/code&gt;. By default, &lt;code&gt;not-reachable&lt;/code&gt; value.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;avro-to-dataset-job&#34;&gt;Avro to Dataset Job&lt;/h4&gt;
&lt;p&gt;It is referred to the process that a cron-job executes in the Databricks.&lt;/p&gt;
&lt;p&gt;It contains the logic to configure coroutines to import Avro files by type of dataset with &lt;a href=&#34;https://docs.python.org/es/3/library/asyncio.html&#34;&gt;asyncio library&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The result of each coroutine is a report. When all the coroutines are finished, the reports are processed, generating a single one with the information of all the import process and including Spark processing info.&lt;/p&gt;
&lt;h4 id=&#34;avro-kpi-importer&#34;&gt;Avro KPI importer&lt;/h4&gt;
&lt;p&gt;It contains the logic to import Avro-formatted files by type of dataset. If there are not Avro-formatted files of this type of dataset, this coroutine finishes.&lt;/p&gt;
&lt;p&gt;The result of each routine is the report of the importation process of the specific type of dataset.&lt;/p&gt;
&lt;h4 id=&#34;azure-storage-manager&#34;&gt;Azure Storage Manager&lt;/h4&gt;
&lt;p&gt;This module is used to download and upload files from and to Azure Storage.&lt;/p&gt;
&lt;h4 id=&#34;spark-sdk-manager&#34;&gt;Spark SDK Manager&lt;/h4&gt;
&lt;p&gt;This module is used to load data as a Dataframe from Azure Storage and write in dataset of &lt;strong&gt;Kernel&lt;/strong&gt; Datalake.&lt;/p&gt;
&lt;h2 id=&#34;aura-databricks-job-operation&#34;&gt;Aura Databricks Job operation&lt;/h2&gt;
&lt;p&gt;The execution flowchart of &lt;em&gt;&lt;strong&gt;avro-to-dataset-job-cli&lt;/strong&gt;&lt;/em&gt; is shown in the following image:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../images/aura-databricks-jobs/avro-to-dataset-execution-flowchart.svg&#34; alt=&#34;Execution flowchart&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;avro-to-dataset-job-cli&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It is responsible for importing the Avro-formatted files in Aura KPIs container (job&amp;rsquo;s variable: &lt;code&gt;AURA_MICROSOFT_AZURE_STORAGE_KPIS_CONTAINER_NAME&lt;/code&gt;) to the correspondent dataset in &lt;strong&gt;Kernel&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The information necessary to import the Avro-formatted files with the same Avro schema to their corresponding dataset is obtained from the configuration file stored in the Azure KPIs container, specifically the file path configured in the job&amp;rsquo;s variable: &lt;code&gt;AURA_KPI_AVRO_ADAPTER_CONFIG_PATH&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In addition, there is a file that will provide us with the average size of the files by type of dataset, specifically the file path configured in the job&amp;rsquo;s variable: &lt;code&gt;AURA_KPI_AVRO_SOURCE_SIZE_REPORT_PATH&lt;/code&gt;. This information will be useful when writing in &lt;strong&gt;Kernel&lt;/strong&gt; datasets with the Spark tool to correctly indicate how the data should be partitioned to improve performance.&lt;/p&gt;
&lt;p&gt;From this file, we will obtain all the schemas that are imported. For this purpose, it is required that &lt;code&gt;targetType&lt;/code&gt; is set with &lt;code&gt;avro&lt;/code&gt; value in each item.&lt;/p&gt;
&lt;p&gt;Below, it is defined the information that the job gathers for each Avro schema:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;name&lt;/code&gt;: dataset_id used to import into &lt;strong&gt;Kernel&lt;/strong&gt;. For example, &lt;code&gt;D_Aura_Channel&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;schema&lt;/code&gt;: type of schema. For example, &lt;code&gt;dimensional&lt;/code&gt; or &lt;code&gt;entity&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;versionSchema&lt;/code&gt;: Version of avroSchema. For example, &lt;code&gt;6.0.0&lt;/code&gt;. The major version will be used in the Spark stage to write in &lt;strong&gt;Kernel&lt;/strong&gt; dataset.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;avroSchema&lt;/code&gt;: name of the schema stored in the container within the folder configured in the &lt;code&gt;AURA_KPI_AVRO_SCHEMAS_PATH&lt;/code&gt; variable. The Avro schema necessary when reading the files in spark is obtained from the path configured in the job variable: &lt;code&gt;AURA_KPI_AVRO_SCHEMAS_PATH&lt;/code&gt; and extra parameters: &lt;code&gt;$AURA_KPI_AVRO_SCHEMAS_PATH/$schema/$versionSchema/$avroSchema&lt;/code&gt;. Example: &lt;code&gt;schemas/dimensional/6.0.0/aura-channel-asvc.json&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sample of Aura Avro adapter file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;D_Aura_Channel&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;schema&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;dimensional&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;avroSchema&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;aura-channel-asvc.json&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;versionSchema&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;6.0.0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;source&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;data&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;object&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;CHANNEL&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;avro&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;fields&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;AURA_CHANNEL_ID&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;sourceName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;AURA_CHANNEL_NAME&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;sourceName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;AURA_CHANNEL_SHORT_NAME&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;sourceName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;prefix&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;D_Aura_Recognizer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;schema&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;dimensional&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;avroSchema&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;aura-recognizer-asvc.json&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;versionSchema&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;6.0.0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;source&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;data&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;object&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;RECOGNIZER&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;avro&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;fields&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;AURA_RECOGNIZER_ID&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;sourceName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;AURA_RECOGNIZER_NAME&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;sourceName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;EXTRACTION_TM&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;sourceName&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;EXTRACTION_TM&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;targetType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;preCalculated&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;DATE_ISO_8691&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The job will run the import process for each schema type, running in coroutines and using the &lt;strong&gt;asyncio&lt;/strong&gt; library.&lt;/p&gt;
&lt;p&gt;The following process is carried out for each type of schema:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Check if there are schemas configured not to be loaded. The job variable where this configuration is configured is: &lt;code&gt;AURA_KPI_AVRO_SCHEMAS_NOT_TO_UPLOAD&lt;/code&gt;.
The format is a list formatted as &lt;code&gt;schema_1:dataset_id_1,schema_1:dataset_id_2,schema_2;dataset_id_3&lt;/code&gt;. Example: &lt;code&gt;dimensional:D_Aura_Channel,entity:E_Aura_GROOT&lt;/code&gt;.
The number of files that have been skipped for that type are recorded in a report.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check if there are files of that type to import in its corresponding folder. The path where the Avro-formatted files are stored is: &lt;code&gt;AURA_KPI_AVRO_SOURCE_PATH&lt;/code&gt;.
Within this path, the files are stored by their corresponding &lt;code&gt;$schema/$dataset/$version&lt;/code&gt;. Example &lt;code&gt;dimensional/6.0.0/D_Aura_Channel&lt;/code&gt;.
If there are no files, the coroutine ends up generating a report without uploaded files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If there are files, the reading will be carried out with Spark, indicating the Azure Blob where the files with the same Avro schema are located. Additionally, they will be written to its corresponding dataset of &lt;strong&gt;Kernel&lt;/strong&gt; Datalake.
This step is configured with locking using &lt;strong&gt;asyncio&lt;/strong&gt; to prevent &lt;code&gt;asyncio.Lock()&lt;/code&gt; from protecting read and write operations on a DataFrame.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once the files are imported, the local copy is moved to a folder inside the container (job&amp;rsquo;s variables: &lt;code&gt;AURA_MICROSOFT_AZURE_STORAGE_KPIS_CONTAINER_NAME/AURA_KPI_AVRO_PROCESSED_FOLDER_PATH&lt;/code&gt;) and kept there during a fixed time, for recovering purposes.&lt;br&gt;
All the details of the process are recorded in a report that is stored in the job variable: &lt;code&gt;AURA_KPI_AVRO_REPORTS_DESTINATION_PATH/aura-avro-kpis-report-{iso-date}.json&lt;/code&gt;.&lt;br&gt;
Depending on the configured report mode, &lt;code&gt;AURA_KPI_AVRO_REPORTS_MODE&lt;/code&gt; will be generated only when errors occur, always or never.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Independently of when it runs, &lt;em&gt;&lt;strong&gt;avro-to-dataset-job-cli&lt;/strong&gt;&lt;/em&gt; always performs the same process: it gets all the Avro-formatted files in KPIs container (job variable: &lt;code&gt;AURA_MICROSOFT_AZURE_STORAGE_KPIS_CONTAINER_NAME&lt;/code&gt;) from the last upload executed by the &lt;a href=&#34;../../../docs/components/kpi-entities/aura-kpis-uploader/&#34;&gt;&lt;em&gt;&lt;strong&gt;aura-kpis-uploader&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; component.&lt;/p&gt;
&lt;p&gt;When running independently on the Databricks cluster, Prometheus alerts cannot be configured. Therefore, the process information will be obtained from the report generated along with the following generated files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If the process has ended with errors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A file with the name set in the variable &lt;code&gt;AURA_KPI_AVRO_PROCESS_ERROR_FILENAME&lt;/code&gt; will be generated containing the execution date.&lt;/li&gt;
&lt;li&gt;Additionally, if the report has been generated in Azure Storage, the link to it will be included, valid for the time configured in the variable &lt;code&gt;AURA_KPI_AVRO_REPORTS_SAS_EXPIRATION&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If the report cannot be recorded, the error will appear in the file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the process terminates abruptly due to a timeout and the databricks manager kills the process:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A report will be generated, showing each dataset in its corresponding stage.&lt;/li&gt;
&lt;li&gt;The stages of each dataset can be completed, as when it is run again, it will obtain the last report generated. From this one, it will identify the stage to continue.&lt;/li&gt;
&lt;li&gt;If the process remained in the stage &lt;code&gt;WRITING_DATASET_OK&lt;/code&gt;, the files from the last execution will be moved to the processed folder and deleted from the &lt;code&gt;avro&lt;/code&gt; folder.&lt;/li&gt;
&lt;li&gt;If the process remained in the stage &lt;code&gt;READING_BLOBS&lt;/code&gt; or &lt;code&gt;WRITING_DATASET&lt;/code&gt;, the files will be loaded together with the rest of the files that have been generated without making distinctions.&lt;/li&gt;
&lt;li&gt;If the process remained in the stage &lt;code&gt;MOVING_BLOBS_TO_PROCESSED&lt;/code&gt;, the files will be moved to the processed folder. If this second attempt fails again, the stage will be set to the value &lt;code&gt;NOT_PROCESSED_PREVIOUS_ERRORS&lt;/code&gt; to indicate that it is not recoverable and that a manual review must be carried out in case there is a corrupt Avro file.&lt;/li&gt;
&lt;li&gt;If the process remained in the stage &lt;code&gt;REMOVING_BLOBS&lt;/code&gt;, the files will be deleting from the &lt;code&gt;avro&lt;/code&gt; folder. If this second deletion attempt fails again, the stage will be set to the value &lt;code&gt;NOT_PROCESSED_PREVIOUS_ERRORS&lt;/code&gt; to indicate that it is not recoverable and that a manual review must be carried out in case there is a corrupt Avro file.&lt;/li&gt;
&lt;li&gt;If the process remained in the stage &lt;code&gt;WRITING_DATASET_ERROR_NOT_RECOVERABLE&lt;/code&gt;, the files of the last execution and the possible ones that have been added since the last run will not be loaded, since there are unrecoverable errors that must be verified manually to be resolved. This involves writing datasets with malformed records or discarded records. So, for the dataset, the stage is recorded as &lt;code&gt;NOT_PROCESSED_PREVIOUS_ERRORS&lt;/code&gt; to avoid loading this dataset.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/kpi-entities/kpis-entity-handler/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/kpi-entities/kpis-entity-handler/</guid>
      <description>
        
        
        &lt;h1 id=&#34;kpi-entity-handler&#34;&gt;KPI entity handler&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of the KPI entity handler, a module in charge of calling aura-kpi-handler utility.&lt;/p&gt;
&lt;p&gt;It is used by &lt;a href=&#34;../../../docs/components/aura-authentication-api/&#34;&gt;&lt;em&gt;&lt;strong&gt;aura-authentication-api&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, &lt;a href=&#34;../../../docs/components/aura-bot-platform/&#34;&gt;&lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; and &lt;a href=&#34;../../../docs/components/aura-groot/&#34;&gt;&lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;One of the elements ready to be used across &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; is the &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts&#34;&gt;&lt;em&gt;&lt;strong&gt;kpi-handler&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, that is the &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; module in charge of calling &lt;em&gt;&lt;strong&gt;aura-kpi-handler&lt;/strong&gt;&lt;/em&gt; utility.&lt;/p&gt;
&lt;p&gt;This &lt;em&gt;&lt;strong&gt;kpi-handler&lt;/strong&gt;&lt;/em&gt; is a singleton module that, during its initialization, starts a &lt;code&gt;KpiHandler&lt;/code&gt; used to write the rows in the corresponding blob.&lt;/p&gt;
&lt;h2 id=&#34;methods&#34;&gt;Methods&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;&lt;strong&gt;kpi-handler&lt;/strong&gt;&lt;/em&gt; provides a method to write each entity row that is used at the different stages of the activity processing:
&lt;em&gt;&lt;strong&gt;aura-bridge-outbound&lt;/strong&gt;&lt;/em&gt; .&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;incomingMessage&lt;/code&gt;: generates a &lt;code&gt;MessageEntity&lt;/code&gt; with the information available when the message enters &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt;, if the user is properly authenticated.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;extendedIncomingMessage&lt;/code&gt;: generates a &lt;code&gt;ExtendedMessageEntity&lt;/code&gt; with the information available when the message enters &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt;, if the user is properly authenticated.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;unauthenticatedIncomingMessage&lt;/code&gt;: generates a &lt;code&gt;ExtendedMessageEntity&lt;/code&gt; with the information available when the message enters &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt;, if there is any error during the user&amp;rsquo;s authentication.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;outgoingMessage&lt;/code&gt;: it is called once per activity returned by &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; as response of an incoming activity. It fills all the data generated during the activity processing.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;extendedOutgoingMessage&lt;/code&gt;: it is called once per activity returned by &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; as response of an incoming activity. It fills all the data generated during the activity processing.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;unauthenticatedOutgoingMessage&lt;/code&gt;: generates a &lt;code&gt;MessageEntity&lt;/code&gt; with the information available when *&lt;strong&gt;aura-bot&lt;/strong&gt; sends the response, if there is any error during the user’s authentication.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;recognize&lt;/code&gt;: generates a &lt;code&gt;RecognizerEntity&lt;/code&gt; row with the information of the execution of every recognizer called during the activity processing, this kpi is written by both the &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; and the &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;incomingGrootMessage&lt;/code&gt;: generates a &lt;code&gt;GrootMessageEntity&lt;/code&gt; with the information available when the message enters &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;outgoingGrootMessage&lt;/code&gt;: it is called once per activity returned by &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt; as response of an incoming activity. It fills all the data generated during the activity processing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All the above-mentioned methods work following the same process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The information is gathered from their incoming parameters, from the &lt;code&gt;TurnContext&lt;/code&gt; and from &lt;code&gt;ConversationState&lt;/code&gt; and &lt;code&gt;UserStage&lt;/code&gt; .&lt;/li&gt;
&lt;li&gt;Data is converted into the values and formats needed by &lt;em&gt;&lt;strong&gt;aura-kpi-handler&lt;/strong&gt;&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;The corresponding event handled by &lt;em&gt;&lt;strong&gt;aura-kpi-handler&lt;/strong&gt;&lt;/em&gt; is emitted, that is in charge of writing the row in the corresponding blob.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;strong&gt;aura-kpi-handler&lt;/strong&gt;&lt;/em&gt; receives the event, processes the data in the corresponding entity and pushes it to the entity buffer stream. This stream is appended to the corresponding BlobFile every 10 seconds (configurable).&lt;/li&gt;
&lt;li&gt;If the POD is stopped, all the content in the buffer stream is appended automatically to the log.&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/kpi-entities/kpis-status-codes/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/kpi-entities/kpis-status-codes/</guid>
      <description>
        
        
        &lt;h1 id=&#34;status-codes-stored-in-kpis-entities&#34;&gt;Status codes stored in KPIs entities&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of the &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; status codes which are stored in the Aura entities&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;kpi-response-codes&#34;&gt;KPI response codes&lt;/h2&gt;
&lt;p&gt;List of response codes stored in KPIs by &lt;em&gt;&lt;strong&gt;aura-bot&lt;/strong&gt;&lt;/em&gt; classified by KPI type:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;StatusCodes&lt;/th&gt;
&lt;th&gt;Reason&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MESSAGE / GROOT MESSAGE&lt;/td&gt;
&lt;td&gt;[ 200, &lt;a href=&#34;https://datatracker.ietf.org/doc/html/rfc7231#section-6.1&#34;&gt;any&lt;/a&gt; (only in events) ]&lt;/td&gt;
&lt;td&gt;[ 200 ] : &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L88&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L88&lt;/a&gt; &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L120&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L120&lt;/a&gt; &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L167&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L167&lt;/a&gt; &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L200&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L200&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;[any] : &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L625&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L625&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EXTENDED_MESSAGE&lt;/td&gt;
&lt;td&gt;[ 200, &lt;a href=&#34;https://datatracker.ietf.org/doc/html/rfc7231#section-6.1&#34;&gt;any&lt;/a&gt; (only in events) ]&lt;/td&gt;
&lt;td&gt;[ 200 ] : &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L471&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L471&lt;/a&gt; &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L120&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L120&lt;/a&gt; &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L563&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L563&lt;/a&gt; &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L200&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L200&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;[any] : &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L625&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L625&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RECOGNIZER&lt;/td&gt;
&lt;td&gt;[ 200, 400, 404, 424, 500, 502, 504 ]&lt;/td&gt;
&lt;td&gt;[ 200, 400, 404, 500, 502, 504 ] : &lt;a href=&#34;https://github.com/Telefonica/aura-clients/blob/master/packages/aura-nlp-client/swagger/aura-nlp-client.json&#34;&gt;https://github.com/Telefonica/aura-clients/blob/master/packages/aura-nlp-client/swagger/aura-nlp-client.json&lt;/a&gt; &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L411&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/utils/kpi-handler.ts#L411&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;[ 200, 424 ]: &lt;a href=&#34;https://github.com/Telefonica/aura-bot-platform/blob/master/src/middlewares/recognizers/base-recognizer.ts#L55&#34;&gt;https://github.com/Telefonica/aura-bot-platform/blob/master/src/middlewares/recognizers/base-recognizer.ts#L55&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

      </description>
    </item>
    
  </channel>
</rss>
