-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when select from table ,error is no table;then create table, error is table exsists? #1433
Comments
To resolve the inconsistency, you can run the
More details about the procedure are here (https://snappydatainc.github.io/snappydata/troubleshooting/catalog_inconsistency/) How did you create the table dev_bigdata_bio_antiasf.ods_bio_car_archives? This kind of inconsistency has been seen when a |
thinks for your response. we create table by shell scripts where call by streamset shell processor. create table if not exists dev_bigdata_bio_antiasf.ods_bio_car_archives
(
id bigint not null
constraint ods_bio_car_archives_pk
primary key,
create_user varchar(500),
create_time timestamp,
modify_user varchar(500),
modify_time timestamp,
app_id bigint,
tenant_id bigint
); It can't fixed the problem after executed the command which you said. > call sys.repair_catalog('false', 'false');
snappy>
>
>
> call sys.repair_catalog('true', 'false');
snappy>
>
> call sys.repair_catalog('true', 'false');
snappy> select * from dev_bigdata_bio_antiasf.ods_bio_car_archives;
ERROR 42000: (SQLState=42000 Severity=20000) (Server=hdfs06-dev.yingzi.com/172.19.101.81[1527] Thread=ThriftProcessor-61) Syntax error or analysis exception: Table or view not found: `DEV_BIGDATA_BIO_ANTIASF`.`ODS_BIO_CAR_ARCHIVES`;;
'Project [*]
+- 'UnresolvedRelation `DEV_BIGDATA_BIO_ANTIASF`.`ODS_BIO_CAR_ARCHIVES`
snappy>
>
> create table if not exists dev_bigdata_bio_antiasf.ods_bio_car_archives
> (
> id bigint not null
> constraint ods_bio_car_archives_pk
> primary key,
> create_user varchar(500),
> create_time timestamp,
> modify_user varchar(500),
> modify_time timestamp,
> app_id bigint,
> tenant_id bigint,
> device_id bigint,
> device_classcode varchar(500),
> yzid_type varchar(500),
> gps_id bigint,
> code varchar(500),
> name varchar(500),
> car_number varchar(500),
> car_capacity smallint,
> car_use varchar(500),
> car_owner varchar(500),
> buy_date timestamp,
> examination_date timestamp,
> car_team varchar(500),
> team_number varchar(500),
> together_star timestamp,
> together_end timestamp,
> overspeed smallint,
> status integer,
> deleted boolean,
> allowed_dry boolean
> );
ERROR X0Y32: (SQLState=X0Y32 Severity=20000) (Server=hdfs06-dev.yingzi.com/172.19.101.81[1527] Thread=ThriftProcessor-61) Table/View 'ODS_BIO_CAR_ARCHIVES' already exists in Schema 'DEV_BIGDATA_BIO_ANTIASF'. After restart all snappydata node ,the problem is fixed. |
Today I Miss the same problem again: snappy> UPDATE stage_bizcenter_hmc.hmc_person_employee SET hire_day='2019-08-19' WHERE id=1163348176156397569;
ERROR 42X14: (SQLState=42X14 Severity=20000) (Server=snappy05-stage.yingzi.com/172.18.80.253[1527] Thread=ThriftProcessor-47) 'HIRE_DAY' is not a column in table or VTI 'STAGE_BIZCENTER_HMC.HMC_PERSON_EMPLOYEE'.
snappy> select hire_day from stage_bizcenter_hmc.hmc_person_employee limit 10;
HIRE_DAY
----------------------------------------
2019-08-10
2019-08-09
2019-08-05
2019-08-05
2019-08-05
2019-08-03
2019-08-01
2019-07-31
2019-07-21
2019-07-19 I can slelect the column,But I can't Upate it . snappy> call sys.repair_catalog('true', 'true');
snappy> UPDATE stage_bizcenter_hmc.hmc_person_employee SET hire_day='2019-08-19' WHERE id=1163348176156397569;
ERROR 42X14: (SQLState=42X14 Severity=20000) (Server=snappy05-stage.yingzi.com/172.18.80.253[1527] Thread=ThriftProcessor-47) 'HIRE_DAY' is not a column in table or VTI 'STAGE_BIZCENTER_HMC.HMC_PERSON_EMPLOYEE'.
snappy> select hire_day from stage_bizcenter_hmc.hmc_person_employee limit 10;
HIRE_DAY
----------------------------------------
2019-08-10
2019-08-09
2019-08-05
2019-08-05
2019-08-05
2019-08-03
2019-08-01
2019-07-31
2019-07-21
2019-07-19 Sorry . It is my mistake. CREATE TABLE `DEV_BIZCENTER_HMC`.`HMC_PERSON_EMPLOYEE` (`id` BIGINT, `app_id` BIGINT, `tenant_id` BIGINT, `person_id` BIGINT, `type` INT, `position` STRING, `name` STRING, `pingyin` STRING, `english_name` STRING, `native_place` STRING, `sex` STRING, `idcard` STRING, `passport` STRING, `job_number` STRING, `hire_day` STRING, `termi_day` STRING, `company_mobile` STRING, `company_email` STRING, `status` INT, `img_url` STRING, `remark` STRING, `deleted` BOOLEAN, `create_user` STRING, `create_time` TIMESTAMP, `modify_user` STRING, `modify_time` TIMESTAMP, `main_org_id` BIGINT) USING row OPTIONS ( `SCHEMADDL.numParts` '1', `SCHEMADDL.part.0` '( "id" bigint NOT NULL, "app_id" bigint, "tenant_id" bigint, "person_id" bigint NOT NULL, "type" int NOT NULL, "position" varchar(127) NOT NULL, "name" varchar(127) NOT NULL, "pingyin" varchar(127) NOT NULL, "english_name" varchar(127) NOT NULL, "native_place" varchar(127) NOT NULL, "sex" varchar(20) NOT NULL, "idcard" varchar(40) NOT NULL, "passport" varchar(40) NOT NULL, "job_number" varchar(40) NOT NULL, "hire_day" varchar(40) NOT NULL, "termi_day" varchar(40) NOT NULL, "company_mobile" varchar(40) NOT NULL, "company_email" varchar(40) NOT NULL, "status" int , "img_url" varchar(1000), "remark" varchar(255), "deleted" boolean NOT NULL, "create_user" varchar(50), "create_time" timestamp, "modify_user" varchar(50), "modify_time" timestamp, "main_org_id" bigint, CONSTRAINT "hmc_person_employee_pkey" PRIMARY KEY ("id") )', `dbtable` 'DEV_BIZCENTER_HMC.HMC_PERSON_EMPLOYEE', `serialization.format` '1' ) in create table ddl, column is enclose by double quotations.but in update statement i not use double quotations. |
The text was updated successfully, but these errors were encountered: