You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
id: business_automationsnamespace: tutorialtasks:
- id: get0type: io.kestra.plugin.fs.http.Downloaddisabled: trueuri: https://github.com/lerocha/chinook-database/blob/master/ChinookDatabase/DataSources/Chinook_Sqlite.sqlite
- id: wdirtype: io.kestra.core.tasks.flows.WorkingDirectorytasks:
- id: gettype: io.kestra.plugin.scripts.shell.CommandsoutputFiles:
- "*.sqlite"taskRunner:
type: io.kestra.core.models.tasks.runners.types.ProcessTaskRunnercommands:
- curl -L -o Chinook_Sqlite.sqlite https://github.com/lerocha/chinook-database/raw/master/ChinookDatabase/DataSources/Chinook_Sqlite.sqlite
- id: dbtype: io.kestra.core.tasks.storages.LocalFilesinputs:
Chinook_Sqlite.sqlite: "{{ outputs.get.outputFiles['Chinook_Sqlite.sqlite'] }}"
- id: analyze_media_storetype: io.kestra.plugin.jdbc.sqlite.Querydescription: Find the total number of tracks purchased in each genreurl: jdbc:sqlite:Chinook_Sqlite.sqlitesql: | SELECT Genre.Name, COUNT(InvoiceLine.InvoiceLineId) AS TracksPurchased FROM Genre JOIN Track ON Genre.GenreId = Track.GenreId JOIN InvoiceLine ON Track.TrackId = InvoiceLine.TrackId GROUP BY Genre.Name ORDER BY TracksPurchased DESC;
you'll see an error that the DB or DB table is not found
I tried the same with the database file passed as input:
id: business_automations_v2namespace: tutorialinputs:
- id: mydbtype: FILEtasks:
- id: wdirtype: io.kestra.core.tasks.flows.WorkingDirectorytasks:
- id: dbtype: io.kestra.core.tasks.storages.LocalFilesinputs:
Chinook_Sqlite.sqlite: "{{ inputs.mydb }}"
- id: analyze_media_storetype: io.kestra.plugin.jdbc.sqlite.Querydescription: Find the total number of tracks purchased in each genreurl: jdbc:sqlite:Chinook_Sqlite.sqlitesql: | SELECT Genre.Name, COUNT(InvoiceLine.InvoiceLineId) AS TracksPurchased FROM Genre JOIN Track ON Genre.GenreId = Track.GenreId JOIN InvoiceLine ON Track.TrackId = InvoiceLine.TrackId GROUP BY Genre.Name ORDER BY TracksPurchased DESC;
To see that the actual DB is working, the same works perfectly fine in a Python script:
anna-geller
changed the title
SQLite doesn't work with an existing persistent database files (works only using in-memory DB)
SQLite doesn't work with an existing persistent database file (it works only using an in-memory DB)
Apr 16, 2024
…292)
* #280 SQLite connect to database from kestra storage
* Check if file exists in workingDirectory
* Added example with using existing sqliteFile. Changed path resolver. Changed check for file existence
Expected Behavior
The following flow:
you'll see an error that the DB or DB table is not found
I tried the same with the database file passed as input:
To see that the actual DB is working, the same works perfectly fine in a Python script:
Actual Behaviour
No response
Steps To Reproduce
No response
Environment Information
Example flow
No response
The text was updated successfully, but these errors were encountered: