prql / prql-query Goto Github PK
View Code? Open in Web Editor NEWQuery and transform data with PRQL
License: Apache License 2.0
Query and transform data with PRQL
License: Apache License 2.0
I cloned the prql-query
repo locally, then used the Dockerfile image from ghcr.io.
From the top-level prql-query
directory, I issued this command from the SQLite part of the README.md. My Google-fu doesn't find many hints for solving this.
What other debugging information could I provide? Thanks.
prql-query % pq --database sqlite://examples/chinook/sqlite/chinook.sqlite \
'from albums | select title | take 10'
Error: IO Error: Failed to create directory "//.duckdb"!
Caused by:
Error code 1: Unknown error code
Is there a method similar to dplyr::show_query()
which will show the corresponding SQL that is generated by a PRQL command chain? I find this can be very helpful, especially when seeking to become more familiar with the PRQL / piped syntax!
I cloned the prql-query
repo, then tried to build the Docker container locally. I'm using macOS 10.15.7, Docker 4.12.0. Here's the error message (Update - used <details> ... </details>
to hide the trace info)
√ prql-query % docker build -t pq .
[+] Building 581.0s (12/13)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 651B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/debian:stable-slim 1.0s
=> [internal] load metadata for docker.io/library/rust:1.64.0-slim-buste 0.7s
=> [stage-1 1/3] FROM docker.io/library/debian:stable-slim@sha256:92ed72 0.1s
=> => resolve docker.io/library/debian:stable-slim@sha256:92ed7201679647 0.0s
=> => sha256:92ed72016796475ea1f18f84cd8e2f8519ece3a9ea2 1.85kB / 1.85kB 0.0s
=> => sha256:a4912461baca94ca557af4e779857867a25e0215d157d2d 529B / 529B 0.0s
=> => sha256:6a53e0f5c32d35e4c23739c1e65fa615ac5b114b5ff 1.46kB / 1.46kB 0.0s
=> CACHED [build 1/5] FROM docker.io/library/rust:1.64.0-slim-buster@sha 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 4.71MB 0.1s
=> [build 2/5] RUN apt-get -yq update && apt install -y build-esse 36.2s
=> [stage-1 2/3] WORKDIR /data 0.1s
=> [build 3/5] WORKDIR /app 0.0s
=> [build 4/5] COPY . . 0.0s
=> ERROR [build 5/5] RUN cargo build --release 543.7s
------
> [build 5/5] RUN cargo build --release:
#12 0.632 Updating crates.io index
#12 67.36 Downloading crates ...
#12 67.64 Downloaded pest_generator v2.4.0
#12 67.65 Downloaded pest_derive v2.4.0
#12 67.68 Downloaded thiserror-impl v1.0.37
#12 67.68 Downloaded pest v2.4.0
#12 67.69 Downloaded textwrap v0.15.1
#12 67.69 Downloaded adler v1.0.2
#12 67.69 Downloaded block-buffer v0.10.3
#12 67.69 Downloaded arrayvec v0.7.2
#12 67.71 Downloaded blake2 v0.10.4
#12 67.78 Downloaded log v0.4.17
#12 67.79 Downloaded backtrace v0.3.66
#12 67.80 Downloaded cast v0.3.0
#12 67.80 Downloaded camino v1.1.1
#12 67.80 Downloaded ahash v0.8.0
#12 67.81 Downloaded multiversion-macros v0.6.1
#12 67.81 Downloaded bytes v1.2.1
#12 67.87 Downloaded clap_derive v4.0.13
#12 67.90 Downloaded nom v7.1.1
#12 67.91 Downloaded num-complex v0.4.2
#12 67.91 Downloaded num_cpus v1.13.1
#12 67.91 Downloaded num-iter v0.1.43
#12 67.92 Downloaded clap_lex v0.3.0
#12 67.92 Downloaded cpufeatures v0.2.5
#12 67.93 Downloaded clap_lex v0.2.4
#12 67.93 Downloaded parquet-format v4.0.0
#12 67.93 Downloaded crypto-common v0.1.6
#12 67.93 Downloaded constant_time_eq v0.1.5
#12 67.94 Downloaded num-bigint v0.4.3
#12 67.94 Downloaded num-integer v0.1.45
#12 67.97 Downloaded minimal-lexical v0.2.1
#12 67.98 Downloaded jobserver v0.1.25
#12 68.00 Downloaded csv-core v0.1.10
#12 68.03 Downloaded lz4 v1.24.0
#12 68.03 Downloaded md-5 v0.10.5
#12 68.03 Downloaded multiversion v0.6.1
#12 68.03 Downloaded blake3 v1.3.1
#12 68.04 Downloaded num-traits v0.2.15
#12 68.05 Downloaded num-rational v0.4.1
#12 68.06 Downloaded ordered-float v1.1.1
#12 68.06 Downloaded num v0.4.0
#12 68.07 Downloaded ordered-float v3.2.0
#12 68.07 Downloaded clap v4.0.13
#12 68.09 Downloaded paste v1.0.9
#12 68.10 Downloaded peeking_take_while v0.1.2
#12 68.10 Downloaded owo-colors v3.5.0
#12 68.10 Downloaded parking_lot_core v0.9.3
#12 68.10 Downloaded comfy-table v6.1.0
#12 68.12 Downloaded proc-macro-error-attr v1.0.4
#12 68.13 Downloaded ppv-lite86 v0.2.16
#12 68.13 Downloaded pin-project-lite v0.2.9
#12 68.14 Downloaded proc-macro-hack v0.5.19
#12 68.14 Downloaded flatbuffers v2.1.2
#12 68.14 Downloaded proc-macro2 v1.0.46
#12 68.15 Downloaded r2d2 v0.8.10
#12 68.15 Downloaded quote v1.0.21
#12 68.17 Downloaded rand v0.8.5
#12 68.18 Downloaded const-random-macro v0.1.13
#12 68.19 Downloaded const-random v0.1.13
#12 68.19 Downloaded clang-sys v1.4.0
#12 68.20 Downloaded futures v0.3.24
#12 68.21 Downloaded regex-automata v0.1.10
#12 68.22 Downloaded futures-channel v0.3.24
#12 68.22 Downloaded futures-macro v0.3.24
#12 68.22 Downloaded rle-decode-fast v1.0.3
#12 68.22 Downloaded scopeguard v1.1.0
#12 68.24 Downloaded rustc-hash v1.1.0
#12 68.24 Downloaded sha1 v0.10.5
#12 68.27 Downloaded datafusion-optimizer v12.0.0
#12 68.28 Downloaded serde_json v1.0.86
#12 68.29 Downloaded sha2 v0.10.6
#12 68.31 Downloaded clio v0.2.4
#12 68.32 Downloaded serde_derive v1.0.145
#12 68.33 Downloaded pin-utils v0.1.0
#12 68.36 Downloaded lz4-sys v1.9.4
#12 68.39 Downloaded hashlink v0.8.1
#12 68.39 Downloaded generic-array v0.14.6
#12 68.39 Downloaded dotenvy v0.15.5
#12 68.40 Downloaded digest v0.10.5
#12 68.40 Downloaded duckdb v0.5.1
#12 68.41 Downloaded iana-time-zone v0.1.51
#12 68.43 Downloaded scheduled-thread-pool v0.2.6
#12 68.44 Downloaded seq-macro v0.3.1
#12 68.44 Downloaded rustversion v1.0.9
#12 68.45 Downloaded fallible-streaming-iterator v0.1.9
#12 68.46 Downloaded clap_derive v3.2.18
#12 68.47 Downloaded sharded-slab v0.1.4
#12 68.47 Downloaded strum v0.24.1
#12 68.47 Downloaded sqlformat v0.2.0
#12 68.47 Downloaded eyre v0.6.8
#12 68.48 Downloaded strsim v0.10.0
#12 68.49 Downloaded subtle v2.4.1
#12 68.49 Downloaded atty v0.2.14
#12 68.49 Downloaded termcolor v1.1.3
#12 68.49 Downloaded strum_macros v0.24.3
#12 68.50 Downloaded threadpool v1.8.1
#12 68.50 Downloaded tiny-keccak v2.0.2
#12 68.50 Downloaded rand_chacha v0.3.1
#12 68.50 Downloaded async-trait v0.1.57
#12 68.51 Downloaded remove_dir_all v0.5.3
#12 68.52 Downloaded lock_api v0.4.9
#12 68.52 Downloaded percent-encoding v2.2.0
#12 68.54 Downloaded same-file v1.0.6
#12 68.54 Downloaded pkg-config v0.3.25
#12 68.54 Downloaded bindgen v0.60.1
#12 68.55 Downloaded parking_lot v0.12.1
#12 68.56 Downloaded once_cell v1.15.0
#12 68.56 Downloaded bitflags v1.3.2
#12 68.56 Downloaded cc v1.0.73
#12 68.57 Downloaded ryu v1.0.11
#12 68.57 Downloaded itoa v0.4.8
#12 68.57 Downloaded time v0.1.44
#12 68.57 Downloaded clap v3.2.22
#12 68.59 Downloaded tokio-macros v1.8.0
#12 68.59 Downloaded memchr v2.5.0
#12 68.60 Downloaded parquet v23.0.0
#12 68.62 Downloaded fallible-iterator v0.2.0
#12 68.62 Downloaded shlex v1.1.0
#12 68.62 Downloaded datafusion-sql v12.0.0
#12 68.62 Downloaded miniz_oxide v0.5.4
#12 68.63 Downloaded serde_yaml v0.9.13
#12 68.63 Downloaded crunchy v0.2.2
#12 68.63 Downloaded rand_core v0.6.4
#12 68.63 Downloaded enum-as-inner v0.5.1
#12 68.64 Downloaded autocfg v1.1.0
#12 68.64 Downloaded datafusion-physical-expr v12.0.0
#12 68.65 Downloaded snafu v0.7.2
#12 68.66 Downloaded half v2.1.0
#12 68.66 Downloaded futures-executor v0.3.24
#12 68.66 Downloaded color-spantrace v0.2.0
#12 68.67 Downloaded integer-encoding v3.0.4
#12 68.67 Downloaded sqlparser v0.23.0
#12 68.68 Downloaded indenter v0.3.3
#12 68.68 Downloaded integer-encoding v1.1.7
#12 68.68 Downloaded doc-comment v0.3.3
#12 68.68 Downloaded datafusion-row v12.0.0
#12 68.69 Downloaded brotli-decompressor v2.3.2
#12 68.70 Downloaded cfg-if v1.0.0
#12 68.71 Downloaded fastrand v1.8.0
#12 68.71 Downloaded glob v0.3.0
#12 68.73 Downloaded dirs v4.0.0
#12 68.73 Downloaded cexpr v0.6.0
#12 68.73 Downloaded dirs-sys v0.3.7
#12 68.75 Downloaded crc32fast v1.3.2
#12 68.75 Downloaded futures-sink v0.3.24
#12 68.75 Downloaded form_urlencoded v1.1.0
#12 68.75 Downloaded futures-io v0.3.24
#12 68.75 Downloaded either v1.8.0
#12 68.76 Downloaded flate2 v1.0.24
#12 68.77 Downloaded regex-syntax v0.6.27
#12 68.78 Downloaded rustc-demangle v0.1.21
#12 68.78 Downloaded tinyvec_macros v0.1.0
#12 68.78 Downloaded env_logger v0.9.1
#12 68.79 Downloaded tempfile v3.3.0
#12 68.79 Downloaded synstructure v0.12.6
#12 68.79 Downloaded slab v0.4.7
#12 68.79 Downloaded proc-macro-error v1.0.4
#12 68.80 Downloaded indexmap v1.9.1
#12 68.80 Downloaded thiserror v1.0.37
#12 68.81 Downloaded snap v1.0.5
#12 68.81 Downloaded smallvec v1.10.0
#12 68.81 Downloaded typed-builder v0.10.0
#12 68.81 Downloaded pest_meta v2.4.0
#12 68.82 Downloaded datafusion-common v12.0.0
#12 68.82 Downloaded hashbrown v0.12.3
#12 68.82 Downloaded humantime v2.1.0
#12 68.83 Downloaded heck v0.4.0
#12 68.83 Downloaded lexical-write-integer v0.8.5
#12 68.83 Downloaded sqlparser v0.25.0
#12 68.84 Downloaded futures-task v0.3.24
#12 68.84 Downloaded futures-core v0.3.24
#12 68.84 Downloaded lazycell v1.3.0
#12 68.84 Downloaded thread_local v1.1.4
#12 68.84 Downloaded itoa v1.0.4
#12 68.85 Downloaded version_check v0.9.4
#12 68.85 Downloaded tokio-stream v0.1.11
#12 68.89 Downloaded idna v0.3.0
#12 68.91 Downloaded regex v1.6.0
#12 68.92 Downloaded tracing-core v0.1.30
#12 68.92 Downloaded unicode-segmentation v1.10.0
#12 68.93 Downloaded datafusion-expr v12.0.0
#12 68.94 Downloaded tracing v0.1.37
#12 68.95 Downloaded static_assertions v1.1.0
#12 68.95 Downloaded serde v1.0.145
#12 68.95 Downloaded itertools v0.10.5
#12 68.96 Downloaded thrift v0.16.0
#12 68.96 Downloaded futures-util v0.3.24
#12 68.98 Downloaded tinyvec v1.6.0
#12 68.99 Downloaded rust_decimal v1.26.1
#12 69.00 Downloaded vcpkg v0.2.15
#12 69.06 Downloaded getrandom v0.2.7
#12 69.06 Downloaded tracing-error v0.2.0
#12 69.06 Downloaded bstr v0.2.17
#12 69.08 Downloaded base64 v0.13.0
#12 69.08 Downloaded libm v0.2.5
#12 69.09 Downloaded aho-corasick v0.7.19
#12 69.10 Downloaded object_store v0.5.1
#12 69.14 Downloaded object v0.29.0
#12 69.18 Downloaded syn v1.0.102
#12 69.19 Downloaded unicode-xid v0.2.4
#12 69.19 Downloaded os_str_bytes v6.3.0
#12 69.20 Downloaded snafu-derive v0.7.2
#12 69.22 Downloaded tracing-attributes v0.1.23
#12 69.25 Downloaded lexical-write-float v0.8.5
#12 69.28 Downloaded walkdir v2.3.2
#12 69.36 Downloaded tracing-subscriber v0.3.16
#12 69.37 Downloaded chrono v0.4.22
#12 69.38 Downloaded typenum v1.15.0
#12 69.40 Downloaded lazy_static v1.4.0
#12 69.52 Downloaded ahash v0.7.6
#12 69.53 Downloaded arrow-buffer v23.0.0
#12 69.54 Downloaded zstd v0.11.2+zstd.1.5.2
#12 69.54 Downloaded uuid v1.2.1
#12 69.55 Downloaded libflate v1.2.0
#12 69.55 Downloaded libflate_lz77 v1.1.0
#12 69.55 Downloaded apache-avro v0.14.0
#12 69.56 Downloaded alloc-stdlib v0.2.2
#12 69.56 Downloaded ucd-trie v0.1.5
#12 69.57 Downloaded unicode_categories v0.1.1
#12 69.57 Downloaded arrayref v0.3.6
#12 69.58 Downloaded unicode-bidi v0.3.8
#12 69.59 Downloaded unicode-width v0.1.10
#12 69.59 Downloaded zstd-safe v5.0.2+zstd.1.5.2
#12 69.59 Downloaded adler32 v1.2.0
#12 69.59 Downloaded lexical-parse-integer v0.8.6
#12 69.59 Downloaded ariadne v0.1.5
#12 69.60 Downloaded lexical-core v0.8.5
#12 69.60 Downloaded addr2line v0.17.0
#12 69.61 Downloaded unicode-ident v1.0.5
#12 69.61 Downloaded lexical-util v0.8.5
#12 69.62 Downloaded yansi v0.5.1
#12 69.66 Downloaded lexical-parse-float v0.8.5
#12 69.67 Downloaded url v2.3.1
#12 69.68 Downloaded datafusion v12.0.0
#12 69.70 Downloaded unicode-normalization v0.1.22
#12 69.70 Downloaded zerocopy v0.6.1
#12 69.71 Downloaded thrift v0.13.0
#12 69.71 Downloaded byteorder v1.4.3
#12 69.72 Downloaded libloading v0.7.3
#12 69.79 Downloaded libc v0.2.135
#12 69.83 Downloaded anyhow v1.0.65
#12 69.83 Downloaded zstd-sys v2.0.1+zstd.1.5.2
#12 69.86 Downloaded color-eyre v0.6.2
#12 69.87 Downloaded unsafe-libyaml v0.2.4
#12 69.87 Downloaded alloc-no-stdlib v2.0.4
#12 69.95 Downloaded gimli v0.26.2
#12 70.01 Downloaded parquet v22.0.0
#12 70.02 Downloaded csv v1.1.6
#12 70.08 Downloaded arrow v22.0.0
#12 70.11 Downloaded brotli v3.3.4
#12 70.24 Downloaded arrow v23.0.0
#12 70.26 Downloaded zerocopy-derive v0.3.1
#12 70.28 Downloaded tokio v1.21.2
#12 70.32 Downloaded prql-compiler v0.2.9
#12 70.52 Downloaded libduckdb-sys v0.5.1
#12 70.67 Compiling libc v0.2.135
#12 70.67 Compiling proc-macro2 v1.0.46
#12 70.67 Compiling quote v1.0.21
#12 70.67 Compiling unicode-ident v1.0.5
#12 71.09 Compiling syn v1.0.102
#12 71.42 Compiling autocfg v1.1.0
#12 71.42 Compiling cfg-if v1.0.0
#12 71.42 Compiling version_check v0.9.4
#12 71.49 Compiling memchr v2.5.0
#12 71.51 Compiling libm v0.2.5
#12 71.75 Compiling once_cell v1.15.0
#12 71.79 Compiling heck v0.4.0
#12 71.86 Compiling serde_derive v1.0.145
#12 71.91 Compiling thiserror v1.0.37
#12 72.07 Compiling serde v1.0.145
#12 72.08 Compiling lazy_static v1.4.0
#12 72.16 Compiling smallvec v1.10.0
#12 72.21 Compiling pin-project-lite v0.2.9
#12 72.27 Compiling rustversion v1.0.9
#12 72.29 Compiling log v0.4.17
#12 72.41 Compiling static_assertions v1.1.0
#12 72.43 Compiling typenum v1.15.0
#12 72.49 Compiling parking_lot_core v0.9.3
#12 72.57 Compiling bitflags v1.3.2
#12 72.64 Compiling ryu v1.0.11
#12 72.72 Compiling itoa v1.0.4
#12 72.77 Compiling serde_json v1.0.86
#12 72.85 Compiling futures-core v0.3.24
#12 73.03 Compiling scopeguard v1.1.0
#12 73.05 Compiling adler v1.0.2
#12 73.09 Compiling regex-syntax v0.6.27
#12 73.12 Compiling iana-time-zone v0.1.51
#12 73.14 Compiling regex-automata v0.1.10
#12 73.24 Compiling crc32fast v1.3.2
#12 73.46 Compiling futures-channel v0.3.24
#12 73.59 Compiling futures-task v0.3.24
#12 73.69 Compiling zstd-safe v5.0.2+zstd.1.5.2
#12 73.73 Compiling byteorder v1.4.3
#12 73.89 Compiling futures-sink v0.3.24
#12 73.95 Compiling subtle v2.4.1
#12 73.97 Compiling itoa v0.4.8
#12 74.03 Compiling futures-util v0.3.24
#12 74.10 Compiling tinyvec_macros v0.1.0
#12 74.11 Compiling unicode-width v0.1.10
#12 74.18 Compiling futures-io v0.3.24
#12 74.21 Compiling bytes v1.2.1
#12 74.31 Compiling pin-utils v0.1.0
#12 74.38 Compiling snap v1.0.5
#12 74.51 Compiling ppv-lite86 v0.2.16
#12 74.74 Compiling alloc-no-stdlib v2.0.4
#12 74.88 Compiling percent-encoding v2.2.0
#12 74.92 Compiling either v1.8.0
#12 75.10 Compiling unicode-xid v0.2.4
#12 75.21 Compiling doc-comment v0.3.3
#12 75.33 Compiling unicode-bidi v0.3.8
#12 75.37 Compiling async-trait v0.1.57
#12 75.58 Compiling rle-decode-fast v1.0.3
#12 75.66 Compiling integer-encoding v1.1.7
#12 76.04 Compiling seq-macro v0.3.1
#12 76.06 Compiling glob v0.3.0
#12 76.64 Compiling base64 v0.13.0
#12 76.73 Compiling parquet v22.0.0
#12 77.04 Compiling adler32 v1.2.0
#12 77.04 Compiling same-file v1.0.6
#12 77.21 Compiling minimal-lexical v0.2.1
#12 77.33 Compiling os_str_bytes v6.3.0
#12 77.68 Compiling arrayvec v0.7.2
#12 77.84 Compiling bindgen v0.60.1
#12 77.91 Compiling shlex v1.1.0
#12 78.10 Compiling lazycell v1.3.0
#12 78.20 Compiling ucd-trie v0.1.5
#12 78.33 Compiling termcolor v1.1.3
#12 78.67 Compiling peeking_take_while v0.1.2
#12 78.78 Compiling rustc-hash v1.1.0
#12 78.90 Compiling gimli v0.26.2
#12 79.14 Compiling constant_time_eq v0.1.5
#12 79.25 Compiling pkg-config v0.3.25
#12 79.95 Compiling paste v1.0.9
#12 80.50 Compiling rustc-demangle v0.1.21
#12 80.68 Compiling strsim v0.10.0
#12 81.96 Compiling cpufeatures v0.2.5
#12 82.03 Compiling vcpkg v0.2.15
#12 82.14 Compiling arrayref v0.3.6
#12 82.22 Compiling eyre v0.6.8
#12 82.66 Compiling anyhow v1.0.65
#12 83.06 Compiling indenter v0.3.3
#12 83.18 Compiling owo-colors v3.5.0
#12 83.22 Compiling rust_decimal v1.26.1
#12 83.24 Compiling unicode-segmentation v1.10.0
#12 83.31 Compiling yansi v0.5.1
#12 83.58 Compiling camino v1.1.1
#12 83.62 Compiling parquet v23.0.0
#12 83.91 Compiling fastrand v1.8.0
#12 83.97 Compiling integer-encoding v3.0.4
#12 84.09 Compiling remove_dir_all v0.5.3
#12 84.40 Compiling unsafe-libyaml v0.2.4
#12 84.46 Compiling unicode_categories v0.1.1
#12 84.67 Compiling cast v0.3.0
#12 84.88 Compiling humantime v2.1.0
#12 85.10 Compiling fallible-streaming-iterator v0.1.9
#12 85.25 Compiling fallible-iterator v0.2.0
#12 85.41 Compiling textwrap v0.15.1
#12 85.97 Compiling ahash v0.7.6
#12 86.23 Compiling generic-array v0.14.6
#12 86.31 Compiling ahash v0.8.0
#12 86.48 Compiling proc-macro-error-attr v1.0.4
#12 86.59 Compiling proc-macro-error v1.0.4
#12 86.61 Compiling num-traits v0.2.15
#12 86.72 Compiling num-integer v0.1.45
#12 86.83 Compiling num-bigint v0.4.3
#12 86.86 Compiling lock_api v0.4.9
#12 86.94 Compiling indexmap v1.9.1
#12 87.10 Compiling num-rational v0.4.1
#12 87.16 Compiling num-iter v0.1.43
#12 87.17 Compiling slab v0.4.7
#12 87.35 Compiling tokio v1.21.2
#12 87.40 Compiling tracing-core v0.1.30
#12 87.41 Compiling thread_local v1.1.4
#12 87.60 Compiling sharded-slab v0.1.4
#12 87.94 Compiling lexical-util v0.8.5
#12 88.12 Compiling miniz_oxide v0.5.4
#12 88.65 Compiling tinyvec v1.6.0
#12 88.67 Compiling alloc-stdlib v0.2.2
#12 88.79 Compiling form_urlencoded v1.1.0
#12 88.91 Compiling itertools v0.10.5
#12 89.27 Compiling libflate_lz77 v1.1.0
#12 89.58 Compiling clang-sys v1.4.0
#12 89.81 Compiling walkdir v2.3.2
#12 90.02 Compiling libloading v0.7.3
#12 90.21 Compiling clap_lex v0.3.0
#12 90.30 Compiling clap_lex v0.2.4
#12 90.59 Compiling regex v1.6.0
#12 90.95 Compiling addr2line v0.17.0
#12 91.36 Compiling ariadne v0.1.5
#12 93.85 Compiling tracing-subscriber v0.3.16
#12 94.07 Compiling lexical-write-integer v0.8.5
#12 94.39 Compiling lexical-parse-integer v0.8.6
#12 94.80 Compiling brotli-decompressor v2.3.2
#12 94.90 Compiling unicode-normalization v0.1.22
#12 96.60 Compiling getrandom v0.2.7
#12 97.47 Compiling time v0.1.44
#12 97.48 Compiling num_cpus v1.13.1
#12 98.66 Compiling atty v0.2.14
#12 98.71 Compiling dirs-sys v0.3.7
#12 98.75 Compiling tempfile v3.3.0
#12 99.50 Compiling jobserver v0.1.25
#12 99.98 Compiling aho-corasick v0.7.19
#12 100.0 Compiling csv-core v0.1.10
#12 100.1 Compiling object v0.29.0
#12 100.7 Compiling nom v7.1.1
#12 103.5 Compiling sqlparser v0.23.0
#12 103.6 Compiling lexical-write-float v0.8.5
#12 104.4 Compiling lexical-parse-float v0.8.5
#12 104.5 Compiling flate2 v1.0.24
#12 104.9 Compiling libflate v1.2.0
#12 105.0 Compiling idna v0.3.0
#12 105.4 Compiling brotli v3.3.4
#12 109.7 Compiling rand_core v0.6.4
#12 110.4 Compiling threadpool v1.8.1
#12 111.8 Compiling dirs v4.0.0
#12 112.0 Compiling cc v1.0.73
#12 113.3 Compiling parking_lot v0.12.1
#12 114.7 Compiling sqlformat v0.2.0
#12 119.2 Compiling num-complex v0.4.2
#12 119.8 Compiling half v2.1.0
#12 119.8 Compiling ordered-float v1.1.1
#12 120.0 Compiling ordered-float v3.2.0
#12 120.4 Compiling lexical-core v0.8.5
#12 120.5 Compiling block-buffer v0.10.3
#12 120.6 Compiling crypto-common v0.1.6
#12 120.6 Compiling url v2.3.1
#12 120.7 Compiling cexpr v0.6.0
#12 121.5 Compiling hashbrown v0.12.3
#12 122.1 Compiling rand_chacha v0.3.1
#12 123.1 Compiling dotenvy v0.15.5
#12 123.9 Compiling zstd-sys v2.0.1+zstd.1.5.2
#12 124.0 Compiling lz4-sys v1.9.4
#12 124.4 Compiling blake3 v1.3.1
#12 124.4 Compiling backtrace v0.3.66
#12 124.5 Compiling scheduled-thread-pool v0.2.6
#12 124.7 Compiling env_logger v0.9.1
#12 124.8 Compiling synstructure v0.12.6
#12 125.7 Compiling thiserror-impl v1.0.37
#12 127.2 Compiling strum_macros v0.24.3
#12 127.6 Compiling multiversion-macros v0.6.1
#12 127.9 Compiling tracing-attributes v0.1.23
#12 129.8 Compiling futures-macro v0.3.24
#12 129.8 Compiling tokio-macros v1.8.0
#12 130.3 Compiling snafu-derive v0.7.2
#12 131.2 Compiling typed-builder v0.10.0
#12 131.4 Compiling enum-as-inner v0.5.1
#12 132.9 Compiling chrono v0.4.22
#12 133.0 Compiling thrift v0.13.0
#12 134.1 Compiling thrift v0.16.0
#12 136.2 Compiling digest v0.10.5
#12 137.2 Compiling hashlink v0.8.1
#12 137.3 Compiling rand v0.8.5
#12 138.3 Compiling r2d2 v0.8.10
#12 138.6 Compiling zerocopy-derive v0.3.1
#12 138.7 Compiling clap_derive v4.0.13
#12 140.2 Compiling clap_derive v3.2.18
#12 141.5 Compiling multiversion v0.6.1
#12 141.6 Compiling strum v0.24.1
#12 141.6 Compiling tracing v0.1.37
#12 145.1 Compiling parquet-format v4.0.0
#12 145.4 Compiling snafu v0.7.2
#12 145.7 Compiling sha2 v0.10.6
#12 146.4 Compiling md-5 v0.10.5
#12 146.6 Compiling blake2 v0.10.4
#12 147.6 Compiling zerocopy v0.6.1
#12 148.1 Compiling flatbuffers v2.1.2
#12 148.9 Compiling pest v2.4.0
#12 150.9 Compiling clap v4.0.13
#12 151.1 Compiling comfy-table v6.1.0
#12 153.0 Compiling tracing-error v0.2.0
#12 153.3 Compiling clap v3.2.22
#12 153.8 Compiling libduckdb-sys v0.5.1
#12 154.8 Compiling num v0.4.0
#12 154.9 Compiling tokio-stream v0.1.11
#12 155.4 Compiling bstr v0.2.17
#12 157.0 Compiling uuid v1.2.1
#12 157.7 Compiling sqlparser v0.25.0
#12 161.3 Compiling serde_yaml v0.9.13
#12 166.9 Compiling futures-executor v0.3.24
#12 167.8 Compiling pest_meta v2.4.0
#12 169.2 Compiling clio v0.2.4
#12 170.1 Compiling color-spantrace v0.2.0
#12 170.8 Compiling arrow-buffer v23.0.0
#12 171.7 Compiling csv v1.1.6
#12 173.1 Compiling apache-avro v0.14.0
#12 173.2 Compiling futures v0.3.24
#12 173.3 Compiling pest_generator v2.4.0
#12 174.2 Compiling color-eyre v0.6.2
#12 176.6 Compiling arrow v22.0.0
#12 183.3 Compiling object_store v0.5.1
#12 187.9 Compiling pest_derive v2.4.0
#12 188.9 Compiling prql-compiler v0.2.9
#12 262.8 Compiling lz4 v1.24.0
#12 272.5 Compiling zstd v0.11.2+zstd.1.5.2
#12 272.7 Compiling arrow v23.0.0
#12 275.4 Compiling datafusion-common v12.0.0
#12 296.5 Compiling datafusion-expr v12.0.0
#12 322.6 Compiling datafusion-row v12.0.0
#12 348.8 Compiling datafusion-sql v12.0.0
#12 363.1 Compiling datafusion-physical-expr v12.0.0
#12 470.8 Compiling datafusion-optimizer v12.0.0
#12 470.9 The following warnings were emitted during compilation:
#12 470.9
#12 470.9 warning: c++: fatal error: Killed signal terminated program cc1plus
#12 470.9 warning: compilation terminated.
#12 470.9
#12 470.9 error: failed to run custom build command for `libduckdb-sys v0.5.1`
#12 470.9
#12 470.9 Caused by:
#12 471.0 process didn't exit successfully: `/app/target/release/build/libduckdb-sys-dd2866ecae070e6b/build-script-build` (exit status: 1)
#12 471.0 --- stdout
#12 471.0 cargo:rerun-if-changed=/usr/lib/llvm-7/lib/clang/7.0.1/include/stdbool.h
#12 471.0 cargo:rerun-if-changed=/usr/lib/llvm-7/lib/clang/7.0.1/include/stdint.h
#12 471.0 cargo:rerun-if-changed=/usr/include/stdint.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/libc-header-start.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/stdc-predef.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/sys/cdefs.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/wordsize.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/long-double.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/gnu/stubs.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/gnu/stubs-64.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/wordsize.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/typesizes.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/wchar.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/wordsize.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/stdint-intn.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/stdlib.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/libc-header-start.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/lib/llvm-7/lib/clang/7.0.1/include/stddef.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/waitflags.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/waitstatus.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/floatn.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/floatn-common.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/long-double.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/sys/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/clock_t.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/time_t.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/timer_t.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/lib/llvm-7/lib/clang/7.0.1/include/stddef.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/stdint-intn.h
#12 471.0 cargo:rerun-if-changed=/usr/include/endian.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/endian.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/byteswap.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/uintn-identity.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/sys/select.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/select.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/wordsize.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/time_t.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/wordsize.h
#12 471.0 cargo:rerun-if-changed=/usr/include/alloca.h
#12 471.0 cargo:rerun-if-changed=/usr/include/features.h
#12 471.0 cargo:rerun-if-changed=/usr/lib/llvm-7/lib/clang/7.0.1/include/stddef.h
#12 471.0 cargo:rerun-if-changed=/usr/include/x86_64-linux-gnu/bits/stdlib-float.h
#12 471.0 cargo:rerun-if-changed=duckdb/duckdb.hpp
#12 471.0 cargo:rerun-if-changed=duckdb/duckdb.cpp
#12 471.0 TARGET = Some("x86_64-unknown-linux-gnu")
#12 471.0 OPT_LEVEL = Some("3")
#12 471.0 HOST = Some("x86_64-unknown-linux-gnu")
#12 471.0 CXX_x86_64-unknown-linux-gnu = None
#12 471.0 CXX_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXX = None
#12 471.0 CXX = None
#12 471.0 CXXFLAGS_x86_64-unknown-linux-gnu = None
#12 471.0 CXXFLAGS_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXXFLAGS = None
#12 471.0 CXXFLAGS = None
#12 471.0 CRATE_CC_NO_DEFAULTS = None
#12 471.0 DEBUG = Some("false")
#12 471.0 CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
#12 471.0 CXX_x86_64-unknown-linux-gnu = None
#12 471.0 CXX_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXX = None
#12 471.0 CXX = None
#12 471.0 CXXFLAGS_x86_64-unknown-linux-gnu = None
#12 471.0 CXXFLAGS_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXXFLAGS = None
#12 471.0 CXXFLAGS = None
#12 471.0 CRATE_CC_NO_DEFAULTS = None
#12 471.0 CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
#12 471.0 CXX_x86_64-unknown-linux-gnu = None
#12 471.0 CXX_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXX = None
#12 471.0 CXX = None
#12 471.0 CXXFLAGS_x86_64-unknown-linux-gnu = None
#12 471.0 CXXFLAGS_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXXFLAGS = None
#12 471.0 CXXFLAGS = None
#12 471.0 CRATE_CC_NO_DEFAULTS = None
#12 471.0 CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
#12 471.0 CXX_x86_64-unknown-linux-gnu = None
#12 471.0 CXX_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXX = None
#12 471.0 CXX = None
#12 471.0 CXXFLAGS_x86_64-unknown-linux-gnu = None
#12 471.0 CXXFLAGS_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXXFLAGS = None
#12 471.0 CXXFLAGS = None
#12 471.0 CRATE_CC_NO_DEFAULTS = None
#12 471.0 CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
#12 471.0 CXX_x86_64-unknown-linux-gnu = None
#12 471.0 CXX_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXX = None
#12 471.0 CXX = None
#12 471.0 CXXFLAGS_x86_64-unknown-linux-gnu = None
#12 471.0 CXXFLAGS_x86_64_unknown_linux_gnu = None
#12 471.0 HOST_CXXFLAGS = None
#12 471.0 CXXFLAGS = None
#12 471.0 CRATE_CC_NO_DEFAULTS = None
#12 471.0 CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
#12 471.0 running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-std=c++11" "-o" "/app/target/release/build/libduckdb-sys-68a72700699906fe/out/duckdb/duckdb.o" "-c" "duckdb/duckdb.cpp"
#12 471.0 cargo:warning=c++: fatal error: Killed signal terminated program cc1plus
#12 471.0 cargo:warning=compilation terminated.
#12 471.0 exit status: 1
#12 471.0
#12 471.0 --- stderr
#12 471.0 error: 'rustfmt' is not installed for the toolchain '1.64.0-x86_64-unknown-linux-gnu'
#12 471.0 To install, run `rustup component add rustfmt`
#12 471.0 Failed to run rustfmt: Internal rustfmt error (non-fatal, continuing)
#12 471.0
#12 471.0
#12 471.0 error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-std=c++11" "-o" "/app/target/release/build/libduckdb-sys-68a72700699906fe/out/duckdb/duckdb.o" "-c" "duckdb/duckdb.cpp" with args "c++" did not execute successfully (status code exit status: 1).
#12 471.0
#12 471.0
#12 471.0 warning: build failed, waiting for other jobs to finish...
------
executor failed running [/bin/sh -c cargo build --release]: exit code: 101
?1 prql-query %
I've never used brew personally and am not sure I'm following all the terminology of kegs, taps and formulae. I'll give it a try but if someone experienced wants to help out, that would be great.
Hi,
First of all, thank you for the great project !
I was wondering if under "Alternative Backends" - can integrations with Open Table format like Apache Iceberg can be considered / added to the roadmap?
duckdb just released version 0.6.0 that purports to fix #18, the "... got something else..." error message.
To reproduce, update the Cargo.toml to use duckdb version=0.6.0, then cargo build
. Here are the build messages:
?1 prql-query % cargo build
Updating crates.io index
Downloaded arrow-schema v26.0.0
Downloaded arrow-array v26.0.0
Downloaded arrow-select v26.0.0
Downloaded arrow-buffer v26.0.0
Downloaded arrow-data v26.0.0
Downloaded bindgen v0.61.0
Downloaded duckdb v0.6.0
Downloaded arrow v26.0.0
Downloaded libduckdb-sys v0.6.0
Downloaded 9 crates (3.3 MB) in 1.23s (largest was `libduckdb-sys` at 2.5 MB)
Compiling bindgen v0.61.0
Compiling arrow-schema v26.0.0
Compiling arrow-buffer v26.0.0
Compiling arrow v23.0.0
Compiling arrow-data v26.0.0
Compiling arrow-array v26.0.0
Compiling arrow-select v26.0.0
Compiling arrow v26.0.0
Compiling libduckdb-sys v0.6.0
Compiling parquet v23.0.0
Compiling duckdb v0.6.0
Compiling prql-query v0.0.14 (/Users/richb/github/prql-query)
error[E0277]: a value of type `Vec<arrow::record_batch::RecordBatch>` cannot be built from an iterator over elements of type `duckdb::arrow::record_batch::RecordBatch`
--> src/backends/duckdb.rs:133:37
|
133 | let rbs = stmt.query_arrow([])?.collect::<Vec<RecordBatch>>();
| ^^^^^^^ value of type `Vec<arrow::record_batch::RecordBatch>` cannot be built from `std::iter::Iterator<Item=duckdb::arrow::record_batch::RecordBatch>`
|
= help: the trait `FromIterator<duckdb::arrow::record_batch::RecordBatch>` is not implemented for `Vec<arrow::record_batch::RecordBatch>`
= help: the trait `FromIterator<T>` is implemented for `Vec<T>`
note: required by a bound in `std::iter::Iterator::collect`
--> /Users/richb/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1832:19
|
1832 | fn collect<B: FromIterator<Self::Item>>(self) -> B
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `std::iter::Iterator::collect`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `prql-query` due to previous error
?101 prql-query %
Using the chinook database sample data we should be able to put together at least basic integration tests.
The latest version of pq
(0.0.15) doesn't seem to accept the same syntax for select
that's documented on the PRQL website.
Example:
$ $ pq "from a | select { b, c }"
Error: Error:
╭─[:2:17]
│
2 │ from a | select { b, c }
· ┬
· ╰── unexpected {
───╯
Error:
╭─[:2:24]
│
2 │ from a | select { b, c }
· ┬
· ╰── unexpected }
───╯
I think this might be because pq
is currently using an older version of prqlc
:
$ pq "from a | select b"
SELECT
b
FROM
a
-- Generated by PRQL compiler version:0.6.1 (https://prql-lang.org)
Adding the PQ_* environment variables to the docker run command will make that command excessively long.
@max-sixty had the excellent idea of putting these all in a docker-compose file to simply the command.
I have installed pq
via cargo install prql-query
. Running pq --help
works, but any other command fails with an odd semver version number string
error:
$ pq "from a | select b"
Error: Error { span: Some(Span { start: 13, end: 15 }), reason: Expected { who: None, expected: "semver version number string", found: "1" }, help: None }
If I checkout from git and run 'cargo build -r' it works, and cargo install --path .
breaks:
jturner@jturner-desktop:~/src/github.com/PRQL/prql-query$ cargo build -r
Finished release [optimized] target(s) in 0.14s
jturner@jturner-desktop:~/src/github.com/PRQL/prql-query$ ./target/release/pq 'from a | select b'
SELECT
b
FROM
a
jturner@jturner-desktop:~/src/github.com/PRQL/prql-query$ cargo install --path .
Installing prql-query v0.0.14 (/home/jturner/src/github.com/PRQL/prql-query)
Updating crates.io index
Finished release [optimized] target(s) in 4.17s
Replacing /home/jturner/.cargo/bin/pq
Replaced package `prql-query v0.0.14 (/home/jturner/src/github.com/PRQL/prql-query)` with `prql-query v0.0.14 (/home/jturner/src/github.com/PRQL/prql-query)` (executable `pq`)
jturner@jturner-desktop:~/src/github.com/PRQL/prql-query$ ./target/release/pq 'from a'
Error: Error { span: Some(Span { start: 13, end: 15 }), reason: Expected { who: None, expected: "semver version number string", found: "1" }, help: None }
jturner@jturner-desktop:~/src/github.com/PRQL/prql-query$ cargo build -r
Finished release [optimized] target(s) in 0.12s
jturner@jturner-desktop:~/src/github.com/PRQL/prql-query$ ./target/release/pq 'from a'
SELECT
a.*
FROM
a
jturner@jturner-desktop:~/src/github.com/PRQL/prql-query$
Just FYI.
Anyway, very promising project!
Ahah. I see the problem you cited. A database query for a field of type INTEGER gives an error, while a VARCHAR column works fine.
The following are pq
commands against a copy of the chinook database in the local directory. pq was built with cargo build
(not using the Dockerfile).
What other troubleshooting information could I provide? Thanks.
Working:
√ pqtest % pq --database sqlite://chinook.sqlite 'from albums | select title | take 2'
+---------------------------------------+
| title |
+---------------------------------------+
| title |
| For Those About To Rock We Salute You |
+---------------------------------------+
Not working:
√ pqtest % pq --database sqlite://chinook.sqlite 'from albums | select album_id | take 2'
Error: Invalid Error: Expected integer, got something else
Caused by:
Error code 1: Unknown error code
Using 0.0.14, the --database
support seems broken, at least when connecting to a Postgres 14.6 database:
pq -d "postgresql://$ATL_DATABASE_USER:$ATL_DATABASE_PASSWORD@$ATL_DATABASE_HOST:$ATL_DATABASE_PORT/$ATL_DATABASE" 'from jiraissue | take 1'
Error: IO Error: Unsupported Postgres type oid
Caused by:
Error code 1: Unknown error code
There is a ~30s delay before the error prints.
While the filename is quoted correctly, the table alias that is created will contain spaces which is not valid.
Proposed solution: replace spaces in the table aliases with underscores.
example from readme https://github.com/PRQL/prql-query#transforming-data-with-pq-and-writing-the-output-to-files raises error
pq --from examples/data/chinook/csv/invoices.csv --to invoices.parquet ""
Error: Error:
╭─[:2:18]
│
2 │ from `invoices` |
· ┬
· ╰── Expected one of !, (, +, -, ==, [, an identifier or keyword case, but didn't find anything before the end.
───╯
using tablename.*
which works on playground (PRQL/prql#3641) does not work either.
pq --from examples/data/chinook/csv/invoices.csv --to invoices.parquet "select invoices.*"
Error: IO error: No such file or directory (os error 2)
Building the docker image takes quite long (> 30mins) so this should really be made available to people to download.
Cool project!
I used the prql-query CLI-tool v0.0.14 in the following examples.
When compiling:
prql target:sql.postgres
from developers
group team (
aggregate [
skill_width = count_distinct specialty,
]
)
to sql I get:
SELECT
team,
COUNT(DISTINCT `specialty`) AS skill_width
FROM
developers
GROUP BY
team
I did not expect the output to have a column name quoted with backticks (and neither did the database I sent it to, roapi).
If we have a weird column name and backtick-quote it in the select statement of the prql:
from developers
select `weird name`
we get a column name with double-quotes as expected:
SELECT
"weird name"
FROM
developers
Searching the codebase I found this line in prql-compiler/src/sql/std_impl.prql:
func count_distinct <scalar|column> column -> s"COUNT(DISTINCT `{column}`)"
which contains backticks. Is there a good reason for this? None of the other functions in the file use backticks.
@max-sixty @snth @aljazerzen I think that leaving this repository here is causing confusion for new users, so I recommend archiving this.
As of November 2023, the glaredb CLI covers most of what prql-query was intended to do, and is under active development.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.