Hi guys, Quick question Is there a way to interpo...
# questions
n
Hi guys, Quick question Is there a way to interpolate a SQLDataset query in
catalog.yml
passing some argument\parameter. Example:
Copy code
yaml
person:
  type: pandas.SQLQueryDataSet
  sql: "SELECT * FROM public.people WHERE id = ${id};"
  credentials: db_credentials
Thanks in advance!
d
you can use TemplatedConfigLoader to do this
but beware of SQL injection risks
d
@Juan Luis do you have the example snippet you used recently (on the Kedro-Polars demo) handy?
n
@datajoely Thanks, it seemed to work.
kedroid 2
👍 2
d
would you mark as answered on StackOverflow? 🙂
n
Sure, just to 2 minutes to allow me to do that. Should have asked here directly.
d
No worries!
n
@datajoely Is there a way to pass the parameter from inside kedro node instead of using globals?
d
@Nikola Shahpazov sort of - if you override a specific
parameters
those can passed to nodes