[ 
https://issues.apache.org/jira/browse/PHOENIX-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gabriel Reid updated PHOENIX-1127:
----------------------------------
    Attachment: PHOENIX-1127.patch

Here's a two-part patch to resolve this.

Part one of the patch simply allows supplying connection properties when 
running an import via psql.py. This allows supplying an ad-hoc value for 
phoenix.query.dateFormat when running an import using the -p flag, i.e.
{code}-p phoenix.query.dateFormat=dd-MM-yyyy{code}

This kind of functionality is already possible via the MapReduce importer using 
a -D flag in the same way.

Part two of the patch adds the ability to supply upsert expressions on a 
per-column basis when running either of the importers. For example, if one of 
the columns you were importing was called "UNAME", and your import contains 
data in lower-case and you want to upper-case the values, you could supply the 
following parameter to either of the importers:
{code}--upsert-spec UNAME=UPPER(?){code}

This would cause the {{UPPER}} function to be executed on the input value 
within the upsert statement used within the importer.

This will also allow supplying custom date formats and time zones on a 
per-column basis due to the changes in PHOENIX-1485.

The code is tested via unit/integration tests as much as possible, although I 
haven't had a chance to test it on a real cluster yet (particularly important 
for the MR import code). For now, probably the most important thing is to 
decide if this general approach (being able to supply column upsert 
expressions) is the route we want to go, or if we want to do something else.

> Cannot load Timestamp(6) in CSV bulk loader
> -------------------------------------------
>
>                 Key: PHOENIX-1127
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1127
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.0.0
>         Environment: PROD
>            Reporter: Deepak Gattala
>             Fix For: 5.0.0
>
>         Attachments: PHOENIX-1127.patch
>
>   Original Estimate: 360h
>  Remaining Estimate: 360h
>
> cannot do any date manipulation because of this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to