Gemma-Analytics / ewah

ELT With Airflow Helper - Classes and functions to make apache airflow life easier
MIT License
12 stars 2 forks source link

Plentymarkets Subsequent Loading to POST requests #233

Closed msenyonyi closed 1 year ago

msenyonyi commented 1 year ago

Description & motivation:

We want to be able to do subsequent data loading (using an UPSERT load strategy) for a Plentymarkets POST request.

The date range in a POST request is passed in the request body and not as a parameter (see example of planned config below) - so we need to be able to update the date fields that live in the request body. We will always pull data up till 'current_date' (again, see planned config) - which is why we ignore the 'data_until' field.

Planned config:

            "price_history": {
                "resource": "/rest/audit-log/search",
                "request_method": "post",
                "extract_strategy": EC.ES_SUBSEQUENT,
                "load_strategy": EC.LS_UPSERT,
                "subsequent_field": "version",
                "post_request_payload": {
                    "grouped": False,
                    "versionFrom": "2023-01-01T00:00+02:00",
                    "versionTo": datetime.now().isoformat(),
                    "filterPrefix": {},
                    "entity": [
                        "Plenty-Modules-Pim-DocumentService-Models-Variation-SalesPrice"
                    ],
                    "page": 1,
                    "itemsPerPage": 50,
                },
            },
msenyonyi commented 1 year ago

@soltanianalytics any clue why the Github action failed? [not super urgent]

#16 8.233 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
#16 8.233 celery 5.2.3 requires setuptools<59.7.0,>=59.1.1, but you have setuptools 68.1.0 which is incompatible.
msenyonyi commented 1 year ago

@soltanianalytics any clue why the Github action failed? [not super urgent]

#16 8.233 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
#16 8.233 celery 5.2.3 requires setuptools<59.7.0,>=59.1.1, but you have setuptools 68.1.0 which is incompatible.

seems fine https://github.com/apple/turicreate/issues/3383

soltanianalytics commented 1 year ago

Looks like it worked now? @msenyonyi