메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


rdf:type이 b:Device이고 b:Device의 위치가 o:techno인 경우에 DeviceType을 여러개 가지는(hasDeviceType)는 경우는 아래와 같이 sparql을 만들어서 or 기능을 구현할 수도 있다.(DeviceType이 o:motion-sensor_33 이거나 o:motion-sensor_32 경우)


-------------union으로 or을 구현한 예제

select  distinct  ?uri  where { 
 ?uri rdf:type b:Device.

 ?uri dul:hasLocation o:techno.
  { ?uri o:hasDeviceType o:motion-sensor_33 .}
   union 

  { ?uri o:hasDeviceType o:motion-sensor_32 .}

}



*참고 : sparql에서는 아래와 같이 각 ?s ?p ?o중의 하나에 직접 ||, &&, or , and등을 이용한 형태를 지원하지 않지 않으므로 filter문을 이용하여 처리해야 함


----지원하지 않는 형태----

select * where {

  ?s ?p ('a' or 'b')

}


----filter문을 이용해서 or을 구현한 형태

select *
where {
  ?uri rdf:type b:Device.
  ?uri dul:hasLocation o:techno . 
  ?uri o:hasDeviceType ?devType .
  filter (?devType = o:/motion-sensor_32 || ?devType = o:/motion-sensor_33) .
}


번호 제목 날짜 조회 수
530 external partition table생성및 data확인 2014.04.03 4515
529 RHEL 7.4에 zeppelin 0.7.4 설치 2018.07.31 4514
528 Error: Could not find or load main class nodemnager 가 발생할때 해결하는 방법 2015.06.05 4512
527 [Kudu] tablet server 혹은 kudu master가 어떤 원인에 의해서 replica가 failed상태인 경우 복구하는 방법 2021.05.24 4510
526 impala 설치/설정 2016.06.03 4509
525 CentOS6에 python3.5.1 소스코드로 빌드하여 설치하기 2016.05.27 4507
524 우분투에서 패키지 설치시 E: Sub-process /usr/bin/dpkg returned an error code 발생시 조치 2017.05.02 4503
523 fuseki webUI를 통해서 전체 카운트를 하면 급격하게 메모리를 소모해 버리는 문제가 있음 file 2017.04.28 4501
522 Jena 2.3를 Hadoop 2.7.2의 NFS로 mount하고 fuseki를 이용하여 start할때 오류 메세지 2016.12.02 4498
521 scala application 샘플소스(SparkSession이용) 2018.03.07 4494
520 sqoop export/import등을 할때 driver를 못찾는 오류가 발생하면... 2014.05.15 4493
519 [SBT] assembly시 "[error] deduplicate: different file contents found in the following:"오류 발생시 조치사항 2016.08.04 4491
518 index생성, 삭제, 활용 2014.04.25 4490
517 [Hadoop Encryption] Encryption Zone 생성/설정시 User:hadoop not allowed to do 'DECRYPT_EEK' ON 'testkey' 오류 발생 조치 사항 2023.06.28 4489
516 [Cloudera Agent] Metadata-Plugin throttling_logger INFO (713 skipped) Unable to send data to nav server. Will try again. 2022.05.16 4486
515 hue.desktop_document2의 type의 종류 2020.02.10 4485
514 postgresql-9.4에서 FATAL: remaining connection slots are reserved for non-replication superuser connections가 나올때 조치 2018.08.16 4482
513 Query Status: Sender xxx.xxx.xxx.xxx timed out waiting for receiver fragment instance: 1234:cdsf, dest node: 10 의 오류 원인및 대응방안 2021.11.03 4479
512 우분투 root 패스워드 설정하기 2013.03.04 4478
511 ExWordCount jar파일 file 2013.03.06 4477
위로