[ 
https://issues.apache.org/jira/browse/DRILL-8125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488450#comment-17488450
 ] 

Matteo Redaelli commented on DRILL-8125:
----------------------------------------

yes

 
{noformat}
Sql: SELECT *
FROM "aws_dm_prd"."aws_ec2_instance"
FETCH NEXT 1 ROWS ONLY
Column Name: tags
Plugin: steampipe[Error Id: aba3bbae-979c-45f1-8494-0a3ce8513f59 ]
    at 
org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:657)
    at 
org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup(JdbcRecordReader.java:229)
    at 
org.apache.drill.exec.physical.impl.ScanBatch.getNextReaderIfHas(ScanBatch.java:331)
    at 
org.apache.drill.exec.physical.impl.ScanBatch.internalNext(ScanBatch.java:227)
    at org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:298)
    at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119)
    at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:111)
    at 
org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext(AbstractUnaryRecordBatch.java:59)
    at 
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:85)
    at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:170)
    at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119)
    at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:111)
    at 
org.apache.drill.exec.record.AbstractUnaryRecordBatch.innerNext(AbstractUnaryRecordBatch.java:59)
    at 
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:85)
    at 
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:170)
    at 
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:103)
    at 
org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:81)
    at 
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:93)
    at 
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:323)
    at 
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:310)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
    at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1762)
    at 
org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:310)
    at 
org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
2022-02-07 22:52:10,004 [1dfe6b76-306b-84d9-3ecf-f94457d381fa:frag:0:0] WARN  
o.a.d.e.store.jdbc.JdbcRecordReader - Ignoring column that is unsupported.
org.apache.drill.common.exceptions.UserException: UNSUPPORTED_OPERATION ERROR: 
A column you queried has a data type that is not currently supported by the 
JDBC storage plugin. The column's name was tags and its JDBC data type was 
OTHER. Sql: SELECT *
FROM "aws_dm_prd"."aws_ec2_instance"
FETCH NEXT 1 ROWS ONLY
Column Name: tags
Plugin: steampipe
{noformat}
Describe table

 
{noformat}
apache drill> describe steampipe.aws_dm_prd.aws_ec2_instance tags;
+-------------+-----------+-------------+
| COLUMN_NAME | DATA_TYPE | IS_NULLABLE |
+-------------+-----------+-------------+
| tags        | ANY       | YES         |
+-------------+-----------+-------------+
{noformat}
{noformat}
!columns aws_ec2_instance    (in teh sourec database using sqlline )
+-----------+-------------+------------------+--------------------------------------------+-----------+-------------+-------------+----------------+
| TABLE_CAT | TABLE_SCHEM |    TABLE_NAME    |                COLUMN_NAME       
          | DATA_TYPE |  TYPE_NAME  | COLUMN_SIZE | BUFFER_LENGTH  |
+-----------+-------------+------------------+--------------------------------------------+-----------+-------------+-------------+----------------+
2147483647  |                |
|           | aws_dm_dev  | aws_ec2_instance | tags                             
          | 1111      | jsonb       | 2147483647  |                |
|           | aws_dm_dev  | aws_ec2_instance | akas                             
          | 1111      | jsonb       | 2147483647  | {noformat}
 

 

 

 

> jdbc postgresql & null JSONB fields
> -----------------------------------
>
>                 Key: DRILL-8125
>                 URL: https://issues.apache.org/jira/browse/DRILL-8125
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - JDBC
>            Reporter: Matteo Redaelli
>            Priority: Minor
>
> Using streamline, psql, sqlline via jdbc/postgres I can query a postgres table
> {noformat}
> select instance_id, tags from aws_prd.aws_ec2_instance limit 1;
> instance_id  i-0xxx
> tags         {"Name": "talend-engine-01", ...}{noformat}
> {noformat}
>  select instance_id, tags -> 'Name' from aws_dm_prd.aws_ec2_instance limit 1; 
>  
> instance_id  i-0xxx 
> ?column?    "talend-engine-01"
> {noformat}
>  
> With drill command  line (drill-embeeded) I get null value for "tags" fields
> {noformat}
> apache drill> select instance_id, tags from 
> steampipe.aws_dm_prd.aws_ec2_instance limit 1;
> instance_id  i-0xxx
> tags         null{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to