The following derived tables are not getting created in Metadb Test because data types need to be fixed. Here is the status of 

a mini-project to fix them. Here is a link to our documentation for Making a Pull Request for FOLIO Analytics


Table NameStatusWho is Fixing/UpdatingNotesPR link
agreements_package_content_item.sqlrestoredStefan?no records for CUL
feesfines_accounts_actions.sqlrestoredNatalyafixed for data types, submitted PRhttps://github.com/folio-org/folio-analytics/pull/846
finance_transaction_purchase_orderrestored, needs updateJoanne/SharonPR submittedhttps://github.com/folio-org/folio-analytics/pull/848
finance_invoice_transactions.sqlrestoredSharon/Ann

holdings_electronic_access.sqlmissingNatalyaNext Step: Sharon to reach out to Stefan and Nassib for help with this one
holdings_extneeds updateAsk Christie to fix

-(Linda) The holdings_supress field needs to be cast as Boolean. It is currently cast as varchar. 

(Joanne) The json extract for ill_policy_id also needs to be cast as UUID.

-(Christie) the holdings_ext table is bringing in the created by userid rather than the updated_by_user_ud for the updated_by field. The location of the data being pulled needs to be updated so that the updated_by_user_id is what is being pulled from the json.


holdings_statistical_codes.sqlrestoredNatalyafixed for data types, submitted PRhttps://github.com/folio-org/folio-analytics/pull/844
instance_ext.sqlrestoredJoanne/Vandana

items_holdings_instances.sqlrestored, needs update for both LDP and Metadb versionsNatalya

(LDP) in the items_holdings_instances table, the column instance_hrid is showing the same value as the holdings_hrid instead of the instance's hrid

(Metadb) instance and holdings HRIDs need to be added; effective call number also missing

-PR submitted for LDP version
loans_renewal_dates.sql - both LDP and Metadblow recordsJoanne

Next Step: Joanne to first work on LDP version and give to Sharon/Vandana for PR

-will rewrite so that inflated counts of renewals are not made

-each step of processing is counted as a renewal, when it should just be one

-should discuss with Reporting SIG


openaccess_checklists.sqlrestored
Next Step: Sharon to ask Stefan to fix this one

low priority - no data in CUL FOLIO Prod

openaccess_publication_request.sqlrestored

Next Step: Sharon to ask Stefan to fix this one


low priority - no data in CUL FOLIO Prod


po_instance.sqlrestored, but needs updateNatalya/Joanne

Next Step - Natalya to update Metadb version and submit PR

-updated to extract holdings and locations ids from JSON rather than pointing to a derived table

https://github.com/folio-org/folio-analytics/issues/851
po_line_fund_distribution_transactions.sqlrestoredSharon/Ann

po_lines_vendor_reference_numbers.sqlrestoredSharon/Ann

po_lines_eresource.sqlrestored, needs updateNatalya-will update with CASE WHEN to show deleted_holdings
po_lines_locations.sqlrestored, needs updateNatalya-will update with CASE WHEN to show deleted_holdings
po_organization.sqlrestoredJoanne/Sharonfixed for data types and extracted more from JSON, submitted PRhttps://github.com/folio-org/folio-analytics/pull/842
requests_items.sqlrestoredJoanne/Vandana

users_groups.sqlrestored, needs updates to LDP and Metadb tablesJoanne/Vandana

-low priority

Next step: Joanne to fix these after other tables get fixed


LDP: the first subquery (creating the user_departments table) uses the users_departments_unpacked derived table, but doesn't specify "folio_reporting" as the schema. The department information from the custom fields (of the user_users table) is not properly extracted.

MetaDB: the code does not specify the folio_derived schema for the user_departments subquery. Also, the MetaDB version is lacking the "user_tags" and "user_custom_fields" fields that are in the LDP version.


loan_renewals_countsreviewedJoanneJoanne reviewed this table and it is fine




  • No labels