[
https://issues.apache.org/jira/browse/PHOENIX-6426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17540340#comment-17540340
]
Sameer Pandit commented on PHOENIX-6426:
----------------------------------------
[~shahrs87] I tried reproducing
generated data from sqlline via record as below, using examples WEB state table.
{code:java}
Saving all output to
"/mnt/c/Users/sameer.pandit/work/openSourceCohort/phoenix/bin/data.csv". Enter
"record" with no arguments to stop it.
'DOMAIN','AVERAGE_CPU_USAGE','AVERAGE_DB_USAGE'
'Salesforce.com','260.7272','257.6363'
'Google.com','212.875','213.75'
'Apple.com','114.1111','119.5555'
3 rows selected (0.01 seconds) {code}
schema to insert the above data.
{code:java}
CREATE TABLE IF NOT EXISTS WEB_USAGE (
DOMAIN VARCHAR NOT NULL PRIMARY KEY,
AVERAGE_CPU_USAGE FLOAT,
AVERAGE_DB_USAGE FLOAT);{code}
Error while loading using psql
{code:java}
22/05/21 08:43:05 WARN util.NativeCodeLoader: Unable to load native-hadoop
library for your platform... using builtin-java classes where applicable
no rows upserted
Time: 1.854 sec(s)csv columns from database.
22/05/21 08:43:12 WARN impl.MetricsSystemImpl: Phoenix metrics system already
initialized!
java.lang.IllegalArgumentException: Table DATA not found
at
org.apache.phoenix.util.SchemaUtil.generateColumnInfo(SchemaUtil.java:996)
at
org.apache.phoenix.util.CSVCommonsLoader.buildColumnInfoList(CSVCommonsLoader.java:253)
at
org.apache.phoenix.util.CSVCommonsLoader.upsert(CSVCommonsLoader.java:202)
at
org.apache.phoenix.util.CSVCommonsLoader.upsert(CSVCommonsLoader.java:178)
at org.apache.phoenix.util.PhoenixRuntime.main(PhoenixRuntime.java:322)
{code}
Can you confirm is this the bug or you seeing some different error while
loading?
Is the csvbulkloadtool you mention psql.py or using
https://phoenix.apache.org/bulk_dataload.html?
> CsvBulkLoadTool should be able to parse the output of sqlline generated csv
> ---------------------------------------------------------------------------
>
> Key: PHOENIX-6426
> URL: https://issues.apache.org/jira/browse/PHOENIX-6426
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Gokcen Iskender
> Assignee: Sameer Pandit
> Priority: Minor
>
> Sqlline generates the csv file in a format that csvbulkloadtool cannot parse.
> [~rushabh.shah] recently hit this problem
--
This message was sent by Atlassian Jira
(v8.20.7#820007)