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

Unexpected behavior when using both resolved and unresolved params #2264

Open
CharlesRngrd opened this issue Feb 4, 2025 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@CharlesRngrd
Copy link

CharlesRngrd commented Feb 4, 2025

dlt version

1.6.0

Describe the problem

Hi,

In the resource bellow, I define 3 kings of params:

  • pagination param
  • resolved param
  • unresolved param
{
    "name": "users",
    "selected": False,
    "endpoint": {
        "path": "/api/v4/users",
        "paginator": {"type": "page_number", "total_path": "totalPages"},
        "params": {
            "sortBy": "hiringDate",
            "desc": True,
            "displayArchivedUsers": False,
            "id_cofaq": {
                "type": "resolve",
                "resource": "companies",
                "field": "id",
            },
        },
        "data_selector": "content",
    },

},

The issue is that the unresolved params are not sent to the request according to the logs:

https://api.eurecia.com/eurecia/api/v4/users with params={'id_cofaq': 'COFAQ--------20191114-164321', 'page': 0}

Could you fix this please ?

Expected behavior

No response

Steps to reproduce

Create a fake resource with both:

  • pagination param
  • resolved param
  • unresolved param

Then run the resource and see in the logs which parameters are there.

Operating system

Windows

Runtime environment

Local

Python version

3.12

dlt data source

No response

dlt destination

No response

Other deployment details

No response

Additional information

No response

@burnash
Copy link
Collaborator

burnash commented Feb 4, 2025

Hey @CharlesRngrd thanks for reporting this. Looking into it.

@burnash burnash self-assigned this Feb 4, 2025
@burnash burnash added the bug Something isn't working label Feb 4, 2025
@rudolfix rudolfix moved this from Todo to In Progress in dlt core library Feb 4, 2025
@burnash
Copy link
Collaborator

burnash commented Feb 4, 2025

@CharlesRngrd thanks again for reporting this issue. Unfortunately have to revert the related PR in 37f3d45 and publish dlt version 1.6.1 without this feature on PyPI. I've added some regression tests in #2268. Once we merge it we'll continue working on the features implemented in #2208

@CharlesRngrd
Copy link
Author

Ok no problem.
I hardcoded the parameter so I can wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants