首页 \ 问答 \ 蜂巢 - 分区表(hive - partitioning table)

蜂巢 - 分区表(hive - partitioning table)

我用查询创建了一个配置单元表 -

create table studpart4(id int, name string) partitioned by (course string, year int) row format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile;

创建成功。

使用以下命令加载数据 -

load data local inpath '/scratch/hive_inputs/student_input_1.txt' overwrite into table studpart4 partition(course='cse',year=2);

我的输入数据文件看起来像 -

 101    student1    cse 1

 102    student2    cse 2

 103    student3    eee 3

 104    student4    eee 4

 105    student5    cse 1

 106    student6    cse 2

 107    student7    eee 3

 108    student8    eee 4

 109    student9    cse 1

 110    student10   cse 2

但是输出显示为( select * from studpart4select * from studpart4 ) -

 101    student1    cse 2

 102    student2    cse 2

 103    student3    eee 2

 104    student4    eee 2

 105    student5    cse 2

 106    student6    cse 2

 107    student7    eee 2

 108    student8    eee 2

 109    student9    cse 2

 110    student10   cse 2

为什么最后一列是全部2.为什么它会被更改并错误地更新。


I have created a hive table with the query -

create table studpart4(id int, name string) partitioned by (course string, year int) row format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile;

Created successfully.

Loaded data with below command -

load data local inpath '/scratch/hive_inputs/student_input_1.txt' overwrite into table studpart4 partition(course='cse',year=2);

And my input data file looks like -

 101    student1    cse 1

 102    student2    cse 2

 103    student3    eee 3

 104    student4    eee 4

 105    student5    cse 1

 106    student6    cse 2

 107    student7    eee 3

 108    student8    eee 4

 109    student9    cse 1

 110    student10   cse 2

But output is displayed as (of select * from studpart4) --

 101    student1    cse 2

 102    student2    cse 2

 103    student3    eee 2

 104    student4    eee 2

 105    student5    cse 2

 106    student6    cse 2

 107    student7    eee 2

 108    student8    eee 2

 109    student9    cse 2

 110    student10   cse 2

Why does the last column is all 2. Why did it get changed and updating wrongly.


原文:https://stackoverflow.com/questions/39057380
更新时间:2022-02-05 14:02

最满意答案

默认情况下,Microsoft Visual Studio在安装时不会将#include搜索路径和/或库链接路径放入全局环境中,但将其留给IDE设置,或者用户在使用命令行编译器时明确执行。

对于后一个目的,Microsoft提供了一个批处理文件,请参阅Visual Studio文档中的设置命令行构建的路径和环境变量

您需要在configure.exe之前运行那里提到的VCVARS32.BAT脚本。


It's so stupid I have to answer it myself.

The reason was that I didn't have the C++ compiler installed.

I always thought I did, but only used VS2010 for C# development up until now.

Don't down-rate b/c I wasted some people's time! When was the last time such a stupid thing happened to you during coding?

相关问答

更多
  • HTML帮助2编译器可从Microsoft Visual Studio 2008 SDK 1.0下载中获得 。 (您不需要安装Visual Studio 2008 IDE就可以使用这些SDK工具。) 显然,需要的文件是hxcomp.exe 在安装SDK(在x64系统上)之后,需要的文件安装在此处,Sandcastle向导找到它。 C:\Program Files (x86)\Common Files\microsoft shared\Help 2.0 Compiler\hxcomp.exe 在x86系统上 ...
  • 在您的cpp文件中,您应该: QList SliderArray::GetSliderData() { return integerList1; } void SliderArray::SetSliderData(QList datalist) { integerList1 = datalist; } 这与Qt无关,你只是错过了返回类型。 In your cpp file you should have: QList SliderArray::GetSlid ...
  • 它归结为阅读手册 。 而不是在.pro文件中使用CXXFLAGS ,您需要使用QMAKE_CXXFLAGS如: main.cpp中: #include int main() { return 0; } main.pro: SOURCES += main.cpp QMAKE_CXXFLAGS += -std=c++0x It boils down to reading the manual. Instead of using CXXFLAGS in the .pro file, ...
  • 像这样的东西应该工作: Dictionary options = new Dictionary(); options.Add("CompilerVersion", "v2.0"); CSharpCodeProvider provider = new CSharpCodeProvider(options); 请参阅: CSharpCodeProvider构造函数(IDictionary) 。 Something like this sho ...
  • 你试图从错误的角度解决问题。 特别是,您想要的解决方案将不健壮。 它仍将在不同的系统上中断,例如,安装了不同版本的MinGW工具链,因此不同的运行时DLL,如果由您的应用程序加载(使用其他版本的MinGW构建),很可能会导致崩溃和未定义的行为运行。 此外,可能有些系统甚至没有安装MinGW。 这些是使用特定版本的工具链构建的应用程序应该与包含的相应运行时DLL(这就是所谓的可再发行运行时 )一起分发的主要原因,这是Windows上的常见做法,并且没有任何问题。 但是,有更好的方法来解决您的问题。 只需将所有 ...
  • 您需要将Server对象声明为Dialog类成员变量,而不是在构造函数中定义它。 以下是Dialog类的外观: dialog.h #include #include #include "server.h" class QLabel; class QPushButton; class Dialog : public QWidget { Q_OBJECT public: Dialog(QWidget *parent = 0); priva ...
  • 默认情况下,Microsoft Visual Studio在安装时不会将#include搜索路径和/或库链接路径放入全局环境中,但将其留给IDE设置,或者用户在使用命令行编译器时明确执行。 对于后一个目的,Microsoft提供了一个批处理文件,请参阅Visual Studio文档中的设置命令行构建的路径和环境变量 。 您需要在configure.exe之前运行那里提到的VCVARS32.BAT脚本。 It's so stupid I have to answer it myself. The reason ...
  • 在Visual Studio中快速检查,这是我发现的: 如果选项是使用Unicode字符集 ,您将拥有以下两个编译器选项: /D "_UNICODE" /D "UNICODE" 但是,如果它使用多字节字符集 ,您将拥有: /D "_MBCS" 因此,您需要更新命令行并从/D "_UNICODE" /D "UNICODE"更改为/D "_MBCS"或#定义某个_MBCS符号的某处。 A quick check in Visual Studio and this is what I found: If th ...
  • 好的,答案是相当愚蠢的。 我正在测试的项目是我私人存储库中的一个旧项目,显然我创建它是一个非Qt项目。 .pro文件包含以下行: CONFIG -= qt 这简直排除了所有的Qt标题。 Okay, the answer is rather stupid. The project I was testing with was an old one from my private repository and appareantly I created it as a non Qt-Project. The ...
  • 如果你想使用Visual Studio编译器,你可以下载免费的Windows SDK。 以下链接将您带到Visual Studio 2008 SDK: 适用于Windows 7和.NET Framework 3.5 SP1的Microsoft Windows SDK 这包括您需要的所有C ++编译器和工具。 (有一个更新版本可用,但Visual Studio 2010还不是Qt的“一级支持”平台。)我们在独立的构建机器上使用它,它工作正常。 仅仅是个人意见,但我们发现在Windows上使用除MSVC之外的任 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)