-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] parallel create table statements #65
Comments
I am currently using
|
I have added support for parallel hint, table compression and fix for using alias (identifier too long for Oracle 11) You can use {{config(materialized='table', parallel=4, table_compression_clause='COLUMN STORE COMPRESS FOR QUERY')}}
select c.cust_id, c.cust_first_name, c.cust_last_name, t.country_iso_code, t.country_name, t.country_region
from {{ ref('sales_internet_channel') }} s, {{ source('sh_database', 'countries') }} t, {{ source('sh_database', 'customers') }} c
WHERE s.cust_id = c.cust_id
AND c.country_id = t.country_id or simpler COMPRESS clause {{config(materialized='table', parallel=4, table_compression_clause='COMPRESS')}} Could you test it with the first release cut uploaded to PyPI ?
Let me know your feedback. |
This fails with:
The invalid SQL code above is created by the current RC1 |
It looks like the other bug for the length is fixed though! |
But the reason is the compression. |
I can see many: 14:53:57 oracle adapter: Affected row count 0 logs - but not only in the log file even in the normal DBT stdout output. Can this be disabled/ configured or ideally only stored in the outputted JSON? |
Interestingly, oracle adapter: Affected row count 0 is logged usually only with 0 or 1 instead of the actual materialized row count number |
You can pass any compression clause in dbt config. That is dbt user controlled. Not hard-coded {{config(materialized='table', parallel=4, table_compression_clause='COMPRESS')}} |
Exactly. This is what I did. I just wanted to let you know that the default one you suggested in the docs was incompatible with Oracle 11. What about the row count logs?
Is this related to #60? |
It is related to #60 We use the row count value as returned. I think it could be due to CTAS statement. The python-oracledb driver team can confirm how this value is set. Anyway, if it is too noisy, I can remove it in 1.3.2. Just waiting for @Mirko-T to confirm on #60 |
I still had the old cx.oracle installed not yet the new python-oracledb could this be the rootcause for the bug that I only get Affected row counts logged as either 0 or 1 @aosingh ? |
@aosingh I have upgraded to the new version (python-oracledb) but the rowcounts are still o or 1 and not the actual numbers. |
python-oracledb is installed with dbt-oracle. You did not have to install that explicitly The default driver is still cx_oracle. Please read how you can switch driver modes here In short, set the environment variable to use the new python driver ORA_PYTHON_DRIVER_TYPE=thin I simply use cursor.rowcount to set the value.
|
Interesting - but why can it be that this counter is 0/1 and not the actual value? |
Removed noisy log line as reported in #65
@geoHeil - Please test with the released dbt-oracle==1.3.2 |
seems to be quite well |
Describe the Feature
How can I specify parallel hints for the CREATE TABLE (default materializations) which dbt-oracle is creating? If these are not yet part of dbt-oracle - do I need to run a full-blown custom materialization or is there an easier path forward?
How about specifying options on CREATE TABLE such as compression? I.e. : compress for query high?
Describe alternatives you've considered
No response
Who will this benefit?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: