Ciaren

SQL output

SQL output โ€” sqlOutput

Write the result to a database table via a reusable Connection.

SQL Input
raw orders
input
Drop Nulls
clean
Calculated Column
total = price ร— qty
transform
SQL Output
cleaned_orders โ€” append
output

Use cases

  • Land a cleaned dataset into an analytics table on a schedule.
  • Append daily results to a growing table, or replace a table each run.

Configuration

Config keyTypeRequiredDescription
connection_idstringYesThe connection to write to
tablestringYesTarget table
schemastringNoSchema to write into
if_existsstringNoreplace (default), append, or fail

Generated Python code

df_5.to_sql("cleaned_orders", _engine_1, if_exists="replace", index=False)

Security

Exported code never embeds the password โ€” it resolves the connection's secret reference at runtime (os.environ[...] for env:/bare names, keyring.get_password(...) for keyring:NAME, or a file:/path read for a mounted secret file). See Connections.

Tips & common mistakes

  • replace drops and recreates the table (and its schema/indexes). Use append to keep an existing table and add rows; fail to abort if it exists.
  • Match the table's columns. With append, the frame's columns should line up with the target table.

See also