javascriptgoogle-cloud-platformdataform

In dataform, how to have my javascript code log information?


I'm trying to write a Dataform workflow able to read some complex data from a GitHub repository and transform it into a SQL table. Since code is quite complex, I want to write some logs (typically using console.log). But as far as in understand, those logs are never visible in Google Cloud Logging. Am I missing something?


Solution

  • According to BenBirt on Dataform GitHub discussions

    Console output is indeed not available.

    However, just to avoid confusion: Dataform JS code is not executed at workflow execution time - it is executed at compile time, i.e. turning the JS into pure SQL (which can then be executed at some later date). So it's not as though you could e.g. have a console.log outputting some text as a result of running some SQL.