Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • modified_load_id – the load-id that last modified the document, whether it be addition, correction or deletion of content
  • deleted_load_id – the load-id that the entire document was marked deleted
  • created_load_id – the load-id when the document was added to the data warehouse

 


Each satellite table also contains a modified_load_id column that is specific to the content in that table and will always be <= xml.t_patent_document_values(modified_load_id). The following table should clarify the sequence of update events and the effect on load-id values for three database tables.

dateload-sourceLoad-Idtablecreated_load_idmodified_load_iddeleted_load_id
20161004US10000xml.t_patent_document_values1000010000NULL
 
  



xml.t_ifi_integrated_content
assuming ifi integrated content is not delivered on date of publication 
n/an/an/a
   



xml.t_partiesn/a10000n/a
20161006IFI-CONT10001xml.t_patent_document_values1000010001NULL
  
 



xml.t_ifi_integrated_contentn/a10001n/a
   



xml.t_parties
parties are not updated with IFI content loads 
n/a10000n/a
20161011DOCDB10002xml.t_patent_document_values1000010002NULL
   



xml.t_ifi_integrated_contentn/a10001n/a
   



xml.t_partiesn/a10002n/a

This granularity offers the ability to trace modifications to individual containers (tables) as well as the overall modification status of the document as a whole.

Info
titleQuick Test

How many US documents published on 20161004 have updated CPC classifications?

Code Block
languagesql
select count(*) as docs_with_modified_cpc
from xml.t_patent_document_values as a
  inner join xml.t_classifications_cpc as b
    on (a.publication_id=b.publication_id)
where a.country='US'
  and a.published='2016-10-04'
  and a.deleted_load_id is null -- disregard deleted documents
  and a.withdraw != true        -- disregard withdrawn documents
  /*
    If b.modified_load_id > a.created_load_id,
    the table has been touched and we can therefore
    assume CPC values have been modified
  */
  and b.modified_load_id > a.created_load_id;
 
 docs_with_modified_cpc 
------------------------
                   6145


Out of 6680 documents published on 20161004, 6145 had CPC modifications after publication.

 


Reporting

Knowing which tables and containers have changed is important, but the when and why are also critically important. The information gathered during data warehouse updates is stored in reporting.t_client_load_process. For a detailed description of the contents of this table, see CLAIMS Direct Design Documentation. Of the many questions that can be posed, for our purposes in this blog, we are only concerned with answering the following questions:

...

Code Block
languagesql
select count(*) as updated_docs
from xml.t_patent_document_values
where created_load_id < modified_load_id
    and modified_load_id in (
      select load_id
      from reporting.t_client_load_process
      where date_trunc('day', completed_stamp) = '2016-10-04'::date
    );

 updated_docs 
----------
   362388

...