Comments (21)
Hi Jake,
First of all, awesome that you're doing active work on this project - it's enormously useful and has even greater potential. Second - I see that you're working on Teradata support which is perfect given that I'm currently working on a Teradata project and would love to setup DbFit for testing. Do you have any idea when the Teradata driver will be ready?
from dbfit.
Hi Even,
Thanks for the encouraging words!
Regarding the Teradata driver, as far as I know, the version I have checked in is fully featured; it's just repackaging of the work that @MMatten and @lifeisstillgood did (in fact it looks like they've since put it on GitHub). My problem is that I still haven't set up a version of Teradata locally to test against, so I can't confirm that it works with the latest FitNesse.
I could really use your help with this; if I provide you with the appropriate jars, could you help me test and provide feedback?
from dbfit.
Hi again,
If you can supply the jars I would be more than happy to do some testing :)
from dbfit.
Hi Even,
Great!
To get up and running:
- grab the latest RC:
https://s3.amazonaws.com/dbfit/dbfit-complete-2.0.0-RC2.zip - grab the teradata jar:
https://s3.amazonaws.com/dbfit/dbfit-teradata-2.0.0-RC2.jar - place the dbfit-teradata jar into the lib folder
- download the teradata jdbc driver, place it into the lib folder
- start fitnesse as normal
The following should connect to your database:
!|dbfit.TeradataTest|
|Connect|host|username|password|database|
And the following could serve as a smoketest:
|Execute|Create table Test_DBFit(name varchar(50), luckyNumber numeric);ET|
|Insert|Test_DBFit|
|name|luckyNumber|
|pera|1|
|nuja|2|
|nnn|3|
|Query|Select * from Test_DBFit|
|name|lucky Number|
|pera|1|
|nuja|2|
|nnn|3|
|Execute|Drop table Test_DBFit;ET|
please let me know whether that seems to work OK.
thanks in advance!
Jake
On 28 February 2013 16:56, Even Vinge [email protected] wrote:
Hi again,
If you can supply the jars I would be more than happy to do some testing :)
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-14243662
.
from dbfit.
Great, I've now set up my environment like you specificed. (I had to specify classpath lib/*.jar to get the fixture to load, but that's no problem.
I'm running into an issue connecting to the database however. From looking at TeradataEnvironment.java it seems like it's using the wrong authorization mechanism - the default is TD and we're using LDAP. According to http://terahelp.blogspot.no/2009/08/connecting-to-database-using-teradata.html this is a simple parameter you can add to the JDBC connection string. I tried specifying the database parameter as "databasename,LOGMECH=LDAP" and then it connected perfectly.
from dbfit.
Running the smoketest with the logmech "hack", I am able to create the table OK, but I get the following error when trying to insert rows:
from dbfit.
I'm running into an issue connecting to the database however. From looking
at TeradataEnvironment.java it seems like it's using the wrong
authorization mechanism - the default is TD and we're using LDAP. According
to
http://terahelp.blogspot.no/2009/08/connecting-to-database-using-teradata.htmlthis is a simple parameter you can add to the JDBC connection string. I
tried specifying the database parameter as "databasename,LOGMECH=LDAP" and
then it connected perfectly.
Right, thanks for the feedback. I'll try to find a way to incorporate this into the code and/or documentation (tracked through #20).
from dbfit.
Running the smoketest with the logmech "hack", I am able to create the
table OK,
that's very encouraging!
but I get the following error when trying to insert rows:
Generally, "cannot retrieve list of columns" means that the user that you
are connecting with doesn't have access to read the metadata tables, my
understanding is that in Teradata this is the "dbc.columns" table. Could
this be what's causing the problem?
from dbfit.
Hm, I can select from dbc.columns so doesn't seem to be that...
from dbfit.
ok, if that's the case, then I'll have to have a closer look and
potentially build a version that produces more debug info. Thanks again for
testing this out!
On 1 March 2013 13:02, Even Vinge [email protected] wrote:
Hm, I can select from dbc.columns so doesn't seem to be that...
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-14288170
.
from dbfit.
My pleasure, let me know if there is anything else I can test out.
from dbfit.
You can try specifying .
instead offrom dbfit.
tags! I meant try
db.table
instead of
table
from dbfit.
@MMatten what is your suspicion? That the table isn't being created in the USER database?
@evenv, what the code is doing under the covers is trying to execute the following query:
SELECT columnname,
CASE
WHEN c.columntype IN ( 'CF' ) THEN 'CHAR'
WHEN c.columntype IN ( 'CV' ) THEN 'VARCHAR'
WHEN c.columntype IN ( 'CO' ) THEN 'CLOB'
WHEN c.columntype IN ( 'I8' ) THEN 'BIGINT'
WHEN c.columntype IN ( 'I' ) THEN 'INTEGER'
WHEN c.columntype IN ( 'I2' ) THEN 'SMALLINT'
WHEN c.columntype IN ( 'I1' ) THEN 'BYTEINT'
WHEN c.columntype IN ( 'D' ) THEN 'DECIMAL'
WHEN c.columntype IN ( 'F' ) THEN 'DOUBLE'
WHEN c.columntype IN ( 'DA' ) THEN 'DATE'
WHEN c.columntype IN ( 'TS' ) THEN 'TIMESTAMP'
WHEN c.columntype IN ( 'TI' ) THEN 'TIME'
WHEN c.columntype IN ( 'BF' ) THEN 'BINARY'
WHEN c.columntype IN ( 'BV' ) THEN 'VARBINARY'
WHEN c.columntype IN ( 'PD' ) THEN 'PERIOD(DATE)'
WHEN c.columntype IN ( 'PT' ) THEN 'PERIOD(TIME)'
WHEN c.columntype IN ( 'PS' ) THEN 'PERIOD(TIMESTAMP)'
WHEN c.columntype IN ( 'PM' ) THEN 'PERIOD(TIMESTAMP WITH TIME ZONE)'
END AS columntype,
columnlength,
'IN' AS paramdirection
FROM dbc.columns c
WHERE c.databasename = user
AND c.tablename = 'Test_DBFit'
ORDER BY c.columnid
To aid debugging, would you be able to run that query by hand after running the test which creates the Test_DBFit table? If the query result is empty, does changing the 'user' to the actual database return results? Thanks!
from dbfit.
I've got no obvious suspects but what is the default database for the user being used? That would determine the DB where the table gets created. It would default to the user. I think the query against the DBC views is returning no rows.
If the default DB for the user is not the user/DB then that would happen.
Mark
from dbfit.
It might make sense to change "WHERE c.databasename = user" to "WHERE c.databasename = database". As "database" is the current default database for the user session.
from dbfit.
Should this change happen for both getAllProcedureParameters()
and getAllColumns()
?
from dbfit.
I believe it should.
Any feedback from Even on whether the default database for the user being different to the user itself is the culprit?
from dbfit.
I believe it should.
Thanks, I'll modify this.
Any feedback from Even on whether the default database for the user being different to the user itself is the culprit?
not yet.
from dbfit.
I think this issue should now be resolved and ready to close.
from dbfit.
Resolved by #307
from dbfit.
Related Issues (20)
- Insertion not working HOT 2
- Upgrade Junit to 5.x/Jupiter
- Broken link/missing version? HOT 3
- How to use regular expressions in dbfit HOT 2
- How can I supply mass input from a table to a stored procedure
- Accessing dbfit parameter as a variable HOT 2
- Running a single test from a table of tests HOT 2
- What is the exclamation mark for in dbfit commands? HOT 2
- Whitespace issue makes test fail, but html report does not highlight this. HOT 2
- Clean fixture is not documented in command reference documentation
- Can't get the startWith and RerunLastFailures features to work
- UnsupportedOperationException: Type PL/SQL RECORD is not supported
- Test results not matching with the Message HOT 11
- dbfit 4.0.0 and maven HOT 1
- Publish dbfit 4.0.0 to maven central HOT 4
- Incorrect sqlserver maven dependencies 4.0.0
- Test execution hangs on an Apple chip M1 based laptop HOT 2
- No table found "mysql.proc" when connecting with MYSQL version 8
- Oracle JRE only? HOT 2
- MySQL v8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbfit.