Hi, I am exploring the Matillion functionality. One thing that is not obvious to me – how do I debug the actual SQL ran by the Matillion components? I know I can see the SQL preview, but I am actually interested in seeing a log of the SQL that was run. Is there a way to inspect the SQL from the task / command log, etc.?
6 Community Answers
Laura Malins —
You can also see the SQL run in the Server log. This is available via the Admin Menu – > Download Server log.
I can see some SQL in the server log, but there a few issues with this approach: (1) It's time-consuming to download the log and the approach is not interactive (2) The SQL is truncated – only the first few characters of each query are included (3) There is a lot of non-SQL noise around the SQL, so it's difficult to find what you are looking for
What I would want to see: A SQL console & log tab with the added ability to run manual queries on Redshift directly from Matillion (a mini-SQL IDE within Matillion). The SQL log should be something simpler to create and a good starting point. The SQL mini-IDE is a bonus.
I understand what you’re saying and I’ll have a chat to the Development team about this.
However you can see the full SQL run in a Transformation Job by viewing the SQL tab in the final component and checking the Expand References check box. In an Orchestration job you can see the SQL run in the relevant components.
The goal of the log is to help debug any issues, hence the additional information in there. The full SQL statement is included when an error occurs.
Thanks Laura. You are right – I can see the SQL in each component's SQL tab. However, when it comes to CREATE TABLE / UPDATE components, the SQL there is not complete – e.g. I don't really see the resulting DELETE / INSERT / UPDATE statements so it's difficult for me to get a full understanding of the SQL that Matillion is running behind the scenes. I can of course debug the SQL log system views in Redshift but that seems like a time-consuming process.
Would be great if you can chat to the dev team about this and get their view.
I’ve spoken to our Development Manager about this and he agrees it’s a good idea. I’ve raised this as a feature request with internal reference EMD-4469. I’ll keep this thread updated with the progress.