Comments (9)
I don't know what I am doing wrong. Let me try it on Linux and MAC and then I will let you know. I am just in the first year of college so I not confident about it but if it is working fine for you then you can close this issue.
The octosql.yaml in my case:
dataSources:
- name: cut
type: csv
config:
path: "E:/cust.csv"
- name: people
type: mysql
config:
address: "localhost:3306"
user: "root"
password: "mysql"
databaseName: "test"
tableName: "people"
from octosql.
Hey, great it works for you!
The 0.1.1 sunday release fixes that error ;)
from octosql.
Hey, you have a typo there, you aliased the table cut with c, but later used cut.asin :)
Let me know if it works now!
from octosql.
Oh, I was just experimenting with that. However, it still doesn't work. But if you use table name directly in ON then it does shows something.
from octosql.
Would it be possible for you to post a describe of your MySQL table? I think it has something to do with types not matching. (I'll make sure to add some helper functions to view type information)
from octosql.
Here it is.
from octosql.
Hey, looking at your last image you use c.id (even though above it was c.asin). I failed to reproduce your issue.
With a csv table:
asin,name
1,test
2,test2
3,test3
And mysql table (int, text, text):
1 testt test@test
2 testt2 test2@test
3 testt3 test3@test
4 testt4 test4@test
an octosql.yaml:
dataSources:
- name: people
type: mysql
config:
address: "localhost:3306"
user: root
password: toor
databaseName: app
tableName: people
- name: cut
type: csv
config:
path: "cut.csv"
and invocation:
octosql "SELECT p.email, c.name from cut c JOIN people p ON p.id = c.asin"
I get:
+--------------+---------+
| p.email | c.name |
+--------------+---------+
| 'test@test' | 'test' |
| 'test2@test' | 'test2' |
| 'test3@test' | 'test3' |
+--------------+---------+
So you'd have to provide all the files / a docker image with a database with data already included for me to help.
from octosql.
Closing for now, feel free to reopen.
from octosql.
Actually my CSV file was in "UTF8 with BOM" encoding which is why it wasn't working. Now, I have changes that to ANSI and it works !!!
Also, one thing that I noted that if some cell is empty in MySQL table then it throws an error and stops.
Thanks.
from octosql.
Related Issues (20)
- Option to skip a line with warning instead of error
- Add REPL HOT 1
- Add Statistical Window Functions HOT 1
- Refactor to support Apache Arrow HOT 3
- queries using filenames that start with non-alpha characters fail HOT 4
- CSV parameter to secify separator
- Support HAVING of GROUP BY HOT 1
- Offset clause in csv query is ignored HOT 1
- File line by line HOT 4
- result of StreamJoin or OuterJoin is not equal with database HOT 4
- Four arithmetic operations between aggregation functions are not supported HOT 12
- GroupBy dimension not work, need replace with distinct HOT 3
- unsupported expression CaseExpr HOT 2
- Add charindex(String, String) function HOT 3
- Add substring_index(String, String, Int) function HOT 2
- Panic in parquet query
- Can this project be used as a Go dependency library?
- Decoding Error when Reading Parquet File - "RLE: Decoded Run-Length Block"
- Add Int64 type
- 't' and 'f' strings in csv are considered as boolean
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 octosql.