Comments (7)
Thanks @Tyr30 I will take a look at this and see how airtabler handles user field types and try to re-create locally. Hoping to block some time for bug fixes in the next couple weeks
from rairtable.
@Tyr30 I think this ended up being relatively straightforward. The user fields are returned from the API as a JSON containing a user ID, an email, and a name. I switched to using dplyr::bind_rows
under the hood which natively flattened this structure out into 3 columns FIELDNAME.id
, FIELDNAME.email
, and FIELDNAME.name
.
Worth noting, the presence of a user type field is going to cause insert_records
to choke because the names do not match. update_records
will also fail for this data type, though you should still be able to update fields that are not of the user type. It's probable that there is some amount of tracking, processing, or handling that could be done to support these features for the user type, but my sense is that it would be a significant can of worms. I've settled for now for a warning message.
You can install the dev version with this functionality using remotes::install_github('matthewjrogers/rairtable', ref = 'dev')
. Please let me know if any new issues surface -- I have a vague memory that the choice to use rbindlist
over bind_rows
was deliberate, but I wasn't able to turn up any issues.
In the absence of breaking changes, this version will go to CRAN in the next couple of months.
from rairtable.
Actually, going to leave this open for documentation re. user fields
from rairtable.
Finally managed to try this out and everything downloaded with no errors. Fortunately I don't need to insert or update records with this script yet. Thanks so much @matthewjrogers!
from rairtable.
Thank for you for this very useful package.
I come up against the error message that started this thread, not for a "user" field type, but for a "multiple select" field. This makes intuitive sense because this field type allows different lengths for this field for any given record. I'm not sure what a good a solution would be to deal with this, but would be great if there was a way around it. For instance, there could be an option to exclude such fields with a warning.
from rairtable.
@timothoms I suggest trying to install the dev
branch of this package from GitHub using remotes::install_github('matthewjrogers/rairtable', ref = 'dev')
. I did a quick test reading in a multiple select field with the development version and it seemed to work just fine.
Hopefully that helps -- I intend to push changes to CRAN in the next month or so when I get a chance.
from rairtable.
That works, great. I tried this before, unsuccessfully, because I had not uninstallled the first package version, but it works now. Thanks again.
from rairtable.
Related Issues (10)
- Getting Error when trying to read base HOT 3
- Integrate metadata API
- Refactor suggestion: Migrating package from `{httr}` to `{httr2}` HOT 6
- Structure and format for `airtable` class objects HOT 2
- `update_records()` fails for data type multiple select. HOT 2
- Columns returned in random order HOT 1
- Downloading only fields included in a View HOT 7
- Automatically create new Single or Multi select options. HOT 3
- PAT instead of API key HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rairtable.