kestra icon indicating copy to clipboard operation
kestra copied to clipboard

Some log messages are not visible

Open anna-geller opened this issue 2 years ago • 0 comments

image

the icons also don't load: image

after refreshing the page, everything is there

reproducer:

id: api_python_sql
namespace: dev

labels:
  env: prod
  country: US

tasks:
  - id: extract_in_parallel
    type: io.kestra.core.tasks.flows.Parallel
    tasks:
      - id: products
        type: io.kestra.plugin.fs.http.Request
        uri: https://dummyjson.com/products
        method: GET
      - id: users
        type: io.kestra.plugin.fs.http.Request
        uri: https://dummyjson.com/products
      - id: quotes
        type: io.kestra.plugin.fs.http.Request
        uri: https://dummyjson.com/quotes

  - id: python_transform
    type: io.kestra.plugin.scripts.python.Script
    runner: PROCESS
    beforeCommands:
      - pip install polars
    warningOnStdErr: false
    script: |
      import polars as pl
      data = {{outputs.products.body | jq('.products') | first}}
      df = pl.from_dicts(data)
      df.glimpse()
      df.select(["brand", "price"]).write_csv("{{outputDir}}/products.csv")

  - id: sql_transform
    type: io.kestra.plugin.jdbc.duckdb.Query
    inputFiles:
      in.csv: "{{ outputs.python_transform.outputFiles['products.csv'] }}"
    sql: |
      SELECT brand, round(avg(price), 2) as avg_price
      FROM read_csv_auto('{{workingDir}}/in.csv', header=True)
      GROUP BY brand
      ORDER BY avg_price DESC;
    store: true

  - id: load
    type: io.kestra.plugin.fs.http.Request
    uri: https://reqres.in/api/products
    method: POST
    contentType: application/json
    body: "{{outputs.users.body}}"

triggers:
  - id: daily
    type: io.kestra.core.models.triggers.types.Schedule
    cron: "0 9 * * *"

Environment

  • Kestra Version:
  • Operating System (OS/Docker/Kubernetes):
  • Java Version (if you don't run kestra in Docker):

anna-geller avatar Feb 20 '24 10:02 anna-geller