Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5654719557 for ; Thu, 21 Apr 2016 12:42:32 +0000 (UTC) Received: (qmail 19555 invoked by uid 500); 21 Apr 2016 12:42:32 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 19467 invoked by uid 500); 21 Apr 2016 12:42:32 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 19457 invoked by uid 99); 21 Apr 2016 12:42:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2016 12:42:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 5A962C05EF for ; Thu, 21 Apr 2016 12:42:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id D_8S7q6sOBPU for ; Thu, 21 Apr 2016 12:42:29 +0000 (UTC) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 100365F1D5 for ; Thu, 21 Apr 2016 12:42:29 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id e201so85503961wme.0 for ; Thu, 21 Apr 2016 05:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=LKR5HMTs9Az1LOCRiZxTCbKxPwcMKSBe4PbQcKXl2dM=; b=JAoz7aAm640nJdNtlIv08c1mc9GBTHeZ7qQEMu7So6tbzAKeuBNHYEtdF3IU4y/cwk Cpxg7bgKjdPfU/3DBWZUKi3uYCgb9H0duq78i7QyR6eUI5LKs91qOBA8txr33OT8FxtY UTvEP3WISNAwfmkIslYjjAFCfVNh1dkdW1a5hNQX4htNt4Lcfzi7ZAQChIV6yMBXTc9d WhuCqyPQvvGVpcV7BdN6kJiDlqBYBOwYAg7qYay1HgDL354SYBlAiaJaHk9hu9VIWdlK fBxoM3AI5MGDMkJW6N3gCPVOiAYDdUty7LwjL4yJPNFtitPPEB5ET8KVvgMaar9p9ifK Qdpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=LKR5HMTs9Az1LOCRiZxTCbKxPwcMKSBe4PbQcKXl2dM=; b=mKMFfj4C6TGYOPMBMcujS/cqqxtxi19eWnIVP3yI5QYXbaMSsmQv5KAdaAV3y2FPp3 z67Do3rBfG6WwzXBXWZLjDQXEwQbwp/6nPwpcweYvns6qkyfwXuhVsvbMtQJRKp3UMac O13oX8LjsHygnmpkmGkrK10s29ePBI4DKHopcXQOMcGZumMQsOFxaSstMNozr2aQzfSO BRxfFXnFTv5NJe75Jb6fG7JCfBlb7Q6YEMd/rFd3YoXXn0b7FBPlx0aAY4m2CcFHwDyY h8h1li1keX/kA+N1RJ1tLmrHGrpE0WkG2PjfVy99SN2Z04r9hh6STGHs6dML5YYDHJKQ 7xWw== X-Gm-Message-State: AOPr4FVsllBsNQoiFvad9rczZmoYY9akLF+0bD5AR2ENLNawATz6Hzi2/NiAcXFoKElb9zFL2Muqv19lvQVgPg== X-Received: by 10.28.45.216 with SMTP id t207mr7071774wmt.40.1461242547841; Thu, 21 Apr 2016 05:42:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.47.132 with HTTP; Thu, 21 Apr 2016 05:41:58 -0700 (PDT) In-Reply-To: References: From: Fabian Hueske Date: Thu, 21 Apr 2016 14:41:58 +0200 Message-ID: Subject: Re: Explanation on limitations of the Flink Table API To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a11423120feaf020530fe0a2c --001a11423120feaf020530fe0a2c Content-Type: text/plain; charset=UTF-8 Hi Simone, in Flink 1.0.x, the Table API does not support reading external data, i.e., it is not possible to read a CSV file directly from the Table API. Tables can only be created from DataSet or DataStream which means that the data is already converted into "Flink types". However, the Table API is currently under heavy development as part of the the efforts to add SQL support. This work is taking place on the master branch and I am currently working on interfaces to scan external data sets or ingest external data streams. The interface will be quite generic such that it should be possible to define a table source that reads the first lines of a file to infer attribute names and types. You can have a look at the current state of the API design here [1]. Feedback is welcome and can be very easily included in this phase of the development ;-) Cheers, Fabian [1] https://docs.google.com/document/d/1sITIShmJMGegzAjGqFuwiN_iw1urwykKsLiacokxSw0 2016-04-21 14:26 GMT+02:00 Simone Robutti : > Hello, > > I would like to know if it's possible to create a Flink Table from an > arbitrary CSV (or any other form of tabular data) without doing type safe > parsing with expliciteky type classes/POJOs. > > To my knowledge this is not possible but I would like to know if I'm > missing something. My requirement is to be able to read a CSV file and > manipulate it reading the field names from the file and inferring data > types. > > Thanks, > > Simone > --001a11423120feaf020530fe0a2c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Simone,

in Flink 1.0.x, the Table API does not support reading external data, i.e.= , it is not possible to read a CSV file directly from the Table API.
Tab= les can only be created from DataSet or DataStream which means that the dat= a is already converted into "Flink types".

However, the Table API is currently under heavy development as part of th= e the efforts to add SQL support.
This work is taking place on the= master branch and I am currently working on interfaces to scan external da= ta sets or ingest external data streams.
The interface will be qui= te generic such that it should be possible to define a table source that re= ads the first lines of a file to infer attribute names and types.
= You can have a look at the current state of the API design here [1].
Feedback is welcome and can be very easily included in this phase of= the development ;-)

Cheers, Fabian

2016-04-21 14:26 GMT+02:00 Simon= e Robutti <simone.robutti@radicalbit.io>:
Hello,

I wou= ld like to know if it's possible to create a Flink Table from an arbitr= ary CSV (or any other form of tabular data) without doing type safe parsing= with expliciteky type classes/POJOs.=C2=A0

To my = knowledge this is not possible but I would like to know if I'm missing = something. My requirement is to be able to read a CSV file and manipulate i= t reading the field names from the file and inferring data types.=C2=A0

Thanks,

Simone

--001a11423120feaf020530fe0a2c--