Skip to content

[Feat]: Add Filters to Bulk Insert function #1641

Open
@BobLouderback

Description

@BobLouderback

I have a JSON output from a 3rd party API and need to bulk update some rows in my MySQL table. The JSON contains a survey_id and a survey status. The JSON does not provide the primary key, but does provide the survey_id field that can be used ALONG WITH another static field (static for each pull I make with the API) called "survey_type" to identify the unique row in the MySQL table that needs to be updated.

I would like the bulk insert function to have a filter ability, where I can update rows in the MySQL table ONLY if the filter is true. For example, I would pass the JSON to the bulk update function, and then set a filter for the table where table1.survey_type = {{tmp_survey_type}}, or perhaps {{table1.selectedrow.survey_type}}, or even hard coded to "1".

I have tried writing a standard SQL query that takes the JSON and updates the rows, but my version of MySQL does not handle JSON very well (v5.7).

Discussed in discord here: https://discord.com/channels/1096896040159957084/1121839720759046286/threads/1358917770737221653

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions