Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Nested Property Mappings #46

Merged
merged 2 commits into from
Feb 10, 2025
Merged

Read Nested Property Mappings #46

merged 2 commits into from
Feb 10, 2025

Conversation

JoonLeeNIH
Copy link

The collectPage() method renames root-level properties in a document to match the field names used by the backend's GraphQL schema. This PR enables it to rename properties nested one level deep as well.
Supports this Jira ticket: https://tracker.nci.nih.gov/browse/C3DC-1263

@JoonLeeNIH JoonLeeNIH requested a review from huuaho January 15, 2025 15:46
@JoonLeeNIH
Copy link
Author

Pushed new commits for restructuring the property mappings between GraphQL and Opensearch. I propose this new structure for property mapping:

[
  {
    'gqlName': 'age_at_diagnosis',
    'osName': 'age_at_diagnosis',
  },
  {
    'gqlName': 'participant',
    'osName': 'participant',
    'nested': [
      {
        'gqlName': 'id',
        'osName': 'id',
      },
      {
        'gqlName': 'race',
        'osName': 'race_str',
      },
    ],
  },
  {
    'gqlName': 'treatments',
    'osName': 'treatments',
    'nested': [
      {
        'gqlName': 'id',
        'osName': 'id',
      },
      {
        'gqlName': 'treatment_agent',
        'osName': 'treatment_agent',
      },
    ],
  },
]

Copy link

@huuaho huuaho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JoonLeeNIH JoonLeeNIH merged commit 18e6a45 into C3DC-4.10.0 Feb 10, 2025
@JoonLeeNIH JoonLeeNIH deleted the C3DC-1263 branch February 10, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants