This function suggests a value that you could use for the pk
argument
in unnest_pv_data
, based on the endpoint you searched.
It will return a potential unique identifier for a given entity (i.e., a
given endpoint). For example, it will return "patent_id" when
endpoint = "patents"
.
get_ok_pk(endpoint)
endpoint | The endpoint which you would like to know a potential primary key for. |
---|
The name of a primary key (pk
) that you could pass to
unnest_pv_data
.
get_ok_pk(endpoint = "inventors") # Returns "inventor_id"#> [1] "inventor_id"get_ok_pk(endpoint = "cpc_subsections") # Returns "cpc_subsection_id"#> [1] "cpc_subsection_id"