Joining an Uploaded CSV with data from a query that uses postgresql DB data

I'm no expert, but I had to do something similar

  1. make sure the switch in the uploader switch is set to parse files.

  2. I created a sql query called upload to "hold" the uploaded data, and executes with input changes

select * from {{(fileButton1.parsedValue['0'])}}

(this may not be necessary but it worked.)

  1. reference the above query in your query that joins instead of the fileButton.
    (
    select
    xx.value,
    ud.value,
    xx.primary_key,
    ud.primary_key
    from database.data as xx
    left join {{upload.data}} as ud on ud.primary_key = xx.primary_key )

There is likely a better way to do this but that is what worked for me