[ 
https://issues.apache.org/jira/browse/BEAM-8406?focusedWorklogId=350048&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-350048
 ]

ASF GitHub Bot logged work on BEAM-8406:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Nov/19 21:30
            Start Date: 26/Nov/19 21:30
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on pull request #10217: [BEAM-8406] 
Add support for JSON format text tables
URL: https://github.com/apache/beam/pull/10217#discussion_r350904757
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/meta/provider/text/TextTableProviderTest.java
 ##########
 @@ -248,4 +271,25 @@ public void testWriteCsv() throws Exception {
             .readFilesWithRetries(Sleeper.DEFAULT, BackOff.STOP_BACKOFF),
         containsInAnyOrder("hello,42", "goodbye,13"));
   }
+
+  @Test
+  public void testWriteJson() throws Exception {
+    File destinationFile = new File(tempFolder.getRoot(), "json-outputs");
+    BeamSqlEnv env = BeamSqlEnv.inMemory(new TextTableProvider());
+    env.executeDdl(
+        String.format(
+            "CREATE EXTERNAL TABLE test %s TYPE text LOCATION '%s' 
TBLPROPERTIES '{\"format\":\"json\"}'",
+            SQL_JSON_SCHEMA, destinationFile.getAbsolutePath()));
+
+    BeamSqlRelUtils.toPCollection(
+        pipeline,
+        // env.parseQuery("INSERT INTO test VALUES ('hello', 42), ('goodbye', 
13)"));
 
 Review comment:
   remove
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 350048)
    Time Spent: 50m  (was: 40m)

> TextTable support JSON format
> -----------------------------
>
>                 Key: BEAM-8406
>                 URL: https://issues.apache.org/jira/browse/BEAM-8406
>             Project: Beam
>          Issue Type: New Feature
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Jing Chen
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Have a JSON table implementation similar to [1].
> [1]: 
> https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/text/TextTable.java



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to