Dbt: Adding query-comment in dbt_project.yml does not add query comments in compiled code - dbt

I've added in dbt_project.yml the following code:
query-comment:
comment: 'run by {{ target.user }} in dbt'
but after running the models in the compiled code in the target folder I do not see the comment which is supposed to be there.
I've tried to test the query-comment and using dbt run or dbt compile but in the target folder I do not see the comment. I am using a local postgres database. Models all run successfully but without comments in the compiled SQL.

Related

py2exe setup script work only if placed under the same path of the target script

I created the setup.py script to create the exe (where the freeze or setup functions are called with a target script 'target.py'), then I invoke the script as 'python setup.py py2exe'.
However I discovered that the executable is created fine as far as this setup.py script is in the same location of the target.py script. If The two script are not in the same location the created executable does not work because not all parts of the code are included.
I am missing something about a rule of setup.py and target.py script ?
I have verified I am passing correctly the target.py location to the setup.py.
Important, the exe creation does not fail or whatever, simply the created exe is not functional since it is missing something.
Moreover I have an old code (py2exe in py2.7) where the setup and target scripts are not in the smae location and it works.
I expected that the relative position of the target.py script with respect to the setup.py script should not influence the outcome (exe). What I acutally get is a different result.
I have an old code where the two scripts are not in under the same path and it works (with an old py2exe and py2.7)
The documentation is not explicitly mentioning something about this.

DBT - compiled/run files not created in target-path

I'm trying to debug a DBT project I've created.
I used to be able to take the compiled\run files from under target folder.
Now for some reason it remains empty after running.
I've tried:
Running dbt clean and running again.
Removing target-path: "target" from dbt_project.yml (Which shouldn't make a difference as I'm using the default folder).
Yet it doesn't seem to work.
The problem is only for one specific DBT project. Other projects create compiled files as expected.

How to make erlang application?

i'm trying to build the example to run an erlang websocket server.
I created all that files and put them into one folder, add the rebar file and ran
./rebar get-deps
inside the folder direction.
But there is no
make
make runconsole
and nothing's happening.
Is there also a possibility to create that websocket server using IntelliJ? I tried to put that 3 .erl files into IntelliJ and want to Build the project but I receive
erlc: 2: Warning: behaviour cowboy_http_handler undefined
The make command reads something called a Makefile, which is a file written in a certain format, which tells the make command what it is supposed to do, e.g. compile some files with the listed names using the listed commands. Because there is no Makefile listed in that tutorial, you should have gotten an error something like this:
No targets specified and no makefile found.
You can contact the author of the tutorial at his github account and ask him where the Makefile is. Actually, the Makefile for the tutorial is here:
https://github.com/marcelog/erws
I created all that files and put them into one folder
The instructions in the Makefile depend on the exact directory structure that the author has here:
https://github.com/marcelog/erws
I tried using rebar3 and changing some stuff in the Makefile, but I still got errors. The problem is that rel directory: I don't know how to create all the stuff in there. You need to use rebar and reltool for that:
https://gist.github.com/FabioBatSilva/f1d1c4ea250302fed8c2
Here is a cowboy websockets example that I came up with last year, see if it helps:
How to Connect Cowboy (Erlang) websocket to webflow.io generated webpage
It uses the Erlang.mk build system as described in the cowboy docs here:
https://ninenines.eu/docs/en/cowboy/2.5/guide/getting_started/

Golang / GO : I want to read data from oracle database in golang but outside TDM-GCC-64 folder in short in my curent working directory

I am new on golang and currently, I am trying to read data from Oracle DB, but when I try to import library goracle.v2 it gives error exec: gcc": executable file not found in %PATH%, so, for now, I have downloaded TDM-GCC-64 complier and currently created one working directory there and it is also working
But I need the same functionality should work when I write a project in some other directory.
Finally got the answer it is actually simple
1) you just have to add "TDM-GCC-64" 's bin folder path into Environment variable in my case it is “C:\TDM-GCC-64\bin"
2) Open a new command prompt and then check gcc version using command gcc --version if it shows version then you have done with it.
Now you just need to import --> go get gopkg.in/goracle.v2 and it will work

Can GCOV create .gcda file in the different directory structure?

I am trying to generate code coverage report using lcov from home directory. Sorce code is compiled with -coverage option to generate coverage information at compilation time(gcno files are created).
Then I have copied the executables and gcno files to home directory.I am trying to check if by ./exe in home directory ,is it possible to generate coverage report.I run the executables in /home and its showing test cases passed but it was discovered that the .gcda files are not created.
I add the following CPP flag:
-fprofile-dir= “/home”
and hence run the executable but still .gcda is not created .
Where I need to specify the path so that it will take .gcno files from home directory and generates the .gcdo files in the current directory??
This can be done using GCOV_PREFIX and GCOV_PREFIX_STRIP
Please, refer to the documentation:
https://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html
Regards
Thomas
Maybe, you're compiling more than one module, have you checked the dependencies between modules? Please do this:
compile all your code,
then remove the useless .gcno files. (Gcno are generated at compilation time)
Execute your tests (gcda should be created matching gcno files)
Generate your report
Second possibility:
Compile your code
Execute the tests
Remove useless gcno + gcda files
Generate your report
Others:
I guess you can use some options to generate report for a dedicated module, but I'm not very familiar with those options.
Regards