Giter Site home page Giter Site logo

Comments (7)

matthewjrogers avatar matthewjrogers commented on June 1, 2024

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.

matthewjrogers avatar matthewjrogers commented on June 1, 2024

@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.

matthewjrogers avatar matthewjrogers commented on June 1, 2024

Actually, going to leave this open for documentation re. user fields

from rairtable.

Tyr30 avatar Tyr30 commented on June 1, 2024

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.

timothoms avatar timothoms commented on June 1, 2024

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.

matthewjrogers avatar matthewjrogers commented on June 1, 2024

@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.

timothoms avatar timothoms commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.