# Namespace Summary: # ================= # # sldg.source.jdbc.url: # Connection URL (jdbc:) to source table (required; read-only OK) # # sldg.source.info.xyz: # Connection property xyz is prefixed with sldg.source.info. # # sldg.source.jdbc.driver: # JDBC driver class name needed to load above jdbc URL (optional) # # sldg.source.jdbc.driver.classpath: # Path to .jar bundle containing the named driver class (optional) # # sldg.source.query.size: # "SELECT COUNT(*)" from source table query (required) # # sldg.source.query.row: # "SELECT" by row-number prepared-statement query (required) # Note however you design this, your row-nums must range [1, size] (no gaps) # # sldg.source.salt.seed: # Secret 64-char hex value seed for generating table-cell salts by row/col coordinates # Note this value should not be changed or lost. It protects individual table-cell # values from rainbow attacks (reverse-engineering a value from its hash). # # sldg.hash.jdbc.url: # Connection URL to DB the tracking hash-ledger lives in (optional) # If not set, then the hash-ledger lives in the same DB as the source-table # # sldg.hash.info.xyz: # Connection property xyz is prefixed with sldg.hash.info. # # sldg.hash.jdbc.driver: # JDBC driver class name needed to load above jdbc URL (optional) # # sldg.hash.jdbc.driver.classpath: # Path to .jar bundle containing the named driver class (optional) # # sldg.hash.table.prefix: # Hash-ledger tables (3) use this prefix in their table names. Usually set to # the source table's name. # # The following 3 specify the SQL schemas for the hash tables. They may be # DB vendor specific. # # sldg.hash.schema.skip: # SQL schema (CREATE TABLE statement) for the skipledger table (defaulted) # # sldg.hash.schema.chain: # SQL schema (CREATE TABLE statement) for the chain table (defaulted) # # sldg.hash.schema.trail: # SQL schema (CREATE TABLE statement) for the trail table (defaulted) # # Note, driver classpaths above may either be set absolutely, or relative to # the location of this file. # # #Wed Sep 29 22:15:14 MDT 2021 sldg.source.jdbc.url=jdbc\:sqlite\:/Users/babak/code/workspace/ledgers/sandbox/sqlite_sample/chinook.db sldg.source.jdbc.driver=org.sqlite.JDBC sldg.source.jdbc.driver.classpath=../sqlite_sample/sqlite-jdbc-3.36.0.2.jar sldg.source.query.size=SELECT count(*) FROM invoice_items AS rcount sldg.source.query.row=SELECT * FROM ( SELECT ROW_NUMBER() OVER (ORDER BY InvoiceLineId ASC) AS row_index, InvoiceLineId, invoice_items.InvoiceId, TrackId, UnitPrice, Quantity, invoices.CustomerId, invoices.InvoiceDate, invoices.BillingAddress, invoices.BillingCity, invoices.BillingState, invoices.BillingCountry, invoices.BillingPostalCode, invoices.Total FROM invoice_items INNER JOIN invoices ON invoices.InvoiceId = invoice_items.InvoiceId) AS snap WHERE row_index \= ? # # Replace RHS value below w/ random 64 digit hex value: eg the SHA-256 of some random file # sldg.source.salt.seed=06a3861355760acb05fc1607c6786b828c8e98c4f4698af9324967a208346 sldg.hash.table.prefix=invoice_items sldg.hash.schema.skip=CREATE TABLE invoice_items_sldg ( row_num BIGINT NOT NULL, src_hash CHAR(43) NOT NULL, row_hash CHAR(43) NOT NULL, PRIMARY KEY (row_num) ) sldg.hash.schema.trail=CREATE TABLE invoice_items_sldg_tr ( trl_id INT NOT NULL, row_num BIGINT NOT NULL, utc BIGINT NOT NULL, mrkl_idx INT NOT NULL, mrkl_cnt INT NOT NULL, chain_len INT NOT NULL, chn_id INT NOT NULL, PRIMARY KEY (trl_id), FOREIGN KEY (row_num) REFERENCES invoice_items_sldg(row_num), FOREIGN KEY (chn_id) REFERENCES invoice_items_sldg_ch(chn_id) ) sldg.hash.schema.chain=CREATE TABLE invoice_items_sldg_ch ( chn_id INT NOT NULL, n_hash CHAR(43) NOT NULL, PRIMARY KEY (chn_id) ) sldg.meta.path=meta/chinook_info.json sldg.template.report.path=report