NewGraphEnvironment / rfp

Reproducible Field Projects British Columbia
Other
0 stars 0 forks source link

`rfp_meta_bcd_xref_col_comments` - `bcdata::bcdc_describe_feature` partial matching of `schema_table` (object_name) #4

Open NewGraphEnvironment opened 5 months ago

NewGraphEnvironment commented 5 months ago

This seems like the type of thing that may crop up.

To test extent of potential problem we should see how many matches for fist 5 characters of table there are for tables in the same schema. should be quick with review of n_distinct 5 characters of my_check <- rfp_meta_bcd_xref()

bcdata::bcdc_describe_feature("WHSE_IMAGERY_AND_BASE_MAPS.GSR_AIRPORTS_SVW")   
#> # A tibble: 42 × 5
#>    col_name                sticky remote_col_type local_col_type column_comments
#>    <chr>                   <lgl>  <chr>           <chr>          <chr>          
#>  1 id                      TRUE   xsd:string      character      <NA>           
#>  2 CUSTODIAN_ORG_DESCRIPT… TRUE   xsd:string      character      CUSTODIAN_ORG_…
#>  3 BUSINESS_CATEGORY_CLASS TRUE   xsd:string      character      BUSINESS_CATEG…
#>  4 BUSINESS_CATEGORY_DESC… TRUE   xsd:string      character      BUSINESS_CATEG…
#>  5 OCCUPANT_TYPE_DESCRIPT… TRUE   xsd:string      character      OCCUPANT_TYPE_…
#>  6 SOURCE_DATA_ID          TRUE   xsd:string      character      SOURCE_DATA_ID…
#>  7 SUPPLIED_SOURCE_ID_IND  TRUE   xsd:string      character      SUPPLIED_SOURC…
#>  8 AIRPORT_NAME            TRUE   xsd:string      character      AIRPORT_NAME i…
#>  9 DESCRIPTION             FALSE  xsd:string      character      DESCRIPTION de…
#> 10 PHYSICAL_ADDRESS        FALSE  xsd:string      character      PHYSICAL_ADDRE…
#> # ℹ 32 more rows
bcdata::bcdc_describe_feature("WHSE_IMAGERY_AND_BASE_MAPS.GSR_A")
#> # A tibble: 42 × 5
#>    col_name                sticky remote_col_type local_col_type column_comments
#>    <chr>                   <lgl>  <chr>           <chr>          <chr>          
#>  1 id                      TRUE   xsd:string      character      <NA>           
#>  2 CUSTODIAN_ORG_DESCRIPT… TRUE   xsd:string      character      CUSTODIAN_ORG_…
#>  3 BUSINESS_CATEGORY_CLASS TRUE   xsd:string      character      BUSINESS_CATEG…
#>  4 BUSINESS_CATEGORY_DESC… TRUE   xsd:string      character      BUSINESS_CATEG…
#>  5 OCCUPANT_TYPE_DESCRIPT… TRUE   xsd:string      character      OCCUPANT_TYPE_…
#>  6 SOURCE_DATA_ID          TRUE   xsd:string      character      SOURCE_DATA_ID…
#>  7 SUPPLIED_SOURCE_ID_IND  TRUE   xsd:string      character      SUPPLIED_SOURC…
#>  8 AIRPORT_NAME            TRUE   xsd:string      character      AIRPORT_NAME i…
#>  9 DESCRIPTION             FALSE  xsd:string      character      DESCRIPTION de…
#> 10 PHYSICAL_ADDRESS        FALSE  xsd:string      character      PHYSICAL_ADDRE…
#> # ℹ 32 more rows
bcdata::bcdc_describe_feature("WHSE_IMAGERY_AND_BASE_MAPS.GSR_")
#> Error in if (grepl("^(http|www)", x)) x <- basename(x): the condition has length > 1

Also of note is that bcdata::bcdc_describe_feature("test") just hangs indefinitely - "test" is reserved term or something?