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
Teradata Translation - Feature Request #3040
Comments
Hi @happyshows , Thank you for looking into this. The translation should be a new R script in the For more detailed info about how translations work, please also review the SQL Translation article: http://db.rstudio.com/translation I'm curious, at this point, when you attempt to use |
I don't have a way to dig deeper as the tbl command failed in the first place. I believe the S3 dispatch assigned the tbl function to default with uses LIMIT syntax.
|
I also tried to trick a way to pass the first step but no luck
|
Ok, yeah, the resulting SQL is something like I think pointing MSSQL's select function to Teradata may let us run some queries
|
After importing many internal functions in dbplyr, I can run the tbl command now. So what's the suggested next step? Should I folk the dbplyr and create the R file. Any test steps I need to follow? |
Yes, the two main functions to customize are As far as testing goes, I usually just have an RMarkdown with multiple dplyr code chunks to make sure it's working. For more automated testing you can use the https://github.com/rstudio/dbtest package. The package is still wip, and creates a table in the database is testing against, so you will need write access to it. Thank you again for working on this! |
Hello, I ran into this same error trying to work with teradata today and am wondering if you could help. I'm fairly new to this. Thank you! |
@olwagees |
Hi @happyshows , if your version is working fine, would you mind sending a PR our way so we can make it part of the package? I can help with the testing if that's what's holding you up. |
@edgararuiz what I did was changing the function name so that dispatch will fine correctly, but I remember some basic translation has problem, will get back to you on this next week. |
Sounds good, thanks |
The only problem I found was
And everything works fine... @edgararuiz any chance this could be added to dbplyr? |
Also interested in Teradata. Following. |
Hi, thank you for adding Teradata translation. I installed the development version of For instance, if I run the following code:
Here is the query it generated:
I don't think Teradata accept "!=" as "not equal to". |
Hi @weixing777 , I have a fix for this in this branch: |
@edgararuiz Thank you for the quick response! It works! |
Awesome, I just opened the PR for it: tidyverse/dbplyr#61 |
Hi Edgar, thanks for all your work on the Teradata translation. One issue I've come across is that PARTITION BY window functions generated by dbplyr don't include an ORDER BY clause, but Teradata requires one for the query to run. For example, if I run this code:
this is SQL generated:
However, it runs with the following error:
I then tweaked the generated SQL to add an ORDER BY clause and ran it directly in Teradata:
and it ran without error. Could an update be made where an ORDER BY clause is generated within PARTITION BY window functions, at least for tbl_teradata objects? |
@jakefrost can you file a separate issue for better visibility? Also I don't believe ORDER BY is required to pair with Partition by... |
@happyshows Sure thing--I opened a new issue here. I did a bit more research, and you're right about it not being a requirement of Partition by. Maybe it has to do with row_number()? I'm not sure. Thanks for the response! |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Adding Teradata SQL Translation to dbplyr package, will start to work with Edgar on this.
The text was updated successfully, but these errors were encountered: