question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does it support nested data on the `fields` declaration?

See original GitHub issue

As a django-piston user, it is common to have nested data on the fields declaration:

fields = (
    'id', 'username',
    ('group', ('id', 'name'))
)

On django-tastypie, this is similar to use full = True on ForeignKey fields.

Is there a way to work with nested data?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
schmitchcommented, Aug 13, 2014

It would be great if you would support this natively since i think that feature will be used very frequently!

2reactions
toastdrivencommented, May 23, 2014

This should be easier to implement as of Restless 2.0.0, at least in terms of abstraction & less pain. A custom FieldsPreparer subclass could override the prepare method (https://github.com/toastdriven/restless/blob/master/restless/preparers.py#L42-L60) & change behavior based on if the lookup is a dict or a string.

I’m still thinking about if I want to support this natively (maybe a NestedFieldsPreparer). Possibly in Restless 2.1.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use nested and repeated fields | BigQuery - Google Cloud
Best practice: Use nested and repeated fields to denormalize data storage and increase query performance. Denormalization is a common strategy for ...
Read more >
BigQuery Explained: Working with Joins, Nested & Repeated ...
In this post, we will focus on joins and data denormalization with nested and repeated fields. Let's dive right into it!
Read more >
Tutorial: Querying nested data with Amazon Redshift Spectrum
Amazon Redshift Spectrum supports querying nested data in Parquet, ORC, JSON, ... nested loop, which is followed by SELECT choosing the fields to...
Read more >
How to declare nested data object in java? - Stack Overflow
Yes, it uses more code, and it can be more complicated. You have to describe the types. That is the price you pay...
Read more >
Nested data support · Issue #3975 · great-expectations ...
This concept could be applied to nested fields that have multiplicity, notice residences is now an array. If we wanted to check every...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found