kestra-io / plugin-serdes

https://kestra.io/plugins/plugin-serdes/
Apache License 2.0
2 stars 5 forks source link

IonToExcel throws `java.net.URISyntaxException: Illegal character in path at index 0: {{ outputs.parquet.uri }}` #115

Closed anna-geller closed 3 months ago

anna-geller commented 3 months ago

Expected Behavior

Any flow using IonToExcel throws the same error:

Illegal character in path at index 0: {{ outputs.parquet.uri }}
2024-06-05 08:38:29.091java.net.URISyntaxException: Illegal character in path at index 0: {{ outputs.parquet.uri }}
    at java.base/java.net.URI$Parser.fail(Unknown Source)
    at java.base/java.net.URI$Parser.checkChars(Unknown Source)
    at java.base/java.net.URI$Parser.parseHierarchical(Unknown Source)
    at java.base/java.net.URI$Parser.parse(Unknown Source)
    at java.base/java.net.URI.<init>(Unknown Source)
    at io.kestra.plugin.serdes.excel.IonToExcel.writeQuery(IonToExcel.java:125)
    at io.kestra.plugin.serdes.excel.IonToExcel.run(IonToExcel.java:96)
    at io.kestra.plugin.serdes.excel.IonToExcel.run(IonToExcel.java:37)
    at io.kestra.core.runners.WorkerTaskThread.doRun(WorkerTaskThread.java:77)
    at io.kestra.core.runners.AbstractWorkerThread.run(AbstractWorkerThread.java:56)

❌ This is a blocker as it's used in onboarding guide + blueprints

repro 1:

id: parquet_duckdb_to_excel
namespace: blueprints

tasks:
  - id: parquet_duckdb
    type: io.kestra.plugin.jdbc.duckdb.Query
    sql: |
      INSTALL parquet;
      LOAD parquet;
      INSTALL httpfs;
      LOAD httpfs;
      SELECT * 
      FROM read_parquet('https://huggingface.co/datasets/kestra/datasets/resolve/main/jaffle-large/raw_items.parquet?download=true')
      LIMIT 1000000;
    store: true

  - id: duckdb_to_excel
    type: io.kestra.plugin.serdes.excel.IonToExcel
    from: "{{ outputs.parquet.uri }}"

Repro 2:

id: business_automation
namespace: tutorial
description: Business Automation

tasks:
  - id: query
    type: io.kestra.plugin.jdbc.postgresql.Query
    url: jdbc:postgresql://hh-pgsql-public.ebi.ac.uk:5432/pfmegrnargs
    username: reader
    password: NWDMCE5xdipIjRrp
    store: true
    sql: |
      SELECT
        id,
        timestamp,
        upi,     -- RNAcentral URS identifier
        taxid,   -- NCBI taxid
        ac       -- external accession
      FROM xref
      LIMIT 20;

  - id: to_csv
    type: io.kestra.plugin.serdes.csv.IonToCsv
    from: "{{ outputs.query.uri }}"

  - id: to_excel
    type: io.kestra.plugin.serdes.excel.IonToExcel
    from: "{{ outputs.query.uri }}"

Actual Behaviour

No response

Steps To Reproduce

No response

Environment Information

Example flow

No response